aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/efi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/efi.h')
-rw-r--r--include/asm-x86/efi.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/include/asm-x86/efi.h b/include/asm-x86/efi.h
index 1459d3d58653..6d54502755aa 100644
--- a/include/asm-x86/efi.h
+++ b/include/asm-x86/efi.h
@@ -2,6 +2,48 @@
2#define _ASM_X86_EFI_H 2#define _ASM_X86_EFI_H
3 3
4#ifdef CONFIG_X86_32 4#ifdef CONFIG_X86_32
5
6extern unsigned long asmlinkage efi_call_phys(void *, ...);
7
8#define efi_call_phys0(f) efi_call_phys(f)
9#define efi_call_phys1(f, a1) efi_call_phys(f, a1)
10#define efi_call_phys2(f, a1, a2) efi_call_phys(f, a1, a2)
11#define efi_call_phys3(f, a1, a2, a3) efi_call_phys(f, a1, a2, a3)
12#define efi_call_phys4(f, a1, a2, a3, a4) \
13 efi_call_phys(f, a1, a2, a3, a4)
14#define efi_call_phys5(f, a1, a2, a3, a4, a5) \
15 efi_call_phys(f, a1, a2, a3, a4, a5)
16#define efi_call_phys6(f, a1, a2, a3, a4, a5, a6) \
17 efi_call_phys(f, a1, a2, a3, a4, a5, a6)
18/*
19 * Wrap all the virtual calls in a way that forces the parameters on the stack.
20 */
21
22#define efi_call_virt(f, args...) \
23 ((efi_##f##_t __attribute__((regparm(0)))*)efi.systab->runtime->f)(args)
24
25#define efi_call_virt0(f) efi_call_virt(f)
26#define efi_call_virt1(f, a1) efi_call_virt(f, a1)
27#define efi_call_virt2(f, a1, a2) efi_call_virt(f, a1, a2)
28#define efi_call_virt3(f, a1, a2, a3) efi_call_virt(f, a1, a2, a3)
29#define efi_call_virt4(f, a1, a2, a3, a4) \
30 efi_call_virt(f, a1, a2, a3, a4)
31#define efi_call_virt5(f, a1, a2, a3, a4, a5) \
32 efi_call_virt(f, a1, a2, a3, a4, a5)
33#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \
34 efi_call_virt(f, a1, a2, a3, a4, a5, a6)
35/*
36 * We require an early boot_ioremap mapping mechanism initially
37 */
38extern void *boot_ioremap(unsigned long, unsigned long);
39
40#define efi_early_ioremap(addr, size) boot_ioremap(addr, size)
41#define efi_early_iounmap(vaddr, size)
42
43#define efi_ioremap(addr, size) ioremap(addr, size)
44
45#define end_pfn_map max_low_pfn
46
5#else /* !CONFIG_X86_32 */ 47#else /* !CONFIG_X86_32 */
6 48
7#define MAX_EFI_IO_PAGES 100 49#define MAX_EFI_IO_PAGES 100