1 # SPDX-License-Identifier: GPL-2.0-only
2 menu "EFI (Extensible Firmware Interface) Support"
6 tristate "EFI Variable Support via sysfs"
7 depends on EFI && (X86 || IA64)
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 Note that this driver is only retained for compatibility with
14 legacy users: new users should use the efivarfs filesystem
19 depends on EFI && !IA64
22 config EFI_VARS_PSTORE
23 tristate "Register efivars backend for pstore"
28 Say Y here to enable use efivars as a backend to pstore. This
29 will allow writing console messages, crash dumps, or anything
30 else supported by pstore to EFI variables.
32 config EFI_VARS_PSTORE_DEFAULT_DISABLE
33 bool "Disable using efivars as a pstore backend by default"
34 depends on EFI_VARS_PSTORE
37 Saying Y here will disable the use of efivars as a storage
38 backend for pstore by default. This setting can be overridden
39 using the efivars module's pstore_disable parameter.
41 config EFI_RUNTIME_MAP
42 bool "Export efi runtime maps to sysfs"
43 depends on X86 && EFI && KEXEC_CORE
46 Export efi runtime memory maps to /sys/firmware/efi/runtime-map.
47 That memory map is used for example by kexec to set up efi virtual
48 mapping the 2nd kernel, but can also be used for debugging purposes.
50 See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map.
52 config EFI_FAKE_MEMMAP
53 bool "Enable EFI fake memory map"
57 Saying Y here will enable "efi_fake_mem" boot option.
58 By specifying this parameter, you can add arbitrary attribute
59 to specific memory range by updating original (firmware provided)
61 This is useful for debugging of EFI memmap related feature.
62 e.g. Address Range Mirroring feature.
64 config EFI_MAX_FAKE_MEM
65 int "maximum allowable number of ranges in efi_fake_mem boot option"
66 depends on EFI_FAKE_MEMMAP
70 Maximum allowable number of ranges in efi_fake_mem boot option.
71 Ranges can be set up to this value using comma-separated list.
72 The default value is 8.
74 config EFI_SOFT_RESERVE
75 bool "Reserve EFI Specific Purpose Memory"
76 depends on EFI && EFI_STUB && ACPI_HMAT
79 On systems that have mixed performance classes of memory EFI
80 may indicate specific purpose memory with an attribute (See
81 EFI_MEMORY_SP in UEFI 2.8). A memory range tagged with this
82 attribute may have unique performance characteristics compared
83 to the system's general purpose "System RAM" pool. On the
84 expectation that such memory has application specific usage,
85 and its base EFI memory type is "conventional" answer Y to
86 arrange for the kernel to reserve it as a "Soft Reserved"
87 resource, and set aside for direct-access (device-dax) by
88 default. The memory range can later be optionally assigned to
89 the page allocator by system administrator policy via the
90 device-dax kmem facility. Say N to have the kernel treat this
91 memory as "System RAM" by default.
95 config EFI_DXE_MEM_ATTRIBUTES
96 bool "Adjust memory attributes in EFISTUB"
97 depends on EFI && EFI_STUB && X86
100 UEFI specification does not guarantee all memory to be
101 accessible for both write and execute as the kernel expects
103 Use DXE services to check and alter memory protection
104 attributes during boot via EFISTUB to ensure that memory
105 ranges used by the kernel are writable and executable.
107 config EFI_PARAMS_FROM_FDT
110 Select this config option from the architecture Kconfig if
111 the EFI runtime support gets system table address, memory
112 map address, and other parameters from the device tree.
114 config EFI_RUNTIME_WRAPPERS
117 config EFI_GENERIC_STUB
120 config EFI_ARMSTUB_DTB_LOADER
121 bool "Enable the DTB loader"
122 depends on EFI_GENERIC_STUB && !RISCV
125 Select this config option to add support for the dtb= command
126 line parameter, allowing a device tree blob to be loaded into
127 memory from the EFI System Partition by the stub.
129 If the device tree is provided by the platform or by
130 the bootloader this option may not be needed.
131 But, for various development reasons and to maintain existing
132 functionality for bootloaders that do not have such support
133 this option is necessary.
135 config EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER
136 bool "Enable the command line initrd loader" if !X86
137 depends on EFI_STUB && (EFI_GENERIC_STUB || X86)
141 Select this config option to add support for the initrd= command
142 line parameter, allowing an initrd that resides on the same volume
143 as the kernel image to be loaded into memory.
145 This method is deprecated.
147 config EFI_BOOTLOADER_CONTROL
148 tristate "EFI Bootloader Control"
152 This module installs a reboot hook, such that if reboot() is
153 invoked with a string argument NNN, "NNN" is copied to the
154 "LoaderEntryOneShot" EFI variable, to be read by the
155 bootloader. If the string matches one of the boot labels
156 defined in its configuration, the bootloader will boot once
157 to that label. The "LoaderEntryRebootReason" EFI variable is
158 set with the reboot reason: "reboot" or "shutdown". The
159 bootloader reads this reboot reason and takes particular
160 action according to its policy.
162 config EFI_CAPSULE_LOADER
163 tristate "EFI capsule loader"
164 depends on EFI && !IA64
166 This option exposes a loader interface "/dev/efi_capsule_loader" for
167 users to load EFI capsules. This driver requires working runtime
168 capsule support in the firmware, which many OEMs do not provide.
170 Most users should say N.
172 config EFI_CAPSULE_QUIRK_QUARK_CSH
173 bool "Add support for Quark capsules with non-standard headers"
174 depends on X86 && !64BIT
175 select EFI_CAPSULE_LOADER
178 Add support for processing Quark X1000 EFI capsules, whose header
179 layout deviates from the layout mandated by the UEFI specification.
182 tristate "EFI Runtime Service Tests Support"
186 This driver uses the efi.<service> function pointers directly instead
187 of going through the efivar API, because it is not trying to test the
188 kernel subsystem, just for testing the UEFI runtime service
189 interfaces which are provided by the firmware. This driver is used
190 by the Firmware Test Suite (FWTS) for testing the UEFI runtime
191 interfaces readiness of the firmware.
192 Details for FWTS are available from:
193 <https://wiki.ubuntu.com/FirmwareTestSuite>
195 Say Y here to enable the runtime services support via /dev/efi_test.
198 config EFI_DEV_PATH_PARSER
201 config APPLE_PROPERTIES
202 bool "Apple Device Properties"
203 depends on EFI_STUB && X86
204 select EFI_DEV_PATH_PARSER
207 Retrieve properties from EFI on Apple Macs and assign them to
208 devices, allowing for improved support of Apple hardware.
209 Properties that would otherwise be missing include the
210 Thunderbolt Device ROM and GPU configuration data.
212 If unsure, say Y if you have a Mac. Otherwise N.
214 config RESET_ATTACK_MITIGATION
215 bool "Reset memory attack mitigation"
218 Request that the firmware clear the contents of RAM after a reboot
219 using the TCG Platform Reset Attack Mitigation specification. This
220 protects against an attacker forcibly rebooting the system while it
221 still contains secrets in RAM, booting another OS and extracting the
222 secrets. This should only be enabled when userland is configured to
223 clear the MemoryOverwriteRequest flag on clean shutdown after secrets
224 have been evicted, since otherwise it will trigger even on clean
227 config EFI_RCI2_TABLE
228 bool "EFI Runtime Configuration Interface Table Version 2 Support"
229 depends on X86 || COMPILE_TEST
231 Displays the content of the Runtime Configuration Interface
232 Table version 2 on Dell EMC PowerEdge systems as a binary
233 attribute 'rci2' under /sys/firmware/efi/tables directory.
235 RCI2 table contains BIOS HII in XML format and is used to populate
236 BIOS setup page in Dell EMC OpenManage Server Administrator tool.
237 The BIOS setup page contains BIOS tokens which can be configured.
239 Say Y here for Dell EMC PowerEdge systems.
241 config EFI_DISABLE_PCI_DMA
242 bool "Clear Busmaster bit on PCI bridges during ExitBootServices()"
244 Disable the busmaster bit in the control register on all PCI bridges
245 while calling ExitBootServices() and passing control to the runtime
246 kernel. System firmware may configure the IOMMU to prevent malicious
247 PCI devices from being able to attack the OS via DMA. However, since
248 firmware can't guarantee that the OS is IOMMU-aware, it will tear
249 down IOMMU configuration when ExitBootServices() is called. This
250 leaves a window between where a hostile device could still cause
251 damage before Linux configures the IOMMU again.
253 If you say Y here, the EFI stub will clear the busmaster bit on all
254 PCI bridges before ExitBootServices() is called. This will prevent
255 any malicious PCI devices from being able to perform DMA until the
256 kernel reenables busmastering after configuring the IOMMU.
258 This option will cause failures with some poorly behaved hardware
259 and should not be enabled without testing. The kernel commandline
260 options "efi=disable_early_pci_dma" or "efi=no_disable_early_pci_dma"
261 may be used to override this option.
265 depends on SERIAL_EARLYCON && !ARM && !IA64
267 select ARCH_USE_MEMREMAP_PROT
269 config EFI_CUSTOM_SSDT_OVERLAYS
270 bool "Load custom ACPI SSDT overlay from an EFI variable"
272 default ACPI_TABLE_UPGRADE
274 Allow loading of an ACPI SSDT overlay from an EFI variable specified
275 by a kernel command line option.
277 See Documentation/admin-guide/acpi/ssdt-overlays.rst for more
280 config EFI_DISABLE_RUNTIME
281 bool "Disable EFI runtime services support by default"
282 default y if PREEMPT_RT
284 Allow to disable the EFI runtime services support by default. This can
285 already be achieved by using the efi=noruntime option, but it could be
286 useful to have this default without any kernel command line parameter.
288 The EFI runtime services are disabled by default when PREEMPT_RT is
289 enabled, because measurements have shown that some EFI functions calls
290 might take too much time to complete, causing large latencies which is
291 an issue for Real-Time kernels.
293 This default can be overridden by using the efi=runtime option.
295 config EFI_COCO_SECRET
296 bool "EFI Confidential Computing Secret Area Support"
298 Confidential Computing platforms (such as AMD SEV) allow the
299 Guest Owner to securely inject secrets during guest VM launch.
300 The secrets are placed in a designated EFI reserved memory area.
302 In order to use the secrets in the kernel, the location of the secret
303 area (as published in the EFI config table) must be kept.
305 If you say Y here, the address of the EFI secret area will be kept
306 for usage inside the kernel. This will allow the
307 virt/coco/efi_secret module to access the secrets, which in turn
308 allows userspace programs to access the injected secrets.
310 config EFI_EMBEDDED_FIRMWARE
312 select CRYPTO_LIB_SHA256
321 depends on UEFI_CPER && ( ARM || ARM64 )
326 depends on UEFI_CPER && X86