Thomas Gleixner | ec8f24b | 2019-05-19 13:07:45 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Matt Fleming | 0485177 | 2013-02-08 15:48:51 +0000 | [diff] [blame] | 2 | menu "EFI (Extensible Firmware Interface) Support" |
| 3 | depends on EFI |
| 4 | |
| 5 | config EFI_VARS |
| 6 | tristate "EFI Variable Support via sysfs" |
| 7 | depends on EFI |
| 8 | default n |
| 9 | help |
| 10 | If you say Y here, you are able to get EFI (Extensible Firmware |
| 11 | Interface) variable information via sysfs. You may read, |
| 12 | write, create, and destroy EFI variables through this interface. |
| 13 | |
| 14 | Note that using this driver in concert with efibootmgr requires |
| 15 | at least test release version 0.5.0-test3 or later, which is |
Peter Jones | 0e4ca02 | 2014-12-09 16:14:11 -0500 | [diff] [blame] | 16 | available from: |
Matt Fleming | 0485177 | 2013-02-08 15:48:51 +0000 | [diff] [blame] | 17 | <http://linux.dell.com/efibootmgr/testing/efibootmgr-0.5.0-test3.tar.gz> |
| 18 | |
| 19 | Subsequent efibootmgr releases may be found at: |
Peter Jones | 0e4ca02 | 2014-12-09 16:14:11 -0500 | [diff] [blame] | 20 | <http://github.com/vathpela/efibootmgr> |
Matt Fleming | 0485177 | 2013-02-08 15:48:51 +0000 | [diff] [blame] | 21 | |
Peter Jones | 3846c15 | 2015-06-05 15:14:54 -0400 | [diff] [blame] | 22 | config EFI_ESRT |
| 23 | bool |
| 24 | depends on EFI && !IA64 |
| 25 | default y |
| 26 | |
Matt Fleming | 0485177 | 2013-02-08 15:48:51 +0000 | [diff] [blame] | 27 | config EFI_VARS_PSTORE |
| 28 | tristate "Register efivars backend for pstore" |
| 29 | depends on EFI_VARS && PSTORE |
| 30 | default y |
| 31 | help |
| 32 | Say Y here to enable use efivars as a backend to pstore. This |
| 33 | will allow writing console messages, crash dumps, or anything |
| 34 | else supported by pstore to EFI variables. |
| 35 | |
| 36 | config EFI_VARS_PSTORE_DEFAULT_DISABLE |
| 37 | bool "Disable using efivars as a pstore backend by default" |
| 38 | depends on EFI_VARS_PSTORE |
| 39 | default n |
| 40 | help |
| 41 | Saying Y here will disable the use of efivars as a storage |
| 42 | backend for pstore by default. This setting can be overridden |
| 43 | using the efivars module's pstore_disable parameter. |
| 44 | |
Dave Young | 926172d | 2013-12-20 18:02:18 +0800 | [diff] [blame] | 45 | config EFI_RUNTIME_MAP |
| 46 | bool "Export efi runtime maps to sysfs" |
Dave Young | 2965faa | 2015-09-09 15:38:55 -0700 | [diff] [blame] | 47 | depends on X86 && EFI && KEXEC_CORE |
Dave Young | 926172d | 2013-12-20 18:02:18 +0800 | [diff] [blame] | 48 | default y |
| 49 | help |
| 50 | Export efi runtime memory maps to /sys/firmware/efi/runtime-map. |
| 51 | That memory map is used for example by kexec to set up efi virtual |
| 52 | mapping the 2nd kernel, but can also be used for debugging purposes. |
| 53 | |
| 54 | See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map. |
| 55 | |
Taku Izumi | 0f96a99 | 2015-09-30 23:01:56 +0900 | [diff] [blame] | 56 | config EFI_FAKE_MEMMAP |
| 57 | bool "Enable EFI fake memory map" |
| 58 | depends on EFI && X86 |
| 59 | default n |
| 60 | help |
| 61 | Saying Y here will enable "efi_fake_mem" boot option. |
| 62 | By specifying this parameter, you can add arbitrary attribute |
| 63 | to specific memory range by updating original (firmware provided) |
| 64 | EFI memmap. |
| 65 | This is useful for debugging of EFI memmap related feature. |
| 66 | e.g. Address Range Mirroring feature. |
| 67 | |
| 68 | config EFI_MAX_FAKE_MEM |
| 69 | int "maximum allowable number of ranges in efi_fake_mem boot option" |
| 70 | depends on EFI_FAKE_MEMMAP |
| 71 | range 1 128 |
| 72 | default 8 |
| 73 | help |
| 74 | Maximum allowable number of ranges in efi_fake_mem boot option. |
| 75 | Ranges can be set up to this value using comma-separated list. |
| 76 | The default value is 8. |
| 77 | |
Dan Williams | b617c52 | 2019-11-06 17:43:11 -0800 | [diff] [blame] | 78 | config EFI_SOFT_RESERVE |
| 79 | bool "Reserve EFI Specific Purpose Memory" |
| 80 | depends on EFI && EFI_STUB && ACPI_HMAT |
| 81 | default ACPI_HMAT |
| 82 | help |
| 83 | On systems that have mixed performance classes of memory EFI |
| 84 | may indicate specific purpose memory with an attribute (See |
| 85 | EFI_MEMORY_SP in UEFI 2.8). A memory range tagged with this |
| 86 | attribute may have unique performance characteristics compared |
| 87 | to the system's general purpose "System RAM" pool. On the |
| 88 | expectation that such memory has application specific usage, |
| 89 | and its base EFI memory type is "conventional" answer Y to |
| 90 | arrange for the kernel to reserve it as a "Soft Reserved" |
| 91 | resource, and set aside for direct-access (device-dax) by |
| 92 | default. The memory range can later be optionally assigned to |
| 93 | the page allocator by system administrator policy via the |
| 94 | device-dax kmem facility. Say N to have the kernel treat this |
| 95 | memory as "System RAM" by default. |
| 96 | |
| 97 | If unsure, say Y. |
| 98 | |
Mark Salter | 0302f71 | 2013-12-30 12:12:12 -0500 | [diff] [blame] | 99 | config EFI_PARAMS_FROM_FDT |
| 100 | bool |
| 101 | help |
| 102 | Select this config option from the architecture Kconfig if |
| 103 | the EFI runtime support gets system table address, memory |
| 104 | map address, and other parameters from the device tree. |
| 105 | |
Ard Biesheuvel | 022ee6c | 2014-06-26 12:09:05 +0200 | [diff] [blame] | 106 | config EFI_RUNTIME_WRAPPERS |
| 107 | bool |
| 108 | |
Atish Patra | 2e0eb48 | 2020-04-15 12:54:18 -0700 | [diff] [blame] | 109 | config EFI_GENERIC_STUB |
Ard Biesheuvel | f4f75ad5 | 2014-07-02 14:54:43 +0200 | [diff] [blame] | 110 | bool |
| 111 | |
Ard Biesheuvel | 3d7ee34 | 2018-07-11 11:40:38 +0200 | [diff] [blame] | 112 | config EFI_ARMSTUB_DTB_LOADER |
| 113 | bool "Enable the DTB loader" |
Atish Patra | 2e0eb48 | 2020-04-15 12:54:18 -0700 | [diff] [blame] | 114 | depends on EFI_GENERIC_STUB |
Scott Branden | d310959 | 2018-09-11 13:26:38 -0700 | [diff] [blame] | 115 | default y |
Ard Biesheuvel | 3d7ee34 | 2018-07-11 11:40:38 +0200 | [diff] [blame] | 116 | help |
| 117 | Select this config option to add support for the dtb= command |
| 118 | line parameter, allowing a device tree blob to be loaded into |
| 119 | memory from the EFI System Partition by the stub. |
| 120 | |
Scott Branden | d310959 | 2018-09-11 13:26:38 -0700 | [diff] [blame] | 121 | If the device tree is provided by the platform or by |
| 122 | the bootloader this option may not be needed. |
| 123 | But, for various development reasons and to maintain existing |
| 124 | functionality for bootloaders that do not have such support |
| 125 | this option is necessary. |
Ard Biesheuvel | 3d7ee34 | 2018-07-11 11:40:38 +0200 | [diff] [blame] | 126 | |
Ard Biesheuvel | cf6b836 | 2020-04-21 09:17:35 +0200 | [diff] [blame] | 127 | config EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER |
Ard Biesheuvel | 4da0b2b | 2020-04-25 12:22:04 +0200 | [diff] [blame] | 128 | bool "Enable the command line initrd loader" if !X86 |
| 129 | depends on EFI_STUB && (EFI_GENERIC_STUB || X86) |
Ard Biesheuvel | cf6b836 | 2020-04-21 09:17:35 +0200 | [diff] [blame] | 130 | default y |
| 131 | help |
| 132 | Select this config option to add support for the initrd= command |
| 133 | line parameter, allowing an initrd that resides on the same volume |
| 134 | as the kernel image to be loaded into memory. |
| 135 | |
| 136 | This method is deprecated. |
| 137 | |
Compostella, Jeremy | 06f7d4a | 2016-04-25 21:06:57 +0100 | [diff] [blame] | 138 | config EFI_BOOTLOADER_CONTROL |
| 139 | tristate "EFI Bootloader Control" |
| 140 | depends on EFI_VARS |
| 141 | default n |
Masahiro Yamada | a7f7f62 | 2020-06-14 01:50:22 +0900 | [diff] [blame^] | 142 | help |
Compostella, Jeremy | 06f7d4a | 2016-04-25 21:06:57 +0100 | [diff] [blame] | 143 | This module installs a reboot hook, such that if reboot() is |
| 144 | invoked with a string argument NNN, "NNN" is copied to the |
| 145 | "LoaderEntryOneShot" EFI variable, to be read by the |
| 146 | bootloader. If the string matches one of the boot labels |
| 147 | defined in its configuration, the bootloader will boot once |
| 148 | to that label. The "LoaderEntryRebootReason" EFI variable is |
| 149 | set with the reboot reason: "reboot" or "shutdown". The |
| 150 | bootloader reads this reboot reason and takes particular |
| 151 | action according to its policy. |
| 152 | |
Kweh, Hock Leong | 65117f1 | 2016-04-25 21:07:01 +0100 | [diff] [blame] | 153 | config EFI_CAPSULE_LOADER |
| 154 | tristate "EFI capsule loader" |
| 155 | depends on EFI |
| 156 | help |
| 157 | This option exposes a loader interface "/dev/efi_capsule_loader" for |
| 158 | users to load EFI capsules. This driver requires working runtime |
| 159 | capsule support in the firmware, which many OEMs do not provide. |
| 160 | |
| 161 | Most users should say N. |
| 162 | |
Jan Kiszka | 2959c95 | 2017-06-02 13:52:04 +0000 | [diff] [blame] | 163 | config EFI_CAPSULE_QUIRK_QUARK_CSH |
Masahiro Yamada | 1ae83c5 | 2017-12-16 00:38:01 +0900 | [diff] [blame] | 164 | bool "Add support for Quark capsules with non-standard headers" |
Jan Kiszka | 2959c95 | 2017-06-02 13:52:04 +0000 | [diff] [blame] | 165 | depends on X86 && !64BIT |
| 166 | select EFI_CAPSULE_LOADER |
| 167 | default y |
| 168 | help |
| 169 | Add support for processing Quark X1000 EFI capsules, whose header |
| 170 | layout deviates from the layout mandated by the UEFI specification. |
| 171 | |
Ivan Hu | ff6301d | 2016-08-25 11:15:31 +0800 | [diff] [blame] | 172 | config EFI_TEST |
| 173 | tristate "EFI Runtime Service Tests Support" |
| 174 | depends on EFI |
| 175 | default n |
| 176 | help |
| 177 | This driver uses the efi.<service> function pointers directly instead |
| 178 | of going through the efivar API, because it is not trying to test the |
| 179 | kernel subsystem, just for testing the UEFI runtime service |
| 180 | interfaces which are provided by the firmware. This driver is used |
| 181 | by the Firmware Test Suite (FWTS) for testing the UEFI runtime |
| 182 | interfaces readiness of the firmware. |
| 183 | Details for FWTS are available from: |
| 184 | <https://wiki.ubuntu.com/FirmwareTestSuite> |
| 185 | |
| 186 | Say Y here to enable the runtime services support via /dev/efi_test. |
| 187 | If unsure, say N. |
| 188 | |
Lukas Wunner | 58c5475 | 2016-11-12 21:32:36 +0000 | [diff] [blame] | 189 | config APPLE_PROPERTIES |
| 190 | bool "Apple Device Properties" |
| 191 | depends on EFI_STUB && X86 |
| 192 | select EFI_DEV_PATH_PARSER |
| 193 | select UCS2_STRING |
| 194 | help |
| 195 | Retrieve properties from EFI on Apple Macs and assign them to |
| 196 | devices, allowing for improved support of Apple hardware. |
| 197 | Properties that would otherwise be missing include the |
| 198 | Thunderbolt Device ROM and GPU configuration data. |
| 199 | |
| 200 | If unsure, say Y if you have a Mac. Otherwise N. |
| 201 | |
Matthew Garrett | ccc829b | 2017-08-25 16:50:15 +0100 | [diff] [blame] | 202 | config RESET_ATTACK_MITIGATION |
| 203 | bool "Reset memory attack mitigation" |
| 204 | depends on EFI_STUB |
| 205 | help |
| 206 | Request that the firmware clear the contents of RAM after a reboot |
| 207 | using the TCG Platform Reset Attack Mitigation specification. This |
| 208 | protects against an attacker forcibly rebooting the system while it |
| 209 | still contains secrets in RAM, booting another OS and extracting the |
Matthew Garrett | a5c03c3 | 2018-01-16 09:10:02 +0000 | [diff] [blame] | 210 | secrets. This should only be enabled when userland is configured to |
| 211 | clear the MemoryOverwriteRequest flag on clean shutdown after secrets |
| 212 | have been evicted, since otherwise it will trigger even on clean |
| 213 | reboots. |
Matthew Garrett | ccc829b | 2017-08-25 16:50:15 +0100 | [diff] [blame] | 214 | |
Narendra K | 1c5fecb | 2019-07-10 18:59:15 +0000 | [diff] [blame] | 215 | config EFI_RCI2_TABLE |
| 216 | bool "EFI Runtime Configuration Interface Table Version 2 Support" |
Narendra K | 0b6b30c | 2019-10-29 18:37:50 +0100 | [diff] [blame] | 217 | depends on X86 || COMPILE_TEST |
Narendra K | 1c5fecb | 2019-07-10 18:59:15 +0000 | [diff] [blame] | 218 | help |
| 219 | Displays the content of the Runtime Configuration Interface |
| 220 | Table version 2 on Dell EMC PowerEdge systems as a binary |
| 221 | attribute 'rci2' under /sys/firmware/efi/tables directory. |
| 222 | |
| 223 | RCI2 table contains BIOS HII in XML format and is used to populate |
| 224 | BIOS setup page in Dell EMC OpenManage Server Administrator tool. |
| 225 | The BIOS setup page contains BIOS tokens which can be configured. |
| 226 | |
| 227 | Say Y here for Dell EMC PowerEdge systems. |
| 228 | |
Matthew Garrett | 4444f85 | 2020-01-03 12:39:50 +0100 | [diff] [blame] | 229 | config EFI_DISABLE_PCI_DMA |
| 230 | bool "Clear Busmaster bit on PCI bridges during ExitBootServices()" |
| 231 | help |
| 232 | Disable the busmaster bit in the control register on all PCI bridges |
| 233 | while calling ExitBootServices() and passing control to the runtime |
| 234 | kernel. System firmware may configure the IOMMU to prevent malicious |
| 235 | PCI devices from being able to attack the OS via DMA. However, since |
| 236 | firmware can't guarantee that the OS is IOMMU-aware, it will tear |
| 237 | down IOMMU configuration when ExitBootServices() is called. This |
| 238 | leaves a window between where a hostile device could still cause |
| 239 | damage before Linux configures the IOMMU again. |
| 240 | |
| 241 | If you say Y here, the EFI stub will clear the busmaster bit on all |
| 242 | PCI bridges before ExitBootServices() is called. This will prevent |
| 243 | any malicious PCI devices from being able to perform DMA until the |
| 244 | kernel reenables busmastering after configuring the IOMMU. |
| 245 | |
| 246 | This option will cause failures with some poorly behaved hardware |
| 247 | and should not be enabled without testing. The kernel commandline |
| 248 | options "efi=disable_early_pci_dma" or "efi=no_disable_early_pci_dma" |
| 249 | may be used to override this option. |
| 250 | |
Matt Fleming | 0485177 | 2013-02-08 15:48:51 +0000 | [diff] [blame] | 251 | endmenu |
Jan Beulich | fce7d3b | 2013-12-16 14:39:40 +0000 | [diff] [blame] | 252 | |
Hans de Goede | f0df68d | 2020-01-15 17:35:46 +0100 | [diff] [blame] | 253 | config EFI_EMBEDDED_FIRMWARE |
| 254 | bool |
| 255 | depends on EFI |
| 256 | select CRYPTO_LIB_SHA256 |
| 257 | |
Jan Beulich | fce7d3b | 2013-12-16 14:39:40 +0000 | [diff] [blame] | 258 | config UEFI_CPER |
| 259 | bool |
Lukas Wunner | 46cd4b7 | 2016-11-12 21:32:34 +0000 | [diff] [blame] | 260 | |
Tyler Baicar | c6d8c8e | 2018-01-02 18:10:41 +0000 | [diff] [blame] | 261 | config UEFI_CPER_ARM |
| 262 | bool |
| 263 | depends on UEFI_CPER && ( ARM || ARM64 ) |
| 264 | default y |
| 265 | |
Yazen Ghannam | f9e1bdb | 2018-05-04 07:59:50 +0200 | [diff] [blame] | 266 | config UEFI_CPER_X86 |
| 267 | bool |
| 268 | depends on UEFI_CPER && X86 |
| 269 | default y |
| 270 | |
Lukas Wunner | 46cd4b7 | 2016-11-12 21:32:34 +0000 | [diff] [blame] | 271 | config EFI_DEV_PATH_PARSER |
| 272 | bool |
| 273 | depends on ACPI |
| 274 | default n |
Ard Biesheuvel | 69c1f39 | 2019-02-02 10:41:18 +0100 | [diff] [blame] | 275 | |
| 276 | config EFI_EARLYCON |
| 277 | def_bool y |
| 278 | depends on SERIAL_EARLYCON && !ARM && !IA64 |
| 279 | select FONT_SUPPORT |
| 280 | select ARCH_USE_MEMREMAP_PROT |