From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Daniel Kiper <daniel.kiper@oracle.com>, xen-devel@lists.xenproject.org
Cc: jgross@suse.com, keir@xen.org, ian.campbell@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
Subject: Re: [PATCH for-xen-4.5 v3 07/16] x86: Move boot_loader_name from mbi to boot_info
Date: Thu, 9 Oct 2014 11:53:25 +0100 [thread overview]
Message-ID: <54366925.2010107@citrix.com> (raw)
In-Reply-To: <1412790736-28915-8-git-send-email-daniel.kiper@oracle.com>
On 08/10/14 18:52, Daniel Kiper wrote:
> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> ---
> xen/arch/x86/boot_info.c | 11 ++++++-----
> xen/arch/x86/efi/efi-boot.h | 3 +--
> xen/arch/x86/setup.c | 13 +++++--------
> xen/common/efi/runtime.c | 1 +
> xen/include/asm-x86/boot_info.h | 3 +++
> 5 files changed, 16 insertions(+), 15 deletions(-)
>
> diff --git a/xen/arch/x86/boot_info.c b/xen/arch/x86/boot_info.c
> index 83bd255..5851123 100644
> --- a/xen/arch/x86/boot_info.c
> +++ b/xen/arch/x86/boot_info.c
> @@ -27,6 +27,7 @@
> static multiboot_info_t __read_mostly mbi;
>
> static boot_info_t __read_mostly boot_info_mb = {
> + .boot_loader_name = "UNKNOWN",
> .warn_msg = NULL,
> .err_msg = NULL
> };
> @@ -39,11 +40,6 @@ unsigned long __init __init_mbi(u32 mbd_pa)
>
> enable_exception_support();
>
> - if ( mbd->boot_loader_name ) {
> - mbi.flags = MBI_LOADERNAME;
> - mbi.boot_loader_name = mbd->boot_loader_name;
> - }
> -
> if ( mbd->cmdline ) {
> mbi.flags |= MBI_CMDLINE;
> mbi.cmdline = mbd->cmdline;
> @@ -66,5 +62,10 @@ unsigned long __init __init_mbi(u32 mbd_pa)
>
> paddr_t __init __init_boot_info(u32 mbd_pa)
> {
> + mbd_t *mbd = __va(mbd_pa);
> +
> + if ( mbd->boot_loader_name )
> + boot_info_mb.boot_loader_name = __va(mbd->boot_loader_name);
> +
> return __pa(&boot_info_mb);
> }
> diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h
> index 6d7c222..29504e9 100644
> --- a/xen/arch/x86/efi/efi-boot.h
> +++ b/xen/arch/x86/efi/efi-boot.h
> @@ -11,7 +11,7 @@
>
> static struct file __initdata ucode;
> static multiboot_info_t __initdata mbi = {
> - .flags = MBI_MODULES | MBI_LOADERNAME
> + .flags = MBI_MODULES
> };
> static module_t __initdata mb_modules[3];
>
> @@ -310,7 +310,6 @@ static void __init efi_arch_handle_cmdline(CHAR16 *image_name,
> * These must not be initialized statically, since the value must
> * not get relocated when processing base relocations later.
> */
> - mbi.boot_loader_name = (long)"EFI";
> mbi.mods_addr = (long)mb_modules;
> }
>
> diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
> index d2a1450..c4642f3 100644
> --- a/xen/arch/x86/setup.c
> +++ b/xen/arch/x86/setup.c
> @@ -554,7 +554,7 @@ void __init enable_exception_support(void)
> void __init noreturn __start_xen(unsigned long mbi_p, paddr_t boot_info_pa)
> {
> char *memmap_type = NULL;
> - char *cmdline, *kextra, *loader;
> + char *cmdline, *kextra;
> unsigned int initrdidx, domcr_flags = DOMCRF_s3_integrity;
> multiboot_info_t *mbi = __va(mbi_p);
> module_t *mod = (module_t *)__va(mbi->mods_addr);
> @@ -578,13 +578,10 @@ void __init noreturn __start_xen(unsigned long mbi_p, paddr_t boot_info_pa)
> /* Exception support was enabled before __start_xen() call. */
> }
>
> - loader = (mbi->flags & MBI_LOADERNAME)
> - ? (char *)__va(mbi->boot_loader_name) : "unknown";
> -
> /* Parse the command-line options. */
> cmdline = cmdline_cook((mbi->flags & MBI_CMDLINE) ?
> __va(mbi->cmdline) : NULL,
> - loader);
> + boot_info->boot_loader_name);
> if ( (kextra = strstr(cmdline, " -- ")) != NULL )
> {
> /*
> @@ -624,7 +621,7 @@ void __init noreturn __start_xen(unsigned long mbi_p, paddr_t boot_info_pa)
> if ( boot_info->warn_msg )
> printk(boot_info->warn_msg);
>
> - printk("Bootloader: %s\n", loader);
> + printk("Bootloader: %s\n", boot_info->boot_loader_name);
>
> printk("Command line: %s\n", cmdline);
>
> @@ -698,7 +695,7 @@ void __init noreturn __start_xen(unsigned long mbi_p, paddr_t boot_info_pa)
> l3_bootmap[l3_table_offset(BOOTSTRAP_MAP_BASE)] =
> l3e_from_paddr(__pa(l2_bootmap), __PAGE_HYPERVISOR);
>
> - memmap_type = loader;
> + memmap_type = boot_info->boot_loader_name;
> }
> else if ( e820_raw_nr != 0 )
> {
> @@ -1380,7 +1377,7 @@ void __init noreturn __start_xen(unsigned long mbi_p, paddr_t boot_info_pa)
> {
> static char __initdata dom0_cmdline[MAX_GUEST_CMDLINE];
>
> - cmdline = cmdline_cook(cmdline, loader);
> + cmdline = cmdline_cook(cmdline, boot_info->boot_loader_name);
> safe_strcpy(dom0_cmdline, cmdline);
>
> if ( kextra != NULL )
> diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c
> index eb0acae..7846b2b 100644
> --- a/xen/common/efi/runtime.c
> +++ b/xen/common/efi/runtime.c
> @@ -54,6 +54,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",
> .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 9ff3c0f..58a4cb6 100644
> --- a/xen/include/asm-x86/boot_info.h
> +++ b/xen/include/asm-x86/boot_info.h
> @@ -29,6 +29,9 @@
> * are compatible as much as possible with relevant EFI/ACPI types.
> */
> typedef struct {
> + /* Boot loader name. */
> + char *boot_loader_name;
> +
const char *loader_name; No need to have boot twice.
~Andrew
> /*
> * Info about warning occurred during boot_info initialization.
> * NULL if everything went OK.
next prev parent reply other threads:[~2014-10-09 10:53 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 17:52 [PATCH for-xen-4.5 v3 00/16] xen: Break multiboot (v1) dependency and add multiboot2 support Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 01/16] x86/boot/reloc: Remove redundant blank characters and reformat comments a bit Daniel Kiper
2014-10-09 9:26 ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 02/16] x86/boot/reloc: Move typedef and include to beginning of file Daniel Kiper
2014-10-09 9:40 ` Andrew Cooper
2014-10-10 8:50 ` Jan Beulich
2014-10-10 13:17 ` Daniel Kiper
2014-10-10 13:33 ` Jan Beulich
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 03/16] x86/boot/reloc: Create generic alloc and copy functions Daniel Kiper
2014-10-09 9:45 ` Andrew Cooper
2014-10-13 15:00 ` Daniel Kiper
2014-10-13 15:02 ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 04/16] x86: Introduce MultiBoot Data (MBD) type Daniel Kiper
2014-10-09 10:28 ` Andrew Cooper
2014-10-10 11:47 ` Daniel Kiper
2014-10-10 12:48 ` Jan Beulich
2014-10-13 10:21 ` Andrew Cooper
2014-10-13 15:14 ` Daniel Kiper
2014-10-14 15:27 ` Jan Beulich
2014-10-14 16:03 ` Daniel Kiper
2014-10-14 16:26 ` Jan Beulich
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 05/16] x86/efi: Add place_string_u32() function Daniel Kiper
2014-10-09 10:30 ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 06/16] x86: Introduce boot_info structure Daniel Kiper
2014-10-09 10:48 ` Andrew Cooper
2014-10-10 13:55 ` Stefano Stabellini
2014-10-10 20:44 ` Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 07/16] x86: Move boot_loader_name from mbi to boot_info Daniel Kiper
2014-10-09 10:53 ` Andrew Cooper [this message]
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 08/16] x86: Move cmdline " Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 09/16] x86: Move legacy BIOS memory map stuff " Daniel Kiper
2014-10-10 14:02 ` Stefano Stabellini
2014-10-10 20:26 ` Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 10/16] x86: Move modules data from mbi to boot_info and remove mbi Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 11/16] x86: Move EFI memory map stuff to boot_info Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 12/16] x86: Move MPS, ACPI and SMBIOS data " Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 13/16] x86: Move video " Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 14/16] x86: Move HDD " Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 15/16] x86/boot: Use %ecx instead of %eax Daniel Kiper
2014-10-09 11:02 ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 16/16] xen/x86: Add multiboot2 protocol support Daniel Kiper
2014-10-09 11:20 ` Andrew Cooper
2014-10-10 8:21 ` Jan Beulich
2014-10-10 8:23 ` [PATCH for-xen-4.5 v3 00/16] xen: Break multiboot (v1) dependency and add multiboot2 support Jan Beulich
2014-10-10 11:07 ` Daniel Kiper
2014-10-10 12:25 ` Jan Beulich
2014-10-10 13:03 ` Daniel Kiper
2014-10-16 8:13 ` Jan Beulich
2014-10-16 12:58 ` Daniel Kiper
2014-10-16 13:41 ` Jan Beulich
2014-10-16 15:33 ` Daniel Kiper
2014-10-16 15:42 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54366925.2010107@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=daniel.kiper@oracle.com \
--cc=fu.wei@linaro.org \
--cc=gang.wei@intel.com \
--cc=ian.campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=keir@xen.org \
--cc=ning.sun@intel.com \
--cc=qiaowei.ren@intel.com \
--cc=richard.l.maliszewski@intel.com \
--cc=ross.philipson@citrix.com \
--cc=roy.franz@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.