1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 204851772SMatt Flemingmenu "EFI (Extensible Firmware Interface) Support" 304851772SMatt Fleming depends on EFI 404851772SMatt Fleming 53846c158SPeter Jonesconfig EFI_ESRT 63846c158SPeter Jones bool 73846c158SPeter Jones depends on EFI && !IA64 83846c158SPeter Jones default y 93846c158SPeter Jones 1004851772SMatt Flemingconfig EFI_VARS_PSTORE 1104851772SMatt Fleming tristate "Register efivars backend for pstore" 12232f4eb6SArd Biesheuvel depends on PSTORE 1385974825SArd Biesheuvel select UCS2_STRING 1404851772SMatt Fleming default y 1504851772SMatt Fleming help 1604851772SMatt Fleming Say Y here to enable use efivars as a backend to pstore. This 1704851772SMatt Fleming will allow writing console messages, crash dumps, or anything 1804851772SMatt Fleming else supported by pstore to EFI variables. 1904851772SMatt Fleming 2004851772SMatt Flemingconfig EFI_VARS_PSTORE_DEFAULT_DISABLE 2104851772SMatt Fleming bool "Disable using efivars as a pstore backend by default" 2204851772SMatt Fleming depends on EFI_VARS_PSTORE 2304851772SMatt Fleming default n 2404851772SMatt Fleming help 2504851772SMatt Fleming Saying Y here will disable the use of efivars as a storage 2604851772SMatt Fleming backend for pstore by default. This setting can be overridden 2704851772SMatt Fleming using the efivars module's pstore_disable parameter. 2804851772SMatt Fleming 29926172d4SDave Youngconfig EFI_RUNTIME_MAP 30926172d4SDave Young bool "Export efi runtime maps to sysfs" 312965faa5SDave Young depends on X86 && EFI && KEXEC_CORE 32926172d4SDave Young default y 33926172d4SDave Young help 34926172d4SDave Young Export efi runtime memory maps to /sys/firmware/efi/runtime-map. 35926172d4SDave Young That memory map is used for example by kexec to set up efi virtual 36926172d4SDave Young mapping the 2nd kernel, but can also be used for debugging purposes. 37926172d4SDave Young 38926172d4SDave Young See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map. 39926172d4SDave Young 400f96a99dSTaku Izumiconfig EFI_FAKE_MEMMAP 410f96a99dSTaku Izumi bool "Enable EFI fake memory map" 420f96a99dSTaku Izumi depends on EFI && X86 430f96a99dSTaku Izumi default n 440f96a99dSTaku Izumi help 450f96a99dSTaku Izumi Saying Y here will enable "efi_fake_mem" boot option. 460f96a99dSTaku Izumi By specifying this parameter, you can add arbitrary attribute 470f96a99dSTaku Izumi to specific memory range by updating original (firmware provided) 480f96a99dSTaku Izumi EFI memmap. 490f96a99dSTaku Izumi This is useful for debugging of EFI memmap related feature. 500f96a99dSTaku Izumi e.g. Address Range Mirroring feature. 510f96a99dSTaku Izumi 520f96a99dSTaku Izumiconfig EFI_MAX_FAKE_MEM 530f96a99dSTaku Izumi int "maximum allowable number of ranges in efi_fake_mem boot option" 540f96a99dSTaku Izumi depends on EFI_FAKE_MEMMAP 550f96a99dSTaku Izumi range 1 128 560f96a99dSTaku Izumi default 8 570f96a99dSTaku Izumi help 580f96a99dSTaku Izumi Maximum allowable number of ranges in efi_fake_mem boot option. 590f96a99dSTaku Izumi Ranges can be set up to this value using comma-separated list. 600f96a99dSTaku Izumi The default value is 8. 610f96a99dSTaku Izumi 62b617c526SDan Williamsconfig EFI_SOFT_RESERVE 63b617c526SDan Williams bool "Reserve EFI Specific Purpose Memory" 64b617c526SDan Williams depends on EFI && EFI_STUB && ACPI_HMAT 65b617c526SDan Williams default ACPI_HMAT 66b617c526SDan Williams help 67b617c526SDan Williams On systems that have mixed performance classes of memory EFI 68b617c526SDan Williams may indicate specific purpose memory with an attribute (See 69b617c526SDan Williams EFI_MEMORY_SP in UEFI 2.8). A memory range tagged with this 70b617c526SDan Williams attribute may have unique performance characteristics compared 71b617c526SDan Williams to the system's general purpose "System RAM" pool. On the 72b617c526SDan Williams expectation that such memory has application specific usage, 73b617c526SDan Williams and its base EFI memory type is "conventional" answer Y to 74b617c526SDan Williams arrange for the kernel to reserve it as a "Soft Reserved" 75b617c526SDan Williams resource, and set aside for direct-access (device-dax) by 76b617c526SDan Williams default. The memory range can later be optionally assigned to 77b617c526SDan Williams the page allocator by system administrator policy via the 78b617c526SDan Williams device-dax kmem facility. Say N to have the kernel treat this 79b617c526SDan Williams memory as "System RAM" by default. 80b617c526SDan Williams 81b617c526SDan Williams If unsure, say Y. 82b617c526SDan Williams 8382e0d6d7SBaskov Evgeniyconfig EFI_DXE_MEM_ATTRIBUTES 8482e0d6d7SBaskov Evgeniy bool "Adjust memory attributes in EFISTUB" 8582e0d6d7SBaskov Evgeniy depends on EFI && EFI_STUB && X86 8682e0d6d7SBaskov Evgeniy default y 8782e0d6d7SBaskov Evgeniy help 8882e0d6d7SBaskov Evgeniy UEFI specification does not guarantee all memory to be 8982e0d6d7SBaskov Evgeniy accessible for both write and execute as the kernel expects 9082e0d6d7SBaskov Evgeniy it to be. 9182e0d6d7SBaskov Evgeniy Use DXE services to check and alter memory protection 9282e0d6d7SBaskov Evgeniy attributes during boot via EFISTUB to ensure that memory 9382e0d6d7SBaskov Evgeniy ranges used by the kernel are writable and executable. 9482e0d6d7SBaskov Evgeniy 950302f71cSMark Salterconfig EFI_PARAMS_FROM_FDT 960302f71cSMark Salter bool 970302f71cSMark Salter help 980302f71cSMark Salter Select this config option from the architecture Kconfig if 990302f71cSMark Salter the EFI runtime support gets system table address, memory 1000302f71cSMark Salter map address, and other parameters from the device tree. 1010302f71cSMark Salter 102022ee6c5SArd Biesheuvelconfig EFI_RUNTIME_WRAPPERS 103022ee6c5SArd Biesheuvel bool 104022ee6c5SArd Biesheuvel 1052e0eb483SAtish Patraconfig EFI_GENERIC_STUB 106f4f75ad5SArd Biesheuvel bool 107f4f75ad5SArd Biesheuvel 1083d7ee348SArd Biesheuvelconfig EFI_ARMSTUB_DTB_LOADER 1093d7ee348SArd Biesheuvel bool "Enable the DTB loader" 110*ead384d9SHuacai Chen depends on EFI_GENERIC_STUB && !RISCV && !LOONGARCH 111d3109593SScott Branden default y 1123d7ee348SArd Biesheuvel help 1133d7ee348SArd Biesheuvel Select this config option to add support for the dtb= command 1143d7ee348SArd Biesheuvel line parameter, allowing a device tree blob to be loaded into 1153d7ee348SArd Biesheuvel memory from the EFI System Partition by the stub. 1163d7ee348SArd Biesheuvel 117d3109593SScott Branden If the device tree is provided by the platform or by 118d3109593SScott Branden the bootloader this option may not be needed. 119d3109593SScott Branden But, for various development reasons and to maintain existing 120d3109593SScott Branden functionality for bootloaders that do not have such support 121d3109593SScott Branden this option is necessary. 1223d7ee348SArd Biesheuvel 123cf6b8366SArd Biesheuvelconfig EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER 1244da0b2b7SArd Biesheuvel bool "Enable the command line initrd loader" if !X86 1254da0b2b7SArd Biesheuvel depends on EFI_STUB && (EFI_GENERIC_STUB || X86) 1266edcf9dcSGeert Uytterhoeven default y if X86 127*ead384d9SHuacai Chen depends on !RISCV && !LOONGARCH 128cf6b8366SArd Biesheuvel help 129cf6b8366SArd Biesheuvel Select this config option to add support for the initrd= command 130cf6b8366SArd Biesheuvel line parameter, allowing an initrd that resides on the same volume 131cf6b8366SArd Biesheuvel as the kernel image to be loaded into memory. 132cf6b8366SArd Biesheuvel 133cf6b8366SArd Biesheuvel This method is deprecated. 134cf6b8366SArd Biesheuvel 13506f7d4a1SCompostella, Jeremyconfig EFI_BOOTLOADER_CONTROL 13606f7d4a1SCompostella, Jeremy tristate "EFI Bootloader Control" 137416581e4SArd Biesheuvel select UCS2_STRING 13806f7d4a1SCompostella, Jeremy default n 139a7f7f624SMasahiro Yamada help 14006f7d4a1SCompostella, Jeremy This module installs a reboot hook, such that if reboot() is 14106f7d4a1SCompostella, Jeremy invoked with a string argument NNN, "NNN" is copied to the 14206f7d4a1SCompostella, Jeremy "LoaderEntryOneShot" EFI variable, to be read by the 14306f7d4a1SCompostella, Jeremy bootloader. If the string matches one of the boot labels 14406f7d4a1SCompostella, Jeremy defined in its configuration, the bootloader will boot once 14506f7d4a1SCompostella, Jeremy to that label. The "LoaderEntryRebootReason" EFI variable is 14606f7d4a1SCompostella, Jeremy set with the reboot reason: "reboot" or "shutdown". The 14706f7d4a1SCompostella, Jeremy bootloader reads this reboot reason and takes particular 14806f7d4a1SCompostella, Jeremy action according to its policy. 14906f7d4a1SCompostella, Jeremy 15065117f1aSKweh, Hock Leongconfig EFI_CAPSULE_LOADER 15165117f1aSKweh, Hock Leong tristate "EFI capsule loader" 152e0a6aa30SArd Biesheuvel depends on EFI && !IA64 15365117f1aSKweh, Hock Leong help 15465117f1aSKweh, Hock Leong This option exposes a loader interface "/dev/efi_capsule_loader" for 15565117f1aSKweh, Hock Leong users to load EFI capsules. This driver requires working runtime 15665117f1aSKweh, Hock Leong capsule support in the firmware, which many OEMs do not provide. 15765117f1aSKweh, Hock Leong 15865117f1aSKweh, Hock Leong Most users should say N. 15965117f1aSKweh, Hock Leong 1602959c95dSJan Kiszkaconfig EFI_CAPSULE_QUIRK_QUARK_CSH 1611ae83c5cSMasahiro Yamada bool "Add support for Quark capsules with non-standard headers" 1622959c95dSJan Kiszka depends on X86 && !64BIT 1632959c95dSJan Kiszka select EFI_CAPSULE_LOADER 1642959c95dSJan Kiszka default y 1652959c95dSJan Kiszka help 1662959c95dSJan Kiszka Add support for processing Quark X1000 EFI capsules, whose header 1672959c95dSJan Kiszka layout deviates from the layout mandated by the UEFI specification. 1682959c95dSJan Kiszka 169ff6301daSIvan Huconfig EFI_TEST 170ff6301daSIvan Hu tristate "EFI Runtime Service Tests Support" 171ff6301daSIvan Hu depends on EFI 172ff6301daSIvan Hu default n 173ff6301daSIvan Hu help 174ff6301daSIvan Hu This driver uses the efi.<service> function pointers directly instead 175ff6301daSIvan Hu of going through the efivar API, because it is not trying to test the 176ff6301daSIvan Hu kernel subsystem, just for testing the UEFI runtime service 177ff6301daSIvan Hu interfaces which are provided by the firmware. This driver is used 178ff6301daSIvan Hu by the Firmware Test Suite (FWTS) for testing the UEFI runtime 179ff6301daSIvan Hu interfaces readiness of the firmware. 180ff6301daSIvan Hu Details for FWTS are available from: 181ff6301daSIvan Hu <https://wiki.ubuntu.com/FirmwareTestSuite> 182ff6301daSIvan Hu 183ff6301daSIvan Hu Say Y here to enable the runtime services support via /dev/efi_test. 184ff6301daSIvan Hu If unsure, say N. 185ff6301daSIvan Hu 18675ed63d9SArd Biesheuvelconfig EFI_DEV_PATH_PARSER 18775ed63d9SArd Biesheuvel bool 18875ed63d9SArd Biesheuvel 18958c5475aSLukas Wunnerconfig APPLE_PROPERTIES 19058c5475aSLukas Wunner bool "Apple Device Properties" 19158c5475aSLukas Wunner depends on EFI_STUB && X86 19258c5475aSLukas Wunner select EFI_DEV_PATH_PARSER 19358c5475aSLukas Wunner select UCS2_STRING 19458c5475aSLukas Wunner help 19558c5475aSLukas Wunner Retrieve properties from EFI on Apple Macs and assign them to 19658c5475aSLukas Wunner devices, allowing for improved support of Apple hardware. 19758c5475aSLukas Wunner Properties that would otherwise be missing include the 19858c5475aSLukas Wunner Thunderbolt Device ROM and GPU configuration data. 19958c5475aSLukas Wunner 20058c5475aSLukas Wunner If unsure, say Y if you have a Mac. Otherwise N. 20158c5475aSLukas Wunner 202ccc829baSMatthew Garrettconfig RESET_ATTACK_MITIGATION 203ccc829baSMatthew Garrett bool "Reset memory attack mitigation" 204ccc829baSMatthew Garrett depends on EFI_STUB 205ccc829baSMatthew Garrett help 206ccc829baSMatthew Garrett Request that the firmware clear the contents of RAM after a reboot 207ccc829baSMatthew Garrett using the TCG Platform Reset Attack Mitigation specification. This 208ccc829baSMatthew Garrett protects against an attacker forcibly rebooting the system while it 209ccc829baSMatthew Garrett still contains secrets in RAM, booting another OS and extracting the 210a5c03c31SMatthew Garrett secrets. This should only be enabled when userland is configured to 211a5c03c31SMatthew Garrett clear the MemoryOverwriteRequest flag on clean shutdown after secrets 212a5c03c31SMatthew Garrett have been evicted, since otherwise it will trigger even on clean 213a5c03c31SMatthew Garrett reboots. 214ccc829baSMatthew Garrett 2151c5fecb6SNarendra Kconfig EFI_RCI2_TABLE 2161c5fecb6SNarendra K bool "EFI Runtime Configuration Interface Table Version 2 Support" 2170b6b30c6SNarendra K depends on X86 || COMPILE_TEST 2181c5fecb6SNarendra K help 2191c5fecb6SNarendra K Displays the content of the Runtime Configuration Interface 2201c5fecb6SNarendra K Table version 2 on Dell EMC PowerEdge systems as a binary 2211c5fecb6SNarendra K attribute 'rci2' under /sys/firmware/efi/tables directory. 2221c5fecb6SNarendra K 2231c5fecb6SNarendra K RCI2 table contains BIOS HII in XML format and is used to populate 2241c5fecb6SNarendra K BIOS setup page in Dell EMC OpenManage Server Administrator tool. 2251c5fecb6SNarendra K The BIOS setup page contains BIOS tokens which can be configured. 2261c5fecb6SNarendra K 2271c5fecb6SNarendra K Say Y here for Dell EMC PowerEdge systems. 2281c5fecb6SNarendra K 2294444f854SMatthew Garrettconfig EFI_DISABLE_PCI_DMA 2304444f854SMatthew Garrett bool "Clear Busmaster bit on PCI bridges during ExitBootServices()" 2314444f854SMatthew Garrett help 2324444f854SMatthew Garrett Disable the busmaster bit in the control register on all PCI bridges 2334444f854SMatthew Garrett while calling ExitBootServices() and passing control to the runtime 2344444f854SMatthew Garrett kernel. System firmware may configure the IOMMU to prevent malicious 2354444f854SMatthew Garrett PCI devices from being able to attack the OS via DMA. However, since 2364444f854SMatthew Garrett firmware can't guarantee that the OS is IOMMU-aware, it will tear 2374444f854SMatthew Garrett down IOMMU configuration when ExitBootServices() is called. This 2384444f854SMatthew Garrett leaves a window between where a hostile device could still cause 2394444f854SMatthew Garrett damage before Linux configures the IOMMU again. 2404444f854SMatthew Garrett 2414444f854SMatthew Garrett If you say Y here, the EFI stub will clear the busmaster bit on all 2424444f854SMatthew Garrett PCI bridges before ExitBootServices() is called. This will prevent 2434444f854SMatthew Garrett any malicious PCI devices from being able to perform DMA until the 2444444f854SMatthew Garrett kernel reenables busmastering after configuring the IOMMU. 2454444f854SMatthew Garrett 2464444f854SMatthew Garrett This option will cause failures with some poorly behaved hardware 2474444f854SMatthew Garrett and should not be enabled without testing. The kernel commandline 2484444f854SMatthew Garrett options "efi=disable_early_pci_dma" or "efi=no_disable_early_pci_dma" 2494444f854SMatthew Garrett may be used to override this option. 2504444f854SMatthew Garrett 25169c1f396SArd Biesheuvelconfig EFI_EARLYCON 25269c1f396SArd Biesheuvel def_bool y 25375ed63d9SArd Biesheuvel depends on SERIAL_EARLYCON && !ARM && !IA64 25469c1f396SArd Biesheuvel select FONT_SUPPORT 25569c1f396SArd Biesheuvel select ARCH_USE_MEMREMAP_PROT 256435d1a47SPeter Jones 257435d1a47SPeter Jonesconfig EFI_CUSTOM_SSDT_OVERLAYS 258435d1a47SPeter Jones bool "Load custom ACPI SSDT overlay from an EFI variable" 25975ed63d9SArd Biesheuvel depends on ACPI 260435d1a47SPeter Jones default ACPI_TABLE_UPGRADE 261435d1a47SPeter Jones help 262435d1a47SPeter Jones Allow loading of an ACPI SSDT overlay from an EFI variable specified 263435d1a47SPeter Jones by a kernel command line option. 264435d1a47SPeter Jones 265435d1a47SPeter Jones See Documentation/admin-guide/acpi/ssdt-overlays.rst for more 266435d1a47SPeter Jones information. 267a031651fSJavier Martinez Canillas 268a031651fSJavier Martinez Canillasconfig EFI_DISABLE_RUNTIME 269a031651fSJavier Martinez Canillas bool "Disable EFI runtime services support by default" 270a031651fSJavier Martinez Canillas default y if PREEMPT_RT 271a031651fSJavier Martinez Canillas help 272a031651fSJavier Martinez Canillas Allow to disable the EFI runtime services support by default. This can 273a031651fSJavier Martinez Canillas already be achieved by using the efi=noruntime option, but it could be 274a031651fSJavier Martinez Canillas useful to have this default without any kernel command line parameter. 275a031651fSJavier Martinez Canillas 276a031651fSJavier Martinez Canillas The EFI runtime services are disabled by default when PREEMPT_RT is 277a031651fSJavier Martinez Canillas enabled, because measurements have shown that some EFI functions calls 278a031651fSJavier Martinez Canillas might take too much time to complete, causing large latencies which is 279a031651fSJavier Martinez Canillas an issue for Real-Time kernels. 280a031651fSJavier Martinez Canillas 281a031651fSJavier Martinez Canillas This default can be overridden by using the efi=runtime option. 28212274189SDov Murik 28312274189SDov Murikconfig EFI_COCO_SECRET 28412274189SDov Murik bool "EFI Confidential Computing Secret Area Support" 28512274189SDov Murik help 28612274189SDov Murik Confidential Computing platforms (such as AMD SEV) allow the 28712274189SDov Murik Guest Owner to securely inject secrets during guest VM launch. 28812274189SDov Murik The secrets are placed in a designated EFI reserved memory area. 28912274189SDov Murik 29012274189SDov Murik In order to use the secrets in the kernel, the location of the secret 29112274189SDov Murik area (as published in the EFI config table) must be kept. 29212274189SDov Murik 29312274189SDov Murik If you say Y here, the address of the EFI secret area will be kept 29412274189SDov Murik for usage inside the kernel. This will allow the 29512274189SDov Murik virt/coco/efi_secret module to access the secrets, which in turn 29612274189SDov Murik allows userspace programs to access the injected secrets. 29775ed63d9SArd Biesheuvel 29875ed63d9SArd Biesheuvelconfig EFI_EMBEDDED_FIRMWARE 29975ed63d9SArd Biesheuvel bool 30075ed63d9SArd Biesheuvel select CRYPTO_LIB_SHA256 30175ed63d9SArd Biesheuvel 30275ed63d9SArd Biesheuvelendmenu 30375ed63d9SArd Biesheuvel 30475ed63d9SArd Biesheuvelconfig UEFI_CPER 30575ed63d9SArd Biesheuvel bool 30675ed63d9SArd Biesheuvel 30775ed63d9SArd Biesheuvelconfig UEFI_CPER_ARM 30875ed63d9SArd Biesheuvel bool 30975ed63d9SArd Biesheuvel depends on UEFI_CPER && ( ARM || ARM64 ) 31075ed63d9SArd Biesheuvel default y 31175ed63d9SArd Biesheuvel 31275ed63d9SArd Biesheuvelconfig UEFI_CPER_X86 31375ed63d9SArd Biesheuvel bool 31475ed63d9SArd Biesheuvel depends on UEFI_CPER && X86 31575ed63d9SArd Biesheuvel default y 316