diff options
author | Huang, Ying <ying.huang@intel.com> | 2008-01-30 07:34:10 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:34:10 -0500 |
commit | a3828064be4ed8e95907d3943e7af13cb709694d (patch) | |
tree | b5458f61681a0bf4c3640f28c51ccd0a24c0c6b5 /arch/x86/kernel/efi_32.c | |
parent | bed23c67fe077b4d66cb3329263d7cfa33b3fd67 (diff) |
x86: fixes some bugs about EFI memory map handling
This patch fixes some bugs of EFI memory handing code.
- On x86_64, it is possible that EFI memory map can not be mapped via
identity map, so efi_map_memmap is removed, just use early_ioremap.
- On i386, the EFI memory map mapping take effect cross paging_init,
so it is not necessary to use efi_map_memmap.
- EFI memory map is unmapped in efi_enter_virtual_mode to avoid
early_ioremap leak.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/efi_32.c')
-rw-r--r-- | arch/x86/kernel/efi_32.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/x86/kernel/efi_32.c b/arch/x86/kernel/efi_32.c index 114b896d7573..cb91f985b4a1 100644 --- a/arch/x86/kernel/efi_32.c +++ b/arch/x86/kernel/efi_32.c | |||
@@ -109,18 +109,3 @@ void efi_call_phys_epilog(void) | |||
109 | 109 | ||
110 | local_irq_restore(efi_rt_eflags); | 110 | local_irq_restore(efi_rt_eflags); |
111 | } | 111 | } |
112 | |||
113 | /* | ||
114 | * We need to map the EFI memory map again after paging_init(). | ||
115 | */ | ||
116 | void __init efi_map_memmap(void) | ||
117 | { | ||
118 | memmap.map = NULL; | ||
119 | |||
120 | memmap.map = early_ioremap((unsigned long) memmap.phys_map, | ||
121 | (memmap.nr_map * memmap.desc_size)); | ||
122 | if (memmap.map == NULL) | ||
123 | printk(KERN_ERR "Could not remap the EFI memmap!\n"); | ||
124 | |||
125 | memmap.map_end = memmap.map + (memmap.nr_map * memmap.desc_size); | ||
126 | } | ||