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, roy.franz@linaro.org,
ning.sun@intel.com, jbeulich@suse.com, ross.philipson@citrix.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 v4 14/18] x86: move MPS, ACPI and SMBIOS data to boot_info
Date: Fri, 17 Oct 2014 23:51:23 +0100 [thread overview]
Message-ID: <54419D6B.4000700@citrix.com> (raw)
In-Reply-To: <1413555132-22138-15-git-send-email-daniel.kiper@oracle.com>
On 17/10/2014 15:12, Daniel Kiper wrote:
> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> ---
> xen/arch/x86/boot_info.c | 5 +++++
> xen/arch/x86/dmi_scan.c | 11 ++++++++---
> xen/arch/x86/mpparse.c | 13 +++++++++----
> xen/common/efi/runtime.c | 18 +++++++++++-------
> xen/drivers/acpi/osl.c | 13 +++++++++----
> xen/include/asm-x86/boot_info.h | 12 ++++++++++++
> xen/include/xen/efi.h | 7 +++++++
> 7 files changed, 61 insertions(+), 18 deletions(-)
>
> diff --git a/xen/arch/x86/boot_info.c b/xen/arch/x86/boot_info.c
> index 77e9d5a..c1a4977 100644
> --- a/xen/arch/x86/boot_info.c
> +++ b/xen/arch/x86/boot_info.c
> @@ -23,6 +23,7 @@
>
> #include <xen/types.h>
> #include <xen/cache.h>
> +#include <xen/efi.h>
> #include <xen/init.h>
> #include <xen/multiboot.h>
>
> @@ -47,6 +48,10 @@ static boot_info_t __read_mostly boot_info_mb = {
> .efi_mmap_size = 0,
> .efi_mmap_desc_size = 0,
> .efi_mmap = NULL,
> + .mps = EFI_INVALID_TABLE_ADDR,
> + .acpi = EFI_INVALID_TABLE_ADDR,
> + .acpi20 = EFI_INVALID_TABLE_ADDR,
> + .smbios = EFI_INVALID_TABLE_ADDR,
> .mods_nr = 0,
> .mods = NULL,
> .warn_msg = NULL,
> diff --git a/xen/arch/x86/dmi_scan.c b/xen/arch/x86/dmi_scan.c
> index 500133a..94f81f3 100644
> --- a/xen/arch/x86/dmi_scan.c
> +++ b/xen/arch/x86/dmi_scan.c
> @@ -12,6 +12,11 @@
> #include <xen/efi.h>
> #include <xen/pci.h>
> #include <xen/pci_regs.h>
> +#ifndef CONFIG_ARM /* TODO - boot_info is not implemented on ARM yet */
> +#include <asm/boot_info.h>
> +#else
> +#define boot_info (&efi)
> +#endif
I *really* hope CONFIG_ARM is not enabled in the arch/x86 subtree...
>
> #define bt_ioremap(b,l) ((void *)__acpi_map_table(b,l))
> #define bt_iounmap(b,l) ((void)0)
> @@ -215,10 +220,10 @@ static int __init dmi_efi_iterate(void (*decode)(struct dmi_header *))
> const struct smbios_eps __iomem *p;
> int ret = -1;
>
> - if (efi.smbios == EFI_INVALID_TABLE_ADDR)
> + if (boot_info->smbios == EFI_INVALID_TABLE_ADDR)
> return -1;
>
> - p = bt_ioremap(efi.smbios, sizeof(eps));
> + p = bt_ioremap(boot_info->smbios, sizeof(eps));
> if (!p)
> return -1;
> memcpy_fromio(&eps, p, sizeof(eps));
> @@ -227,7 +232,7 @@ static int __init dmi_efi_iterate(void (*decode)(struct dmi_header *))
> if (memcmp(eps.anchor, "_SM_", 4))
> return -1;
>
> - p = bt_ioremap(efi.smbios, eps.length);
> + p = bt_ioremap(boot_info->smbios, eps.length);
> if (!p)
> return -1;
> if (dmi_checksum(p, eps.length) &&
> diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c
> index a38e016..8de39aa 100644
> --- a/xen/arch/x86/mpparse.c
> +++ b/xen/arch/x86/mpparse.c
> @@ -29,6 +29,11 @@
> #include <asm/mpspec.h>
> #include <asm/io_apic.h>
> #include <asm/setup.h>
> +#ifndef CONFIG_ARM /* TODO - boot_info is not implemented on ARM yet */
> +#include <asm/boot_info.h>
> +#else
> +#define boot_info (&efi)
> +#endif
And here
~Andrew
>
> #include <mach_apic.h>
> #include <mach_mpparse.h>
> @@ -676,18 +681,18 @@ static void __init efi_check_config(void)
> {
> struct intel_mp_floating *mpf;
>
> - if (efi.mps == EFI_INVALID_TABLE_ADDR)
> + if (boot_info->mps == EFI_INVALID_TABLE_ADDR)
> return;
>
> - __set_fixmap(FIX_EFI_MPF, PFN_DOWN(efi.mps), __PAGE_HYPERVISOR);
> - mpf = (void *)fix_to_virt(FIX_EFI_MPF) + ((long)efi.mps & (PAGE_SIZE-1));
> + __set_fixmap(FIX_EFI_MPF, PFN_DOWN(boot_info->mps), __PAGE_HYPERVISOR);
> + mpf = (void *)fix_to_virt(FIX_EFI_MPF) + ((long)boot_info->mps & (PAGE_SIZE-1));
>
> if (memcmp(mpf->mpf_signature, "_MP_", 4) == 0 &&
> mpf->mpf_length == 1 &&
> mpf_checksum((void *)mpf, 16) &&
> (mpf->mpf_specification == 1 || mpf->mpf_specification == 4)) {
> smp_found_config = 1;
> - printk(KERN_INFO "SMP MP-table at %08lx\n", efi.mps);
> + printk(KERN_INFO "SMP MP-table at %08lx\n", boot_info->mps);
> mpf_found = mpf;
> }
> else
> diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c
> index 3a74e98..abaebd4 100644
> --- a/xen/common/efi/runtime.c
> +++ b/xen/common/efi/runtime.c
> @@ -40,13 +40,6 @@ UINT64 __read_mostly efi_boot_max_var_store_size;
> UINT64 __read_mostly efi_boot_remain_var_store_size;
> UINT64 __read_mostly efi_boot_max_var_size;
>
> -struct efi __read_mostly efi = {
> - .acpi = EFI_INVALID_TABLE_ADDR,
> - .acpi20 = EFI_INVALID_TABLE_ADDR,
> - .mps = EFI_INVALID_TABLE_ADDR,
> - .smbios = EFI_INVALID_TABLE_ADDR,
> -};
> -
> const struct efi_pci_rom *__read_mostly efi_pci_roms;
>
> #ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */
> @@ -64,6 +57,10 @@ boot_info_t __read_mostly boot_info_efi = {
> .efi_mmap_size = 0,
> .efi_mmap_desc_size = 0,
> .efi_mmap = NULL,
> + .mps = EFI_INVALID_TABLE_ADDR,
> + .acpi = EFI_INVALID_TABLE_ADDR,
> + .acpi20 = EFI_INVALID_TABLE_ADDR,
> + .smbios = EFI_INVALID_TABLE_ADDR,
> .mods_nr = 0,
> .mods = boot_info_mods,
> .warn_msg = NULL,
> @@ -73,6 +70,13 @@ boot_info_t __read_mostly boot_info_efi = {
> UINTN __read_mostly efi_memmap_size;
> UINTN __read_mostly efi_mdesc_size;
> void *__read_mostly efi_memmap;
> +
> +struct efi __read_mostly efi = {
> + .acpi = EFI_INVALID_TABLE_ADDR,
> + .acpi20 = EFI_INVALID_TABLE_ADDR,
> + .mps = EFI_INVALID_TABLE_ADDR,
> + .smbios = EFI_INVALID_TABLE_ADDR,
> +};
> #endif
>
> #ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */
> diff --git a/xen/drivers/acpi/osl.c b/xen/drivers/acpi/osl.c
> index 93c983c..ab48aad 100644
> --- a/xen/drivers/acpi/osl.c
> +++ b/xen/drivers/acpi/osl.c
> @@ -39,6 +39,11 @@
> #include <xen/domain_page.h>
> #include <xen/efi.h>
> #include <xen/vmap.h>
> +#ifndef CONFIG_ARM /* TODO - boot_info is not implemented on ARM yet */
> +#include <asm/boot_info.h>
> +#else
> +#define boot_info (&efi)
> +#endif
>
> #define _COMPONENT ACPI_OS_SERVICES
> ACPI_MODULE_NAME("osl")
> @@ -67,10 +72,10 @@ void __init acpi_os_vprintf(const char *fmt, va_list args)
> acpi_physical_address __init acpi_os_get_root_pointer(void)
> {
> if (efi_enabled) {
> - if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
> - return efi.acpi20;
> - else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
> - return efi.acpi;
> + if (boot_info->acpi20 != EFI_INVALID_TABLE_ADDR)
> + return boot_info->acpi20;
> + else if (boot_info->acpi != EFI_INVALID_TABLE_ADDR)
> + return boot_info->acpi;
> else {
> printk(KERN_ERR PREFIX
> "System description tables not found\n");
> diff --git a/xen/include/asm-x86/boot_info.h b/xen/include/asm-x86/boot_info.h
> index 99ff93e..4d888ab 100644
> --- a/xen/include/asm-x86/boot_info.h
> +++ b/xen/include/asm-x86/boot_info.h
> @@ -68,6 +68,18 @@ typedef struct {
> /* Pointer to EFI memory map provided by preloader. */
> void *efi_mmap;
>
> + /* MPS physical address. */
> + paddr_t mps;
> +
> + /* ACPI RSDP physical address. */
> + paddr_t acpi;
> +
> + /* ACPI 2.0 RSDP physical address. */
> + paddr_t acpi20;
> +
> + /* SMBIOS physical address. */
> + paddr_t smbios;
> +
> /* Number of modules. */
> unsigned int mods_nr;
>
> diff --git a/xen/include/xen/efi.h b/xen/include/xen/efi.h
> index 8a2b788..75b14db 100644
> --- a/xen/include/xen/efi.h
> +++ b/xen/include/xen/efi.h
> @@ -3,12 +3,18 @@
>
> #ifndef __ASSEMBLY__
> #include <xen/types.h>
> +#ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */
> +#include <asm/boot_info.h>
> +#endif
> #endif
>
> extern const bool_t efi_enabled;
>
> #define EFI_INVALID_TABLE_ADDR (~0UL)
>
> +#ifndef CONFIG_ARM /* TODO - boot_info is not implemented on ARM yet */
> +#define efi boot_info_efi
> +#else
> /* Add fields here only if they need to be referenced from non-EFI code. */
> struct efi {
> unsigned long mps; /* MPS table */
> @@ -18,6 +24,7 @@ struct efi {
> };
>
> extern struct efi efi;
> +#endif
>
> #ifndef __ASSEMBLY__
>
next prev parent reply other threads:[~2014-10-17 22:51 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-17 14:11 [PATCH for-xen-4.5 v4 00/18] xen: Break multiboot (v1) dependency and add multiboot2 support Daniel Kiper
2014-10-17 14:11 ` [PATCH for-xen-4.5 v4 01/18] xen/makefile: clean target should remove xen.efi binary Daniel Kiper
2014-10-17 14:11 ` [PATCH for-xen-4.5 v4 02/18] x86/boot: fix reloc.S build dependencies Daniel Kiper
2014-10-17 14:51 ` Jan Beulich
2014-10-17 16:10 ` Daniel Kiper
2014-10-17 16:22 ` Jan Beulich
2014-10-17 14:56 ` Andrew Cooper
2014-10-17 15:10 ` Jan Beulich
2014-10-17 14:11 ` [PATCH for-xen-4.5 v4 03/18] x86: define cmdline_cook() loader_name argument as a const Daniel Kiper
2014-10-17 14:11 ` [PATCH for-xen-4.5 v4 04/18] x86/boot: use constant in head.S instead of hardcoded value Daniel Kiper
2014-10-17 15:00 ` Andrew Cooper
2014-10-17 15:52 ` Daniel Kiper
2014-10-17 16:18 ` Jan Beulich
2014-10-17 16:22 ` Daniel Kiper
2014-10-20 8:00 ` Jan Beulich
2014-10-17 14:11 ` [PATCH for-xen-4.5 v4 05/18] x86/boot/reloc: create generic alloc and copy functions Daniel Kiper
2014-10-17 16:04 ` Andrew Cooper
2014-10-17 17:11 ` Daniel Kiper
2014-10-17 17:22 ` Andrew Cooper
2014-10-17 14:11 ` [PATCH for-xen-4.5 v4 06/18] x86: introduce MultiBoot Data (MBD) type Daniel Kiper
2014-10-17 17:14 ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 07/18] x86/efi: add place_string_u32() function Daniel Kiper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 08/18] x86: introduce boot_info structure Daniel Kiper
2014-10-17 20:55 ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 09/18] x86: move boot_loader_name from mbi to boot_info Daniel Kiper
2014-10-17 21:05 ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 10/18] x86: move cmdline " Daniel Kiper
2014-10-17 21:27 ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 11/18] x86: move legacy BIOS memory map stuff " Daniel Kiper
2014-10-17 22:08 ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 12/18] x86: move modules data from mbi to boot_info and remove mbi Daniel Kiper
2014-10-17 22:35 ` Andrew Cooper
2014-10-20 8:38 ` Jan Beulich
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 13/18] x86: move EFI memory map stuff to boot_info Daniel Kiper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 14/18] x86: move MPS, ACPI and SMBIOS data " Daniel Kiper
2014-10-17 22:51 ` Andrew Cooper [this message]
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 15/18] x86: move video " Daniel Kiper
2014-10-17 22:55 ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 16/18] x86: move HDD " Daniel Kiper
2014-10-17 22:57 ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 17/18] x86/boot: use %ecx instead of %eax Daniel Kiper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 18/18] xen/x86: add multiboot2 protocol support Daniel Kiper
2014-10-17 23:13 ` Andrew Cooper
2014-10-17 14:42 ` [PATCH for-xen-4.5 v4 00/18] xen: Break multiboot (v1) dependency and add multiboot2 support Jan Beulich
2014-10-17 15:49 ` Daniel Kiper
2014-10-23 10:19 ` Jan Beulich
2014-10-23 11:08 ` Andrew Cooper
2014-10-23 14:57 ` Daniel Kiper
2014-10-23 15:26 ` Jan Beulich
2014-10-23 15:50 ` Daniel Kiper
2014-10-23 16:04 ` Jan Beulich
2014-10-23 17:55 ` konrad wilk
2014-10-24 9:09 ` Jan Beulich
2014-10-23 15:55 ` Andrew Cooper
2014-10-23 18:04 ` konrad wilk
2014-10-23 21:55 ` Andrew Cooper
2014-10-24 7:07 ` Daniel Kiper
2014-10-23 11:14 ` Stefano Stabellini
2014-10-23 11:33 ` Jan Beulich
2014-10-17 18:02 ` Roy Franz
2014-10-27 11:09 ` Daniel Kiper
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=54419D6B.4000700@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.