diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-23 08:04:03 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-23 08:04:03 -0400 |
| commit | de3fbb2aa802a267dee2213ae7d5a1e19eb4294a (patch) | |
| tree | d8a4bd8ba23881b74600d7b0af7992a407056f58 /include/linux | |
| parent | cee1352f792646ae87e65f8bfb0ae91ff3d2cb95 (diff) | |
| parent | fa70f0d2ce96a892b38fbbaa60584af536f21f97 (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 are:
- Add support for enlisting the help of the EFI firmware to create
memory reservations that persist across kexec.
- Add page fault handling to the runtime services support code on x86
so we can more gracefully recover from buggy EFI firmware.
- Fix command line handling on x86 for the boot path that omits the
stub's PE/COFF entry point.
- Other assorted fixes and updates"
* 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86: boot: Fix EFI stub alignment
efi/x86: Call efi_parse_options() from efi_main()
efi/x86: earlyprintk - Add 64bit efi fb address support
efi/x86: drop task_lock() from efi_switch_mm()
efi/x86: Handle page faults occurring while running EFI runtime services
efi: Make efi_rts_work accessible to efi page fault handler
efi/efi_test: add exporting ResetSystem runtime service
efi/libstub: arm: support building with clang
efi: add API to reserve memory persistently across kexec reboot
efi/arm: libstub: add a root memreserve config table
efi: honour memory reservations passed via a linux specific config table
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/efi.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 401e4b254e30..845174e113ce 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -672,6 +672,7 @@ void efi_native_runtime_setup(void); | |||
| 672 | #define LINUX_EFI_LOADER_ENTRY_GUID EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, 0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f) | 672 | #define LINUX_EFI_LOADER_ENTRY_GUID EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, 0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f) |
| 673 | #define LINUX_EFI_RANDOM_SEED_TABLE_GUID EFI_GUID(0x1ce1e5bc, 0x7ceb, 0x42f2, 0x81, 0xe5, 0x8a, 0xad, 0xf1, 0x80, 0xf5, 0x7b) | 673 | #define LINUX_EFI_RANDOM_SEED_TABLE_GUID EFI_GUID(0x1ce1e5bc, 0x7ceb, 0x42f2, 0x81, 0xe5, 0x8a, 0xad, 0xf1, 0x80, 0xf5, 0x7b) |
| 674 | #define LINUX_EFI_TPM_EVENT_LOG_GUID EFI_GUID(0xb7799cb0, 0xeca2, 0x4943, 0x96, 0x67, 0x1f, 0xae, 0x07, 0xb7, 0x47, 0xfa) | 674 | #define LINUX_EFI_TPM_EVENT_LOG_GUID EFI_GUID(0xb7799cb0, 0xeca2, 0x4943, 0x96, 0x67, 0x1f, 0xae, 0x07, 0xb7, 0x47, 0xfa) |
| 675 | #define LINUX_EFI_MEMRESERVE_TABLE_GUID EFI_GUID(0x888eb0c6, 0x8ede, 0x4ff5, 0xa8, 0xf0, 0x9a, 0xee, 0x5c, 0xb9, 0x77, 0xc2) | ||
| 675 | 676 | ||
| 676 | typedef struct { | 677 | typedef struct { |
| 677 | efi_guid_t guid; | 678 | efi_guid_t guid; |
| @@ -957,6 +958,7 @@ extern struct efi { | |||
| 957 | unsigned long mem_attr_table; /* memory attributes table */ | 958 | unsigned long mem_attr_table; /* memory attributes table */ |
| 958 | unsigned long rng_seed; /* UEFI firmware random seed */ | 959 | unsigned long rng_seed; /* UEFI firmware random seed */ |
| 959 | unsigned long tpm_log; /* TPM2 Event Log table */ | 960 | unsigned long tpm_log; /* TPM2 Event Log table */ |
| 961 | unsigned long mem_reserve; /* Linux EFI memreserve table */ | ||
| 960 | efi_get_time_t *get_time; | 962 | efi_get_time_t *get_time; |
| 961 | efi_set_time_t *set_time; | 963 | efi_set_time_t *set_time; |
| 962 | efi_get_wakeup_time_t *get_wakeup_time; | 964 | efi_get_wakeup_time_t *get_wakeup_time; |
| @@ -1041,6 +1043,7 @@ extern int __init efi_uart_console_only (void); | |||
| 1041 | extern u64 efi_mem_desc_end(efi_memory_desc_t *md); | 1043 | extern u64 efi_mem_desc_end(efi_memory_desc_t *md); |
| 1042 | extern int efi_mem_desc_lookup(u64 phys_addr, efi_memory_desc_t *out_md); | 1044 | extern int efi_mem_desc_lookup(u64 phys_addr, efi_memory_desc_t *out_md); |
| 1043 | extern void efi_mem_reserve(phys_addr_t addr, u64 size); | 1045 | extern void efi_mem_reserve(phys_addr_t addr, u64 size); |
| 1046 | extern int efi_mem_reserve_persistent(phys_addr_t addr, u64 size); | ||
| 1044 | extern void efi_initialize_iomem_resources(struct resource *code_resource, | 1047 | extern void efi_initialize_iomem_resources(struct resource *code_resource, |
| 1045 | struct resource *data_resource, struct resource *bss_resource); | 1048 | struct resource *data_resource, struct resource *bss_resource); |
| 1046 | extern void efi_reserve_boot_services(void); | 1049 | extern void efi_reserve_boot_services(void); |
| @@ -1659,7 +1662,55 @@ struct linux_efi_tpm_eventlog { | |||
| 1659 | 1662 | ||
| 1660 | extern int efi_tpm_eventlog_init(void); | 1663 | extern int efi_tpm_eventlog_init(void); |
| 1661 | 1664 | ||
| 1665 | /* | ||
| 1666 | * efi_runtime_service() function identifiers. | ||
| 1667 | * "NONE" is used by efi_recover_from_page_fault() to check if the page | ||
| 1668 | * fault happened while executing an efi runtime service. | ||
| 1669 | */ | ||
| 1670 | enum efi_rts_ids { | ||
| 1671 | NONE, | ||
| 1672 | GET_TIME, | ||
| 1673 | SET_TIME, | ||
| 1674 | GET_WAKEUP_TIME, | ||
| 1675 | SET_WAKEUP_TIME, | ||
| 1676 | GET_VARIABLE, | ||
| 1677 | GET_NEXT_VARIABLE, | ||
| 1678 | SET_VARIABLE, | ||
| 1679 | QUERY_VARIABLE_INFO, | ||
| 1680 | GET_NEXT_HIGH_MONO_COUNT, | ||
| 1681 | RESET_SYSTEM, | ||
| 1682 | UPDATE_CAPSULE, | ||
| 1683 | QUERY_CAPSULE_CAPS, | ||
| 1684 | }; | ||
| 1685 | |||
| 1686 | /* | ||
| 1687 | * efi_runtime_work: Details of EFI Runtime Service work | ||
| 1688 | * @arg<1-5>: EFI Runtime Service function arguments | ||
| 1689 | * @status: Status of executing EFI Runtime Service | ||
| 1690 | * @efi_rts_id: EFI Runtime Service function identifier | ||
| 1691 | * @efi_rts_comp: Struct used for handling completions | ||
| 1692 | */ | ||
| 1693 | struct efi_runtime_work { | ||
| 1694 | void *arg1; | ||
| 1695 | void *arg2; | ||
| 1696 | void *arg3; | ||
| 1697 | void *arg4; | ||
| 1698 | void *arg5; | ||
| 1699 | efi_status_t status; | ||
| 1700 | struct work_struct work; | ||
| 1701 | enum efi_rts_ids efi_rts_id; | ||
| 1702 | struct completion efi_rts_comp; | ||
| 1703 | }; | ||
| 1704 | |||
| 1705 | extern struct efi_runtime_work efi_rts_work; | ||
| 1706 | |||
| 1662 | /* Workqueue to queue EFI Runtime Services */ | 1707 | /* Workqueue to queue EFI Runtime Services */ |
| 1663 | extern struct workqueue_struct *efi_rts_wq; | 1708 | extern struct workqueue_struct *efi_rts_wq; |
| 1664 | 1709 | ||
| 1710 | struct linux_efi_memreserve { | ||
| 1711 | phys_addr_t next; | ||
| 1712 | phys_addr_t base; | ||
| 1713 | phys_addr_t size; | ||
| 1714 | }; | ||
| 1715 | |||
| 1665 | #endif /* _LINUX_EFI_H */ | 1716 | #endif /* _LINUX_EFI_H */ |
