[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH v2 07/16] hvmloader: Grab the hvmlite info page and parse the cmdline
On Mon, 2015-10-26 at 16:03 +0000, Anthony PERARD wrote: > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> > --- > Âtools/firmware/hvmloader/hvmloader.c | 69 > +++++++++++++++++++++++++++++++++++- > Â1 file changed, 68 insertions(+), 1 deletion(-) > > diff --git a/tools/firmware/hvmloader/hvmloader.c > b/tools/firmware/hvmloader/hvmloader.c > index 716d03c..9df12ac 100644 > --- a/tools/firmware/hvmloader/hvmloader.c > +++ b/tools/firmware/hvmloader/hvmloader.c > @@ -62,7 +62,7 @@ asm ( > ÂÂÂÂÂ"ÂÂÂÂmovÂÂ%ax,%ssÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ\n" > ÂÂÂÂÂ/* Initialise all 32-bit GPRs to zero. */ > ÂÂÂÂÂ"ÂÂÂÂxorÂÂ%eax,%eaxÂÂÂÂÂÂÂÂÂÂÂÂÂÂ\n" > -ÂÂÂÂ"ÂÂÂÂxorÂÂ%ebx,%ebxÂÂÂÂÂÂÂÂÂÂÂÂÂÂ\n" > +ÂÂÂÂ/* Keep ebx, for HVMLite start info */ Isn't this now an ABI between the tools and HVM loader, which is embedded in the more formal PVH/HVMLite startup protocol? In which case hopefully there is somewhere it can be documented. Is a HVMlite/PVH guest allowed to assume anything about %ebx, those sorts of questions need to be considered. > ÂÂÂÂÂ"ÂÂÂÂxorÂÂ%ecx,%ecxÂÂÂÂÂÂÂÂÂÂÂÂÂÂ\n" > ÂÂÂÂÂ"ÂÂÂÂxorÂÂ%edx,%edxÂÂÂÂÂÂÂÂÂÂÂÂÂÂ\n" > ÂÂÂÂÂ"ÂÂÂÂxorÂÂ%esp,%espÂÂÂÂÂÂÂÂÂÂÂÂÂÂ\n" > @@ -249,15 +249,82 @@ static void acpi_enable_sci(void) > ÂÂÂÂÂBUG_ON(!(pm1a_cnt_val & ACPI_PM1C_SCI_EN)); > Â} > Â > +static const char *module_list_order = NULL; > +void cmdline_parser(const char *the_cmdline) I'll leave this until we've decided if this approach is the one we want. > Âint main(void) > Â{ > ÂÂÂÂÂconst struct bios_config *bios; > ÂÂÂÂÂint acpi_enabled; > +ÂÂÂÂconst struct hvm_start_info *hvmlite_start_info; > + > +ÂÂÂÂ/* Load hvmlite start info pointer from ebx. */ > +ÂÂÂÂasm volatile ( "mov %%ebx,%0" : "=r" (hvmlite_start_info) ); The stub which calls main should perhaps arrange for this to be in a register which ends up being a parameter to this struct. I think otherwise nothing ensures that the function prolog hasn't clobbered %ebx already. > Â > ÂÂÂÂÂ/* Initialise hypercall stubs with RET, rendering them no-ops. */ > ÂÂÂÂÂmemset((void *)HYPERCALL_PHYSICAL_ADDRESS, 0xc3 /* RET */, > PAGE_SIZE); > Â > ÂÂÂÂÂprintf("HVM Loader\n"); > +ÂÂÂÂBUG_ON(hvmlite_start_info->magic != HVM_START_MAGIC_VALUE); > +ÂÂÂÂprintf("cmdline: %s\n", (char*)hvmlite_start_info->cmdline_paddr); > +ÂÂÂÂcmdline_parser((char*)hvmlite_start_info->cmdline_paddr); > Â > ÂÂÂÂÂinit_hypercalls(); > Â _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |