This source file includes following definitions.
- efi_set_pgd
- efifb_setup_from_dmi
- efi_get_max_fdt_addr
- efi_get_max_initrd_addr
1
2
3
4
5
6 #ifndef __ASM_ARM_EFI_H
7 #define __ASM_ARM_EFI_H
8
9 #include <asm/cacheflush.h>
10 #include <asm/cachetype.h>
11 #include <asm/early_ioremap.h>
12 #include <asm/fixmap.h>
13 #include <asm/highmem.h>
14 #include <asm/mach/map.h>
15 #include <asm/mmu_context.h>
16 #include <asm/pgtable.h>
17 #include <asm/ptrace.h>
18
19 #ifdef CONFIG_EFI
20 void efi_init(void);
21
22 int efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md);
23 int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md);
24
25 #define arch_efi_call_virt_setup() efi_virtmap_load()
26 #define arch_efi_call_virt_teardown() efi_virtmap_unload()
27
28 #define arch_efi_call_virt(p, f, args...) \
29 ({ \
30 efi_##f##_t *__f; \
31 __f = p->f; \
32 __f(args); \
33 })
34
35 #define ARCH_EFI_IRQ_FLAGS_MASK \
36 (PSR_J_BIT | PSR_E_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT | \
37 PSR_T_BIT | MODE_MASK)
38
39 static inline void efi_set_pgd(struct mm_struct *mm)
40 {
41 check_and_switch_context(mm, NULL);
42 }
43
44 void efi_virtmap_load(void);
45 void efi_virtmap_unload(void);
46
47 #else
48 #define efi_init()
49 #endif
50
51
52
53 #define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__)
54 #define __efi_call_early(f, ...) f(__VA_ARGS__)
55 #define efi_call_runtime(f, ...) sys_table_arg->runtime->f(__VA_ARGS__)
56 #define efi_is_64bit() (false)
57
58 #define efi_table_attr(table, attr, instance) \
59 ((table##_t *)instance)->attr
60
61 #define efi_call_proto(protocol, f, instance, ...) \
62 ((protocol##_t *)instance)->f(instance, ##__VA_ARGS__)
63
64 struct screen_info *alloc_screen_info(efi_system_table_t *sys_table_arg);
65 void free_screen_info(efi_system_table_t *sys_table, struct screen_info *si);
66
67 static inline void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
68 {
69 }
70
71
72
73
74
75
76
77
78 #define MAX_UNCOMP_KERNEL_SIZE SZ_32M
79
80
81
82
83
84
85
86 #define ZIMAGE_OFFSET_LIMIT SZ_128M
87 #define MIN_ZIMAGE_OFFSET MAX_UNCOMP_KERNEL_SIZE
88
89
90 static inline unsigned long efi_get_max_fdt_addr(unsigned long dram_base)
91 {
92 return dram_base + ZIMAGE_OFFSET_LIMIT;
93 }
94
95
96 static inline unsigned long efi_get_max_initrd_addr(unsigned long dram_base,
97 unsigned long image_addr)
98 {
99 return dram_base + SZ_512M;
100 }
101
102 #endif