|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V4 06/15] Add efi_arch_handle_cmdline() for processing commandline
>>> On 10.09.14 at 02:51, <roy.franz@xxxxxxxxxx> wrote:
> @@ -786,19 +786,6 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE
> *SystemTable)
> efi_bs->FreePool(name.w);
> }
>
> - name.s = get_value(&cfg, section.s, "options");
> - if ( name.s )
> - place_string(&mbi.cmdline, name.s);
> - /* Insert image name last, as it gets prefixed to the other options. */
> - if ( argc )
> - {
> - name.w = *argv;
> - w2s(&name);
> - }
> - else
> - name.s = "xen";
> - place_string(&mbi.cmdline, name.s);
> -
> cols = rows = depth = 0;
> if ( !base_video )
> {
> @@ -817,6 +804,9 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE
> *SystemTable)
> }
> }
>
> + name.s = get_value(&cfg, section.s, "options");
> + efi_arch_handle_cmdline(argc ? *argv : NULL, options, name.s);
> +
> efi_bs->FreePages(cfg.addr, PFN_UP(cfg.size));
> cfg.addr = 0;
>
Again - is there a particular reason to move this down?
> --- a/xen/include/asm-x86/efi-boot.h
> +++ b/xen/include/asm-x86/efi-boot.h
> @@ -607,3 +607,37 @@ static void __init efi_arch_cfg_file(EFI_FILE_HANDLE
> dir_handle, char *section)
> efi_bs->FreePool(name.w);
> }
> }
> +
> +static void __init efi_arch_handle_cmdline(CHAR16 *image_name,
> + CHAR16 *cmdline_options,
> + char *cfgfile_options)
> +{
> + union string name;
> +
> + if ( cmdline_options )
> + {
> + name.w = cmdline_options;
> + w2s(&name);
> + place_string(&mbi.cmdline, name.s);
> + }
> + if ( cfgfile_options )
> + place_string(&mbi.cmdline, cfgfile_options);
> + /* Insert image name last, as it gets prefixed to the other options. */
> + if ( image_name )
> + {
> + name.w = image_name;
> + w2s(&name);
> + }
> + else
> + name.s = "xen";
> + place_string(&mbi.cmdline, name.s);
> +
> + if ( mbi.cmdline )
> + mbi.flags |= MBI_CMDLINE;
> + /*
> + * These must not be initialized statically, since the value must
> + * not get relocated when processing base relocations below.
> + */
The "below" here will need adjustment now that this doesn't live in
the same function anymore.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |