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>
This commit is contained in:
@@ -103,15 +103,6 @@ void __init efi_call_phys_epilog(void)
|
||||
local_irq_restore(efi_flags);
|
||||
}
|
||||
|
||||
/*
|
||||
* We need to map the EFI memory map again after init_memory_mapping().
|
||||
*/
|
||||
void __init efi_map_memmap(void)
|
||||
{
|
||||
memmap.map = __va(memmap.phys_map);
|
||||
memmap.map_end = memmap.map + (memmap.nr_map * memmap.desc_size);
|
||||
}
|
||||
|
||||
void __init efi_reserve_bootmem(void)
|
||||
{
|
||||
reserve_bootmem_generic((unsigned long)memmap.phys_map,
|
||||
|
Reference in New Issue
Block a user