This source file includes following definitions.
- efi_alloc_page_tables
- efi_sync_low_kernel_mappings
- efi_dump_pagetable
- efi_setup_page_tables
- efi_map_region
- efi_map_region_fixed
- parse_efi_setup
- efi_call_phys_prolog
- efi_call_phys_epilog
- efi_runtime_update_mappings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 #include <linux/kernel.h>
24 #include <linux/types.h>
25 #include <linux/ioport.h>
26 #include <linux/efi.h>
27
28 #include <asm/io.h>
29 #include <asm/desc.h>
30 #include <asm/page.h>
31 #include <asm/pgtable.h>
32 #include <asm/tlbflush.h>
33 #include <asm/efi.h>
34
35
36
37
38
39
40
41
42 int __init efi_alloc_page_tables(void)
43 {
44 return 0;
45 }
46
47 void efi_sync_low_kernel_mappings(void) {}
48
49 void __init efi_dump_pagetable(void)
50 {
51 #ifdef CONFIG_EFI_PGT_DUMP
52 ptdump_walk_pgd_level(NULL, swapper_pg_dir);
53 #endif
54 }
55
56 int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
57 {
58 return 0;
59 }
60
61 void __init efi_map_region(efi_memory_desc_t *md)
62 {
63 old_map_region(md);
64 }
65
66 void __init efi_map_region_fixed(efi_memory_desc_t *md) {}
67 void __init parse_efi_setup(u64 phys_addr, u32 data_len) {}
68
69 pgd_t * __init efi_call_phys_prolog(void)
70 {
71 struct desc_ptr gdt_descr;
72 pgd_t *save_pgd;
73
74
75 save_pgd = swapper_pg_dir;
76 load_cr3(initial_page_table);
77 __flush_tlb_all();
78
79 gdt_descr.address = get_cpu_gdt_paddr(0);
80 gdt_descr.size = GDT_SIZE - 1;
81 load_gdt(&gdt_descr);
82
83 return save_pgd;
84 }
85
86 void __init efi_call_phys_epilog(pgd_t *save_pgd)
87 {
88 load_fixmap_gdt(0);
89 load_cr3(save_pgd);
90 __flush_tlb_all();
91 }
92
93 void __init efi_runtime_update_mappings(void)
94 {
95 if (__supported_pte_mask & _PAGE_NX)
96 runtime_code_page_mkexec();
97 }