18 #include <linux/kernel.h>
21 #include <linux/types.h>
25 #include <linux/module.h>
29 #include <linux/reboot.h>
31 #include <asm/setup.h>
34 #include <asm/pgtable.h>
35 #include <asm/tlbflush.h>
38 #include <asm/cacheflush.h>
39 #include <asm/fixmap.h>
44 static void __init early_code_mapping_set_exec(
int executable)
49 if (!(__supported_pte_mask &
_PAGE_NX))
63 unsigned long vaddress;
65 early_code_mapping_set_exec(1);
67 vaddress = (
unsigned long)
__va(0x0UL);
81 early_code_mapping_set_exec(0);
87 unsigned long last_map_pfn;
90 return ioremap(phys_addr, size);
93 if ((last_map_pfn <<
PAGE_SHIFT) < phys_addr + size) {
95 efi_ioremap(top, size - (top - phys_addr), type, attribute);