1# SPDX-License-Identifier: GPL-2.0-only 2menu "EFI (Extensible Firmware Interface) Support" 3 depends on EFI 4 5config EFI_ESRT 6 bool 7 depends on EFI && !IA64 8 default y 9 10config EFI_VARS_PSTORE 11 tristate "Register efivars backend for pstore" 12 depends on PSTORE 13 select UCS2_STRING 14 default y 15 help 16 Say Y here to enable use efivars as a backend to pstore. This 17 will allow writing console messages, crash dumps, or anything 18 else supported by pstore to EFI variables. 19 20config EFI_VARS_PSTORE_DEFAULT_DISABLE 21 bool "Disable using efivars as a pstore backend by default" 22 depends on EFI_VARS_PSTORE 23 default n 24 help 25 Saying Y here will disable the use of efivars as a storage 26 backend for pstore by default. This setting can be overridden 27 using the efivars module's pstore_disable parameter. 28 29config EFI_RUNTIME_MAP 30 bool "Export EFI runtime maps to sysfs" if EXPERT 31 depends on X86 && EFI 32 default KEXEC_CORE 33 help 34 Export EFI runtime memory regions to /sys/firmware/efi/runtime-map. 35 That memory map is required by the 2nd kernel to set up EFI virtual 36 mappings after kexec, but can also be used for debugging purposes. 37 38 See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map. 39 40config EFI_SOFT_RESERVE 41 bool "Reserve EFI Specific Purpose Memory" 42 depends on EFI && EFI_STUB && ACPI_HMAT 43 default ACPI_HMAT 44 help 45 On systems that have mixed performance classes of memory EFI 46 may indicate specific purpose memory with an attribute (See 47 EFI_MEMORY_SP in UEFI 2.8). A memory range tagged with this 48 attribute may have unique performance characteristics compared 49 to the system's general purpose "System RAM" pool. On the 50 expectation that such memory has application specific usage, 51 and its base EFI memory type is "conventional" answer Y to 52 arrange for the kernel to reserve it as a "Soft Reserved" 53 resource, and set aside for direct-access (device-dax) by 54 default. The memory range can later be optionally assigned to 55 the page allocator by system administrator policy via the 56 device-dax kmem facility. Say N to have the kernel treat this 57 memory as "System RAM" by default. 58 59 If unsure, say Y. 60 61config EFI_DXE_MEM_ATTRIBUTES 62 bool "Adjust memory attributes in EFISTUB" 63 depends on EFI && EFI_STUB && X86 64 default y 65 help 66 UEFI specification does not guarantee all memory to be 67 accessible for both write and execute as the kernel expects 68 it to be. 69 Use DXE services to check and alter memory protection 70 attributes during boot via EFISTUB to ensure that memory 71 ranges used by the kernel are writable and executable. 72 73config EFI_PARAMS_FROM_FDT 74 bool 75 help 76 Select this config option from the architecture Kconfig if 77 the EFI runtime support gets system table address, memory 78 map address, and other parameters from the device tree. 79 80config EFI_RUNTIME_WRAPPERS 81 bool 82 83config EFI_GENERIC_STUB 84 bool 85 86config EFI_ZBOOT 87 bool "Enable the generic EFI decompressor" 88 depends on EFI_GENERIC_STUB && !ARM 89 select HAVE_KERNEL_GZIP 90 select HAVE_KERNEL_LZ4 91 select HAVE_KERNEL_LZMA 92 select HAVE_KERNEL_LZO 93 select HAVE_KERNEL_XZ 94 select HAVE_KERNEL_ZSTD 95 help 96 Create the bootable image as an EFI application that carries the 97 actual kernel image in compressed form, and decompresses it into 98 memory before executing it via LoadImage/StartImage EFI boot service 99 calls. For compatibility with non-EFI loaders, the payload can be 100 decompressed and executed by the loader as well, provided that the 101 loader implements the decompression algorithm and that non-EFI boot 102 is supported by the encapsulated image. (The compression algorithm 103 used is described in the zboot image header) 104 105config EFI_ARMSTUB_DTB_LOADER 106 bool "Enable the DTB loader" 107 depends on EFI_GENERIC_STUB && !RISCV && !LOONGARCH 108 default y 109 help 110 Select this config option to add support for the dtb= command 111 line parameter, allowing a device tree blob to be loaded into 112 memory from the EFI System Partition by the stub. 113 114 If the device tree is provided by the platform or by 115 the bootloader this option may not be needed. 116 But, for various development reasons and to maintain existing 117 functionality for bootloaders that do not have such support 118 this option is necessary. 119 120config EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER 121 bool "Enable the command line initrd loader" if !X86 122 depends on EFI_STUB && (EFI_GENERIC_STUB || X86) 123 default y if X86 124 help 125 Select this config option to add support for the initrd= command 126 line parameter, allowing an initrd to be loaded into memory that 127 resides on a file system backed by an implementation of 128 EFI_SIMPLE_FILE_SYSTEM_PROTOCOL. 129 130 This method has been superseded by the simpler LoadFile2 based 131 initrd loading method, but the initrd= loader is retained as it 132 can be used from the UEFI Shell or other generic loaders that 133 don't implement the Linux specific LoadFile2 method. 134 135config EFI_BOOTLOADER_CONTROL 136 tristate "EFI Bootloader Control" 137 select UCS2_STRING 138 default n 139 help 140 This module installs a reboot hook, such that if reboot() is 141 invoked with a string argument NNN, "NNN" is copied to the 142 "LoaderEntryOneShot" EFI variable, to be read by the 143 bootloader. If the string matches one of the boot labels 144 defined in its configuration, the bootloader will boot once 145 to that label. The "LoaderEntryRebootReason" EFI variable is 146 set with the reboot reason: "reboot" or "shutdown". The 147 bootloader reads this reboot reason and takes particular 148 action according to its policy. 149 150config EFI_CAPSULE_LOADER 151 tristate "EFI capsule loader" 152 depends on EFI && !IA64 153 help 154 This option exposes a loader interface "/dev/efi_capsule_loader" for 155 users to load EFI capsules. This driver requires working runtime 156 capsule support in the firmware, which many OEMs do not provide. 157 158 Most users should say N. 159 160config EFI_CAPSULE_QUIRK_QUARK_CSH 161 bool "Add support for Quark capsules with non-standard headers" 162 depends on X86 && !64BIT 163 select EFI_CAPSULE_LOADER 164 default y 165 help 166 Add support for processing Quark X1000 EFI capsules, whose header 167 layout deviates from the layout mandated by the UEFI specification. 168 169config EFI_TEST 170 tristate "EFI Runtime Service Tests Support" 171 depends on EFI 172 default n 173 help 174 This driver uses the efi.<service> function pointers directly instead 175 of going through the efivar API, because it is not trying to test the 176 kernel subsystem, just for testing the UEFI runtime service 177 interfaces which are provided by the firmware. This driver is used 178 by the Firmware Test Suite (FWTS) for testing the UEFI runtime 179 interfaces readiness of the firmware. 180 Details for FWTS are available from: 181 <https://wiki.ubuntu.com/FirmwareTestSuite> 182 183 Say Y here to enable the runtime services support via /dev/efi_test. 184 If unsure, say N. 185 186config EFI_DEV_PATH_PARSER 187 bool 188 189config 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 202config 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 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. 214 215config EFI_RCI2_TABLE 216 bool "EFI Runtime Configuration Interface Table Version 2 Support" 217 depends on X86 || COMPILE_TEST 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 229config 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 251config EFI_EARLYCON 252 def_bool y 253 depends on SERIAL_EARLYCON && !ARM && !IA64 254 select FONT_SUPPORT 255 select ARCH_USE_MEMREMAP_PROT 256 257config EFI_CUSTOM_SSDT_OVERLAYS 258 bool "Load custom ACPI SSDT overlay from an EFI variable" 259 depends on ACPI 260 default ACPI_TABLE_UPGRADE 261 help 262 Allow loading of an ACPI SSDT overlay from an EFI variable specified 263 by a kernel command line option. 264 265 See Documentation/admin-guide/acpi/ssdt-overlays.rst for more 266 information. 267 268config EFI_DISABLE_RUNTIME 269 bool "Disable EFI runtime services support by default" 270 default y if PREEMPT_RT 271 help 272 Allow to disable the EFI runtime services support by default. This can 273 already be achieved by using the efi=noruntime option, but it could be 274 useful to have this default without any kernel command line parameter. 275 276 The EFI runtime services are disabled by default when PREEMPT_RT is 277 enabled, because measurements have shown that some EFI functions calls 278 might take too much time to complete, causing large latencies which is 279 an issue for Real-Time kernels. 280 281 This default can be overridden by using the efi=runtime option. 282 283config EFI_COCO_SECRET 284 bool "EFI Confidential Computing Secret Area Support" 285 help 286 Confidential Computing platforms (such as AMD SEV) allow the 287 Guest Owner to securely inject secrets during guest VM launch. 288 The secrets are placed in a designated EFI reserved memory area. 289 290 In order to use the secrets in the kernel, the location of the secret 291 area (as published in the EFI config table) must be kept. 292 293 If you say Y here, the address of the EFI secret area will be kept 294 for usage inside the kernel. This will allow the 295 virt/coco/efi_secret module to access the secrets, which in turn 296 allows userspace programs to access the injected secrets. 297 298config EFI_EMBEDDED_FIRMWARE 299 bool 300 select CRYPTO_LIB_SHA256 301 302endmenu 303 304config UEFI_CPER 305 bool 306 307config UEFI_CPER_ARM 308 bool 309 depends on UEFI_CPER && ( ARM || ARM64 ) 310 default y 311 312config UEFI_CPER_X86 313 bool 314 depends on UEFI_CPER && X86 315 default y 316