diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-16 16:06:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-16 16:06:27 -0400 |
commit | 49817c33433a3cd6f320b13699e6746cc39b453b (patch) | |
tree | 1eb8c4a4d585e648b0783741c02ab611149971d9 /arch/arm/include/asm/efi.h | |
parent | 230e51f21101e49c8d73018d414adbd0d57459a1 (diff) | |
parent | 6c5450ef66816216e574885cf8d3ddb31ef77428 (diff) |
Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull EFI updates from Ingo Molnar:
"The main changes in this cycle were:
- Drop the unused EFI_SYSTEM_TABLES efi.flags bit and ensure the
ARM/arm64 EFI System Table mapping is read-only (Ard Biesheuvel)
- Add a comment to explain that one of the code paths in the x86/pat
code is only executed for EFI boot (Matt Fleming)
- Improve Secure Boot status checks on arm64 and handle unexpected
errors (Linn Crosetto)
- Remove the global EFI memory map variable 'memmap' as the same
information is already available in efi::memmap (Matt Fleming)
- Add EFI Memory Attribute table support for ARM/arm64 (Ard
Biesheuvel)
- Add EFI GOP framebuffer support for ARM/arm64 (Ard Biesheuvel)
- Add EFI Bootloader Control driver for storing reboot(2) data in EFI
variables for consumption by bootloaders (Jeremy Compostella)
- Add Core EFI capsule support (Matt Fleming)
- Add EFI capsule char driver (Kweh, Hock Leong)
- Unify EFI memory map code for ARM and arm64 (Ard Biesheuvel)
- Add generic EFI support for detecting when firmware corrupts CPU
status register bits (like IRQ flags) when performing EFI runtime
service calls (Mark Rutland)
... and other misc cleanups"
* 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits)
efivarfs: Make efivarfs_file_ioctl() static
efi: Merge boolean flag arguments
efi/capsule: Move 'capsule' to the stack in efi_capsule_supported()
efibc: Fix excessive stack footprint warning
efi/capsule: Make efi_capsule_pending() lockless
efi: Remove unnecessary (and buggy) .memmap initialization from the Xen EFI driver
efi/runtime-wrappers: Remove ARCH_EFI_IRQ_FLAGS_MASK #ifdef
x86/efi: Enable runtime call flag checking
arm/efi: Enable runtime call flag checking
arm64/efi: Enable runtime call flag checking
efi/runtime-wrappers: Detect firmware IRQ flag corruption
efi/runtime-wrappers: Remove redundant #ifdefs
x86/efi: Move to generic {__,}efi_call_virt()
arm/efi: Move to generic {__,}efi_call_virt()
arm64/efi: Move to generic {__,}efi_call_virt()
efi/runtime-wrappers: Add {__,}efi_call_virt() templates
efi/arm-init: Reserve rather than unmap the memory map for ARM as well
efi: Add misc char driver interface to update EFI firmware
x86/efi: Force EFI reboot to process pending capsules
efi: Add 'capsule' update support
...
Diffstat (limited to 'arch/arm/include/asm/efi.h')
-rw-r--r-- | arch/arm/include/asm/efi.h | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/arch/arm/include/asm/efi.h b/arch/arm/include/asm/efi.h index e0eea72deb87..a708fa1f0905 100644 --- a/arch/arm/include/asm/efi.h +++ b/arch/arm/include/asm/efi.h | |||
@@ -17,34 +17,28 @@ | |||
17 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
18 | #include <asm/mmu_context.h> | 18 | #include <asm/mmu_context.h> |
19 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
20 | #include <asm/ptrace.h> | ||
20 | 21 | ||
21 | #ifdef CONFIG_EFI | 22 | #ifdef CONFIG_EFI |
22 | void efi_init(void); | 23 | void efi_init(void); |
23 | 24 | ||
24 | int efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md); | 25 | int efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md); |
26 | int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md); | ||
25 | 27 | ||
26 | #define efi_call_virt(f, ...) \ | 28 | #define arch_efi_call_virt_setup() efi_virtmap_load() |
27 | ({ \ | 29 | #define arch_efi_call_virt_teardown() efi_virtmap_unload() |
28 | efi_##f##_t *__f; \ | ||
29 | efi_status_t __s; \ | ||
30 | \ | ||
31 | efi_virtmap_load(); \ | ||
32 | __f = efi.systab->runtime->f; \ | ||
33 | __s = __f(__VA_ARGS__); \ | ||
34 | efi_virtmap_unload(); \ | ||
35 | __s; \ | ||
36 | }) | ||
37 | 30 | ||
38 | #define __efi_call_virt(f, ...) \ | 31 | #define arch_efi_call_virt(f, args...) \ |
39 | ({ \ | 32 | ({ \ |
40 | efi_##f##_t *__f; \ | 33 | efi_##f##_t *__f; \ |
41 | \ | ||
42 | efi_virtmap_load(); \ | ||
43 | __f = efi.systab->runtime->f; \ | 34 | __f = efi.systab->runtime->f; \ |
44 | __f(__VA_ARGS__); \ | 35 | __f(args); \ |
45 | efi_virtmap_unload(); \ | ||
46 | }) | 36 | }) |
47 | 37 | ||
38 | #define ARCH_EFI_IRQ_FLAGS_MASK \ | ||
39 | (PSR_J_BIT | PSR_E_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT | \ | ||
40 | PSR_T_BIT | MODE_MASK) | ||
41 | |||
48 | static inline void efi_set_pgd(struct mm_struct *mm) | 42 | static inline void efi_set_pgd(struct mm_struct *mm) |
49 | { | 43 | { |
50 | check_and_switch_context(mm, NULL); | 44 | check_and_switch_context(mm, NULL); |
@@ -59,7 +53,16 @@ void efi_virtmap_unload(void); | |||
59 | 53 | ||
60 | /* arch specific definitions used by the stub code */ | 54 | /* arch specific definitions used by the stub code */ |
61 | 55 | ||
62 | #define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__) | 56 | #define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__) |
57 | #define __efi_call_early(f, ...) f(__VA_ARGS__) | ||
58 | #define efi_is_64bit() (false) | ||
59 | |||
60 | struct screen_info *alloc_screen_info(efi_system_table_t *sys_table_arg); | ||
61 | void free_screen_info(efi_system_table_t *sys_table, struct screen_info *si); | ||
62 | |||
63 | static inline void efifb_setup_from_dmi(struct screen_info *si, const char *opt) | ||
64 | { | ||
65 | } | ||
63 | 66 | ||
64 | /* | 67 | /* |
65 | * A reasonable upper bound for the uncompressed kernel size is 32 MBytes, | 68 | * A reasonable upper bound for the uncompressed kernel size is 32 MBytes, |