[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] EFI: add efi=mapbs option and parse efi= early



On Thu, Aug 08, 2019 at 02:31:57AM +0200, Marek Marczykowski-Górecki wrote:
> When booting Xen via xen.efi, there is /mapbs option to workaround
> certain platform issues (added in f36886bdf4 "EFI/early: add /mapbs to
> map EfiBootServices{Code,Data}"). Add support for efi=mapbs on Xen
> cmdline for the same effect and parse it very early in the
> multiboot2+EFI boot path.
> 
> Normally cmdline is parsed after relocating MB2 structure, which happens
> too late. To have efi= parsed early enough, save cmdline pointer in
> head.S and pass it as yet another argument to efi_multiboot2(). This
> way we avoid introducing yet another MB2 structure parser.
> 
> To keep consistency, handle efi= parameter early in xen.efi too, both in
> xen.efi command line and cfg file.
> 
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
> ---
>  docs/misc/xen-command-line.pandoc |  6 +++++-
>  xen/arch/x86/boot/head.S          | 21 ++++++++++++++++++---
>  xen/arch/x86/efi/efi-boot.h       | 10 ++++++++--
>  xen/arch/x86/x86_64/asm-offsets.c |  1 +
>  xen/common/efi/boot.c             | 23 ++++++++++++++++++++++-
>  5 files changed, 54 insertions(+), 7 deletions(-)
> 
...
> diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h
> index 7a13a30bc0..df5e98e6bc 100644
> --- a/xen/arch/x86/efi/efi-boot.h
> +++ b/xen/arch/x86/efi/efi-boot.h
> @@ -315,8 +315,10 @@ static void __init efi_arch_handle_cmdline(CHAR16 
> *image_name,
>          name.s = "xen";
>      place_string(&mbi.cmdline, name.s);
>  
> -    if ( mbi.cmdline )
> +    if ( mbi.cmdline ) {
>          mbi.flags |= MBI_CMDLINE;
> +        efi_early_parse_cmdline(mbi.cmdline);

Compiler complains here, because mbi.cmdline is u32 (int vs pointer, and
also a different size). What is the proper way to make compiler happy
here? "(const char *)(uint64_t)" doesn't seems right.


-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.