From: Daniel Kiper Subject: [PATCH for-xen-4.5 v4 13/18] x86: move EFI memory map stuff to boot_info Date: Fri, 17 Oct 2014 16:12:06 +0200 Message-ID: <1413555132-22138-14-git-send-email-daniel.kiper@oracle.com> References: <1413555132-22138-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.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xf8Hk-0003v4-9q for xen-devel@lists.xenproject.org; Fri, 17 Oct 2014 14:13:40 +0000 In-Reply-To: <1413555132-22138-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 | 3 +++ xen/common/efi/efi.h | 6 +++++- xen/common/efi/runtime.c | 11 +++++++---- xen/include/asm-x86/boot_info.h | 9 +++++++++ 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/boot_info.c b/xen/arch/x86/boot_info.c index 081453e..77e9d5a 100644 --- a/xen/arch/x86/boot_info.c +++ b/xen/arch/x86/boot_info.c @@ -44,6 +44,9 @@ static boot_info_t __read_mostly boot_info_mb = { .mem_upper = 0, .e820map_nr = 0, .e820map = NULL, + .efi_mmap_size = 0, + .efi_mmap_desc_size = 0, + .efi_mmap = NULL, .mods_nr = 0, .mods = NULL, .warn_msg = NULL, diff --git a/xen/common/efi/efi.h b/xen/common/efi/efi.h index 526f57c..214651b 100644 --- a/xen/common/efi/efi.h +++ b/xen/common/efi/efi.h @@ -30,10 +30,14 @@ extern EFI_RUNTIME_SERVICES *efi_rs; #ifndef CONFIG_ARM /* TODO - boot_info is not implemented on ARM yet */ extern boot_info_t boot_info_efi; -#endif +#define efi_memmap_size boot_info_efi.efi_mmap_size +#define efi_mdesc_size boot_info_efi.efi_mmap_desc_size +#define efi_memmap boot_info_efi.efi_mmap +#else extern UINTN efi_memmap_size, efi_mdesc_size; extern void *efi_memmap; +#endif #ifdef CONFIG_X86 extern l4_pgentry_t *efi_l4_pgtable; diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c index 1b786a1..3a74e98 100644 --- a/xen/common/efi/runtime.c +++ b/xen/common/efi/runtime.c @@ -36,10 +36,6 @@ EFI_RUNTIME_SERVICES *__read_mostly efi_rs; static DEFINE_SPINLOCK(efi_rs_lock); #endif -UINTN __read_mostly efi_memmap_size; -UINTN __read_mostly efi_mdesc_size; -void *__read_mostly efi_memmap; - 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; @@ -65,11 +61,18 @@ boot_info_t __read_mostly boot_info_efi = { .mem_upper = 0, .e820map_nr = 0, .e820map = e820map, + .efi_mmap_size = 0, + .efi_mmap_desc_size = 0, + .efi_mmap = NULL, .mods_nr = 0, .mods = boot_info_mods, .warn_msg = NULL, .err_msg = NULL }; +#else +UINTN __read_mostly efi_memmap_size; +UINTN __read_mostly efi_mdesc_size; +void *__read_mostly efi_memmap; #endif #ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */ diff --git a/xen/include/asm-x86/boot_info.h b/xen/include/asm-x86/boot_info.h index c0c92b4..99ff93e 100644 --- a/xen/include/asm-x86/boot_info.h +++ b/xen/include/asm-x86/boot_info.h @@ -59,6 +59,15 @@ typedef struct { */ struct e820entry *e820map; + /* Size (in bytes) of EFI memory map provided by Xen preloader. */ + size_t efi_mmap_size; + + /* Size (in bytes) of EFI memory map descriptor provided by Xen preloader. */ + size_t efi_mmap_desc_size; + + /* Pointer to EFI memory map provided by preloader. */ + void *efi_mmap; + /* Number of modules. */ unsigned int mods_nr; -- 1.7.10.4