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;
return 0;
}
early_param("efi", parse_efi_cmdline);
- set_bit(EFI_OLD_MEMMAP, &x86_efi_facility);
+
+ 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, &efi.flags);
+ }