diff options
author | Matt Tolentino <metolent@snoqualmie.dp.intel.com> | 2005-09-03 15:56:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 00:06:09 -0700 |
commit | 7ae65fd334232468a9d6b523a4fc141cd6ec5ea4 (patch) | |
tree | cbc63abb55033d88f9a631741603a2a379bebee2 /include/linux/efi.h | |
parent | 4116c527ea9517623369a5b3b037aedde280d672 (diff) | |
download | lwn-7ae65fd334232468a9d6b523a4fc141cd6ec5ea4.tar.gz lwn-7ae65fd334232468a9d6b523a4fc141cd6ec5ea4.zip |
[PATCH] x86: fix EFI memory map parsing
The memory descriptors that comprise the EFI memory map are not fixed in
stone such that the size could change in the future. This uses the memory
descriptor size obtained from EFI to iterate over the memory map entries
during boot. This enables the removal of an x86 specific pad (and ifdef)
in the EFI header. I also couldn't stomach the broken up nature of the
function to put EFI runtime calls into virtual mode any longer so I fixed
that up a bit as well.
For reference, this patch only impacts x86.
Signed-off-by: Matt Tolentino <matthew.e.tolentino@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r-- | include/linux/efi.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 73781ec165b4..c7c5dd316182 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -91,11 +91,6 @@ typedef struct { #define EFI_PAGE_SHIFT 12 -/* - * For current x86 implementations of EFI, there is - * additional padding in the mem descriptors. This is not - * the case in ia64. Need to have this fixed in the f/w. - */ typedef struct { u32 type; u32 pad; @@ -103,9 +98,6 @@ typedef struct { u64 virt_addr; u64 num_pages; u64 attribute; -#if defined (__i386__) - u64 pad1; -#endif } efi_memory_desc_t; typedef int (*efi_freemem_callback_t) (unsigned long start, unsigned long end, void *arg); @@ -240,10 +232,12 @@ typedef struct { } efi_system_table_t; struct efi_memory_map { - efi_memory_desc_t *phys_map; - efi_memory_desc_t *map; + void *phys_map; + void *map; + void *map_end; int nr_map; unsigned long desc_version; + unsigned long desc_size; }; /* |