From: Daniel Kiper Subject: [PATCH for-xen-4.5 v3 08/16] x86: Move cmdline from mbi to boot_info Date: Wed, 8 Oct 2014 19:52:08 +0200 Message-ID: <1412790736-28915-9-git-send-email-daniel.kiper@oracle.com> References: <1412790736-28915-1-git-send-email-daniel.kiper@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XbvQZ-0003lu-IB for xen-devel@lists.xenproject.org; Wed, 08 Oct 2014 17:53:31 +0000 In-Reply-To: <1412790736-28915-1-git-send-email-daniel.kiper@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: jgross@suse.com, keir@xen.org, ian.campbell@citrix.com, andrew.cooper3@citrix.com, stefano.stabellini@eu.citrix.com, ross.philipson@citrix.com, roy.franz@linaro.org, ning.sun@intel.com, jbeulich@suse.com, qiaowei.ren@intel.com, richard.l.maliszewski@intel.com, gang.wei@intel.com, fu.wei@linaro.org List-Id: xen-devel@lists.xenproject.org Signed-off-by: Daniel Kiper --- xen/arch/x86/boot_info.c | 9 ++++----- xen/arch/x86/efi/efi-boot.h | 8 +++----- xen/arch/x86/setup.c | 4 +--- xen/common/efi/runtime.c | 1 + xen/include/asm-x86/boot_info.h | 3 +++ 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/xen/arch/x86/boot_info.c b/xen/arch/x86/boot_info.c index 5851123..7101f6c 100644 --- a/xen/arch/x86/boot_info.c +++ b/xen/arch/x86/boot_info.c @@ -28,6 +28,7 @@ static multiboot_info_t __read_mostly mbi; static boot_info_t __read_mostly boot_info_mb = { .boot_loader_name = "UNKNOWN", + .cmdline = NULL, .warn_msg = NULL, .err_msg = NULL }; @@ -40,11 +41,6 @@ unsigned long __init __init_mbi(u32 mbd_pa) enable_exception_support(); - if ( mbd->cmdline ) { - mbi.flags |= MBI_CMDLINE; - mbi.cmdline = mbd->cmdline; - } - mbi.flags |= MBI_MEMLIMITS; mbi.mem_lower = mbd->mem_lower; mbi.mem_upper = mbd->mem_upper; @@ -67,5 +63,8 @@ paddr_t __init __init_boot_info(u32 mbd_pa) if ( mbd->boot_loader_name ) boot_info_mb.boot_loader_name = __va(mbd->boot_loader_name); + if ( mbd->cmdline ) + boot_info_mb.cmdline = __va(mbd->cmdline); + return __pa(&boot_info_mb); } diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h index 29504e9..3b5628a 100644 --- a/xen/arch/x86/efi/efi-boot.h +++ b/xen/arch/x86/efi/efi-boot.h @@ -290,10 +290,10 @@ static void __init efi_arch_handle_cmdline(CHAR16 *image_name, { name.w = cmdline_options; w2s(&name); - place_string_u32(&mbi.cmdline, name.s); + place_string_char(&boot_info_efi.cmdline, name.s); } if ( cfgfile_options ) - place_string_u32(&mbi.cmdline, cfgfile_options); + place_string_char(&boot_info_efi.cmdline, cfgfile_options); /* Insert image name last, as it gets prefixed to the other options. */ if ( image_name ) { @@ -302,10 +302,8 @@ static void __init efi_arch_handle_cmdline(CHAR16 *image_name, } else name.s = "xen"; - place_string_u32(&mbi.cmdline, name.s); + place_string_char(&boot_info_efi.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 later. diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index c4642f3..d7416d3 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -579,9 +579,7 @@ void __init noreturn __start_xen(unsigned long mbi_p, paddr_t boot_info_pa) } /* Parse the command-line options. */ - cmdline = cmdline_cook((mbi->flags & MBI_CMDLINE) ? - __va(mbi->cmdline) : NULL, - boot_info->boot_loader_name); + cmdline = cmdline_cook(boot_info->cmdline, boot_info->boot_loader_name); if ( (kextra = strstr(cmdline, " -- ")) != NULL ) { /* diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c index 7846b2b..ee2ee2d 100644 --- a/xen/common/efi/runtime.c +++ b/xen/common/efi/runtime.c @@ -55,6 +55,7 @@ const struct efi_pci_rom *__read_mostly efi_pci_roms; #ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */ boot_info_t __read_mostly boot_info_efi = { .boot_loader_name = "EFI", + .cmdline = NULL, .warn_msg = NULL, .err_msg = NULL }; diff --git a/xen/include/asm-x86/boot_info.h b/xen/include/asm-x86/boot_info.h index 58a4cb6..d74ed67 100644 --- a/xen/include/asm-x86/boot_info.h +++ b/xen/include/asm-x86/boot_info.h @@ -32,6 +32,9 @@ typedef struct { /* Boot loader name. */ char *boot_loader_name; + /* Xen command line. */ + char *cmdline; + /* * Info about warning occurred during boot_info initialization. * NULL if everything went OK. -- 1.7.10.4