[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-xen-4.5 v3 11/16] x86: Move EFI memory map stuff to boot_info
Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx> --- 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 9f7c4a5..ce6f266 100644 --- a/xen/arch/x86/boot_info.c +++ b/xen/arch/x86/boot_info.c @@ -42,6 +42,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 b5ee6e0..98991f9 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 342ee7a..59586ef 100644 --- a/xen/include/asm-x86/boot_info.h +++ b/xen/include/asm-x86/boot_info.h @@ -58,6 +58,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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |