From: Matt Fleming Date: Wed, 5 Mar 2014 17:22:57 +0000 (+0000) Subject: Merge remote-tracking branch 'tip/x86/urgent' into efi-for-mingo X-Git-Tag: firefly_0821_release~176^2~4227^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4fd69331ad227a4d8de26592d017b73e00caca9f;p=firefly-linux-kernel-4.4.55.git Merge remote-tracking branch 'tip/x86/urgent' into efi-for-mingo Conflicts: arch/x86/include/asm/efi.h --- 4fd69331ad227a4d8de26592d017b73e00caca9f diff --cc arch/x86/include/asm/efi.h index e985d6bf7d3a,acd86c850414..86d1fd4bf24c --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h @@@ -134,7 -134,7 +134,8 @@@ extern void efi_cleanup_page_tables(uns extern void __init old_map_region(efi_memory_desc_t *md); extern void __init runtime_code_page_mkexec(void); extern void __init efi_runtime_mkexec(void); +extern void __init efi_dump_pagetable(void); + extern void __init efi_apply_memmap_quirks(void); struct efi_setup_data { u64 fw_vendor; diff --cc arch/x86/platform/efi/efi.c index 6f0a46730826,b97acecf3fd9..45d4f7674678 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c @@@ -1302,3 -1211,22 +1303,22 @@@ static int __init parse_efi_cmdline(cha return 0; } early_param("efi", parse_efi_cmdline); + + void __init efi_apply_memmap_quirks(void) + { + /* + * Once setup is done earlier, unmap the EFI memory map on mismatched + * firmware/kernel architectures since there is no support for runtime + * services. + */ + if (!efi_is_native()) { + pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n"); + efi_unmap_memmap(); + } + + /* + * UV doesn't support the new EFI pagetable mapping yet. + */ + if (is_uv_system()) - set_bit(EFI_OLD_MEMMAP, &x86_efi_facility); ++ set_bit(EFI_OLD_MEMMAP, &efi.flags); + }