1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 204851772SMatt Flemingmenu "EFI (Extensible Firmware Interface) Support" 304851772SMatt Fleming depends on EFI 404851772SMatt Fleming 504851772SMatt Flemingconfig EFI_VARS 604851772SMatt Fleming tristate "EFI Variable Support via sysfs" 7963fabf3SArd Biesheuvel depends on EFI && (X86 || IA64) 804851772SMatt Fleming default n 904851772SMatt Fleming help 1004851772SMatt Fleming If you say Y here, you are able to get EFI (Extensible Firmware 1104851772SMatt Fleming Interface) variable information via sysfs. You may read, 1204851772SMatt Fleming write, create, and destroy EFI variables through this interface. 13963fabf3SArd Biesheuvel Note that this driver is only retained for compatibility with 14963fabf3SArd Biesheuvel legacy users: new users should use the efivarfs filesystem 15963fabf3SArd Biesheuvel instead. 1604851772SMatt Fleming 173846c158SPeter Jonesconfig EFI_ESRT 183846c158SPeter Jones bool 193846c158SPeter Jones depends on EFI && !IA64 203846c158SPeter Jones default y 213846c158SPeter Jones 2204851772SMatt Flemingconfig EFI_VARS_PSTORE 2304851772SMatt Fleming tristate "Register efivars backend for pstore" 24232f4eb6SArd Biesheuvel depends on PSTORE 2504851772SMatt Fleming default y 2604851772SMatt Fleming help 2704851772SMatt Fleming Say Y here to enable use efivars as a backend to pstore. This 2804851772SMatt Fleming will allow writing console messages, crash dumps, or anything 2904851772SMatt Fleming else supported by pstore to EFI variables. 3004851772SMatt Fleming 3104851772SMatt Flemingconfig EFI_VARS_PSTORE_DEFAULT_DISABLE 3204851772SMatt Fleming bool "Disable using efivars as a pstore backend by default" 3304851772SMatt Fleming depends on EFI_VARS_PSTORE 3404851772SMatt Fleming default n 3504851772SMatt Fleming help 3604851772SMatt Fleming Saying Y here will disable the use of efivars as a storage 3704851772SMatt Fleming backend for pstore by default. This setting can be overridden 3804851772SMatt Fleming using the efivars module's pstore_disable parameter. 3904851772SMatt Fleming 40926172d4SDave Youngconfig EFI_RUNTIME_MAP 41926172d4SDave Young bool "Export efi runtime maps to sysfs" 422965faa5SDave Young depends on X86 && EFI && KEXEC_CORE 43926172d4SDave Young default y 44926172d4SDave Young help 45926172d4SDave Young Export efi runtime memory maps to /sys/firmware/efi/runtime-map. 46926172d4SDave Young That memory map is used for example by kexec to set up efi virtual 47926172d4SDave Young mapping the 2nd kernel, but can also be used for debugging purposes. 48926172d4SDave Young 49926172d4SDave Young See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map. 50926172d4SDave Young 510f96a99dSTaku Izumiconfig EFI_FAKE_MEMMAP 520f96a99dSTaku Izumi bool "Enable EFI fake memory map" 530f96a99dSTaku Izumi depends on EFI && X86 540f96a99dSTaku Izumi default n 550f96a99dSTaku Izumi help 560f96a99dSTaku Izumi Saying Y here will enable "efi_fake_mem" boot option. 570f96a99dSTaku Izumi By specifying this parameter, you can add arbitrary attribute 580f96a99dSTaku Izumi to specific memory range by updating original (firmware provided) 590f96a99dSTaku Izumi EFI memmap. 600f96a99dSTaku Izumi This is useful for debugging of EFI memmap related feature. 610f96a99dSTaku Izumi e.g. Address Range Mirroring feature. 620f96a99dSTaku Izumi 630f96a99dSTaku Izumiconfig EFI_MAX_FAKE_MEM 640f96a99dSTaku Izumi int "maximum allowable number of ranges in efi_fake_mem boot option" 650f96a99dSTaku Izumi depends on EFI_FAKE_MEMMAP 660f96a99dSTaku Izumi range 1 128 670f96a99dSTaku Izumi default 8 680f96a99dSTaku Izumi help 690f96a99dSTaku Izumi Maximum allowable number of ranges in efi_fake_mem boot option. 700f96a99dSTaku Izumi Ranges can be set up to this value using comma-separated list. 710f96a99dSTaku Izumi The default value is 8. 720f96a99dSTaku Izumi 73b617c526SDan Williamsconfig EFI_SOFT_RESERVE 74b617c526SDan Williams bool "Reserve EFI Specific Purpose Memory" 75b617c526SDan Williams depends on EFI && EFI_STUB && ACPI_HMAT 76b617c526SDan Williams default ACPI_HMAT 77b617c526SDan Williams help 78b617c526SDan Williams On systems that have mixed performance classes of memory EFI 79b617c526SDan Williams may indicate specific purpose memory with an attribute (See 80b617c526SDan Williams EFI_MEMORY_SP in UEFI 2.8). A memory range tagged with this 81b617c526SDan Williams attribute may have unique performance characteristics compared 82b617c526SDan Williams to the system's general purpose "System RAM" pool. On the 83b617c526SDan Williams expectation that such memory has application specific usage, 84b617c526SDan Williams and its base EFI memory type is "conventional" answer Y to 85b617c526SDan Williams arrange for the kernel to reserve it as a "Soft Reserved" 86b617c526SDan Williams resource, and set aside for direct-access (device-dax) by 87b617c526SDan Williams default. The memory range can later be optionally assigned to 88b617c526SDan Williams the page allocator by system administrator policy via the 89b617c526SDan Williams device-dax kmem facility. Say N to have the kernel treat this 90b617c526SDan Williams memory as "System RAM" by default. 91b617c526SDan Williams 92b617c526SDan Williams If unsure, say Y. 93b617c526SDan Williams 940302f71cSMark Salterconfig EFI_PARAMS_FROM_FDT 950302f71cSMark Salter bool 960302f71cSMark Salter help 970302f71cSMark Salter Select this config option from the architecture Kconfig if 980302f71cSMark Salter the EFI runtime support gets system table address, memory 990302f71cSMark Salter map address, and other parameters from the device tree. 1000302f71cSMark Salter 101022ee6c5SArd Biesheuvelconfig EFI_RUNTIME_WRAPPERS 102022ee6c5SArd Biesheuvel bool 103022ee6c5SArd Biesheuvel 1042e0eb483SAtish Patraconfig EFI_GENERIC_STUB 105f4f75ad5SArd Biesheuvel bool 106f4f75ad5SArd Biesheuvel 1073d7ee348SArd Biesheuvelconfig EFI_ARMSTUB_DTB_LOADER 1083d7ee348SArd Biesheuvel bool "Enable the DTB loader" 109d7071743SAtish Patra depends on EFI_GENERIC_STUB && !RISCV 110d3109593SScott Branden default y 1113d7ee348SArd Biesheuvel help 1123d7ee348SArd Biesheuvel Select this config option to add support for the dtb= command 1133d7ee348SArd Biesheuvel line parameter, allowing a device tree blob to be loaded into 1143d7ee348SArd Biesheuvel memory from the EFI System Partition by the stub. 1153d7ee348SArd Biesheuvel 116d3109593SScott Branden If the device tree is provided by the platform or by 117d3109593SScott Branden the bootloader this option may not be needed. 118d3109593SScott Branden But, for various development reasons and to maintain existing 119d3109593SScott Branden functionality for bootloaders that do not have such support 120d3109593SScott Branden this option is necessary. 1213d7ee348SArd Biesheuvel 122cf6b8366SArd Biesheuvelconfig EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER 1234da0b2b7SArd Biesheuvel bool "Enable the command line initrd loader" if !X86 1244da0b2b7SArd Biesheuvel depends on EFI_STUB && (EFI_GENERIC_STUB || X86) 125cf6b8366SArd Biesheuvel default y 126d7071743SAtish Patra depends on !RISCV 127cf6b8366SArd Biesheuvel help 128cf6b8366SArd Biesheuvel Select this config option to add support for the initrd= command 129cf6b8366SArd Biesheuvel line parameter, allowing an initrd that resides on the same volume 130cf6b8366SArd Biesheuvel as the kernel image to be loaded into memory. 131cf6b8366SArd Biesheuvel 132cf6b8366SArd Biesheuvel This method is deprecated. 133cf6b8366SArd Biesheuvel 13406f7d4a1SCompostella, Jeremyconfig EFI_BOOTLOADER_CONTROL 13506f7d4a1SCompostella, Jeremy tristate "EFI Bootloader Control" 13606f7d4a1SCompostella, Jeremy default n 137a7f7f624SMasahiro Yamada help 13806f7d4a1SCompostella, Jeremy This module installs a reboot hook, such that if reboot() is 13906f7d4a1SCompostella, Jeremy invoked with a string argument NNN, "NNN" is copied to the 14006f7d4a1SCompostella, Jeremy "LoaderEntryOneShot" EFI variable, to be read by the 14106f7d4a1SCompostella, Jeremy bootloader. If the string matches one of the boot labels 14206f7d4a1SCompostella, Jeremy defined in its configuration, the bootloader will boot once 14306f7d4a1SCompostella, Jeremy to that label. The "LoaderEntryRebootReason" EFI variable is 14406f7d4a1SCompostella, Jeremy set with the reboot reason: "reboot" or "shutdown". The 14506f7d4a1SCompostella, Jeremy bootloader reads this reboot reason and takes particular 14606f7d4a1SCompostella, Jeremy action according to its policy. 14706f7d4a1SCompostella, Jeremy 14865117f1aSKweh, Hock Leongconfig EFI_CAPSULE_LOADER 14965117f1aSKweh, Hock Leong tristate "EFI capsule loader" 15065117f1aSKweh, Hock Leong depends on EFI 15165117f1aSKweh, Hock Leong help 15265117f1aSKweh, Hock Leong This option exposes a loader interface "/dev/efi_capsule_loader" for 15365117f1aSKweh, Hock Leong users to load EFI capsules. This driver requires working runtime 15465117f1aSKweh, Hock Leong capsule support in the firmware, which many OEMs do not provide. 15565117f1aSKweh, Hock Leong 15665117f1aSKweh, Hock Leong Most users should say N. 15765117f1aSKweh, Hock Leong 1582959c95dSJan Kiszkaconfig EFI_CAPSULE_QUIRK_QUARK_CSH 1591ae83c5cSMasahiro Yamada bool "Add support for Quark capsules with non-standard headers" 1602959c95dSJan Kiszka depends on X86 && !64BIT 1612959c95dSJan Kiszka select EFI_CAPSULE_LOADER 1622959c95dSJan Kiszka default y 1632959c95dSJan Kiszka help 1642959c95dSJan Kiszka Add support for processing Quark X1000 EFI capsules, whose header 1652959c95dSJan Kiszka layout deviates from the layout mandated by the UEFI specification. 1662959c95dSJan Kiszka 167ff6301daSIvan Huconfig EFI_TEST 168ff6301daSIvan Hu tristate "EFI Runtime Service Tests Support" 169ff6301daSIvan Hu depends on EFI 170ff6301daSIvan Hu default n 171ff6301daSIvan Hu help 172ff6301daSIvan Hu This driver uses the efi.<service> function pointers directly instead 173ff6301daSIvan Hu of going through the efivar API, because it is not trying to test the 174ff6301daSIvan Hu kernel subsystem, just for testing the UEFI runtime service 175ff6301daSIvan Hu interfaces which are provided by the firmware. This driver is used 176ff6301daSIvan Hu by the Firmware Test Suite (FWTS) for testing the UEFI runtime 177ff6301daSIvan Hu interfaces readiness of the firmware. 178ff6301daSIvan Hu Details for FWTS are available from: 179ff6301daSIvan Hu <https://wiki.ubuntu.com/FirmwareTestSuite> 180ff6301daSIvan Hu 181ff6301daSIvan Hu Say Y here to enable the runtime services support via /dev/efi_test. 182ff6301daSIvan Hu If unsure, say N. 183ff6301daSIvan Hu 18458c5475aSLukas Wunnerconfig APPLE_PROPERTIES 18558c5475aSLukas Wunner bool "Apple Device Properties" 18658c5475aSLukas Wunner depends on EFI_STUB && X86 18758c5475aSLukas Wunner select EFI_DEV_PATH_PARSER 18858c5475aSLukas Wunner select UCS2_STRING 18958c5475aSLukas Wunner help 19058c5475aSLukas Wunner Retrieve properties from EFI on Apple Macs and assign them to 19158c5475aSLukas Wunner devices, allowing for improved support of Apple hardware. 19258c5475aSLukas Wunner Properties that would otherwise be missing include the 19358c5475aSLukas Wunner Thunderbolt Device ROM and GPU configuration data. 19458c5475aSLukas Wunner 19558c5475aSLukas Wunner If unsure, say Y if you have a Mac. Otherwise N. 19658c5475aSLukas Wunner 197ccc829baSMatthew Garrettconfig RESET_ATTACK_MITIGATION 198ccc829baSMatthew Garrett bool "Reset memory attack mitigation" 199ccc829baSMatthew Garrett depends on EFI_STUB 200ccc829baSMatthew Garrett help 201ccc829baSMatthew Garrett Request that the firmware clear the contents of RAM after a reboot 202ccc829baSMatthew Garrett using the TCG Platform Reset Attack Mitigation specification. This 203ccc829baSMatthew Garrett protects against an attacker forcibly rebooting the system while it 204ccc829baSMatthew Garrett still contains secrets in RAM, booting another OS and extracting the 205a5c03c31SMatthew Garrett secrets. This should only be enabled when userland is configured to 206a5c03c31SMatthew Garrett clear the MemoryOverwriteRequest flag on clean shutdown after secrets 207a5c03c31SMatthew Garrett have been evicted, since otherwise it will trigger even on clean 208a5c03c31SMatthew Garrett reboots. 209ccc829baSMatthew Garrett 2101c5fecb6SNarendra Kconfig EFI_RCI2_TABLE 2111c5fecb6SNarendra K bool "EFI Runtime Configuration Interface Table Version 2 Support" 2120b6b30c6SNarendra K depends on X86 || COMPILE_TEST 2131c5fecb6SNarendra K help 2141c5fecb6SNarendra K Displays the content of the Runtime Configuration Interface 2151c5fecb6SNarendra K Table version 2 on Dell EMC PowerEdge systems as a binary 2161c5fecb6SNarendra K attribute 'rci2' under /sys/firmware/efi/tables directory. 2171c5fecb6SNarendra K 2181c5fecb6SNarendra K RCI2 table contains BIOS HII in XML format and is used to populate 2191c5fecb6SNarendra K BIOS setup page in Dell EMC OpenManage Server Administrator tool. 2201c5fecb6SNarendra K The BIOS setup page contains BIOS tokens which can be configured. 2211c5fecb6SNarendra K 2221c5fecb6SNarendra K Say Y here for Dell EMC PowerEdge systems. 2231c5fecb6SNarendra K 2244444f854SMatthew Garrettconfig EFI_DISABLE_PCI_DMA 2254444f854SMatthew Garrett bool "Clear Busmaster bit on PCI bridges during ExitBootServices()" 2264444f854SMatthew Garrett help 2274444f854SMatthew Garrett Disable the busmaster bit in the control register on all PCI bridges 2284444f854SMatthew Garrett while calling ExitBootServices() and passing control to the runtime 2294444f854SMatthew Garrett kernel. System firmware may configure the IOMMU to prevent malicious 2304444f854SMatthew Garrett PCI devices from being able to attack the OS via DMA. However, since 2314444f854SMatthew Garrett firmware can't guarantee that the OS is IOMMU-aware, it will tear 2324444f854SMatthew Garrett down IOMMU configuration when ExitBootServices() is called. This 2334444f854SMatthew Garrett leaves a window between where a hostile device could still cause 2344444f854SMatthew Garrett damage before Linux configures the IOMMU again. 2354444f854SMatthew Garrett 2364444f854SMatthew Garrett If you say Y here, the EFI stub will clear the busmaster bit on all 2374444f854SMatthew Garrett PCI bridges before ExitBootServices() is called. This will prevent 2384444f854SMatthew Garrett any malicious PCI devices from being able to perform DMA until the 2394444f854SMatthew Garrett kernel reenables busmastering after configuring the IOMMU. 2404444f854SMatthew Garrett 2414444f854SMatthew Garrett This option will cause failures with some poorly behaved hardware 2424444f854SMatthew Garrett and should not be enabled without testing. The kernel commandline 2434444f854SMatthew Garrett options "efi=disable_early_pci_dma" or "efi=no_disable_early_pci_dma" 2444444f854SMatthew Garrett may be used to override this option. 2454444f854SMatthew Garrett 24604851772SMatt Flemingendmenu 247fce7d3bfSJan Beulich 248f0df68d5SHans de Goedeconfig EFI_EMBEDDED_FIRMWARE 249f0df68d5SHans de Goede bool 250f0df68d5SHans de Goede depends on EFI 251f0df68d5SHans de Goede select CRYPTO_LIB_SHA256 252f0df68d5SHans de Goede 253fce7d3bfSJan Beulichconfig UEFI_CPER 254fce7d3bfSJan Beulich bool 25546cd4b75SLukas Wunner 256c6d8c8efSTyler Baicarconfig UEFI_CPER_ARM 257c6d8c8efSTyler Baicar bool 258c6d8c8efSTyler Baicar depends on UEFI_CPER && ( ARM || ARM64 ) 259c6d8c8efSTyler Baicar default y 260c6d8c8efSTyler Baicar 261f9e1bdb9SYazen Ghannamconfig UEFI_CPER_X86 262f9e1bdb9SYazen Ghannam bool 263f9e1bdb9SYazen Ghannam depends on UEFI_CPER && X86 264f9e1bdb9SYazen Ghannam default y 265f9e1bdb9SYazen Ghannam 26646cd4b75SLukas Wunnerconfig EFI_DEV_PATH_PARSER 26746cd4b75SLukas Wunner bool 26846cd4b75SLukas Wunner depends on ACPI 26946cd4b75SLukas Wunner default n 27069c1f396SArd Biesheuvel 27169c1f396SArd Biesheuvelconfig EFI_EARLYCON 27269c1f396SArd Biesheuvel def_bool y 273*36a23752SGeert Uytterhoeven depends on EFI && SERIAL_EARLYCON && !ARM && !IA64 27469c1f396SArd Biesheuvel select FONT_SUPPORT 27569c1f396SArd Biesheuvel select ARCH_USE_MEMREMAP_PROT 276435d1a47SPeter Jones 277435d1a47SPeter Jonesconfig EFI_CUSTOM_SSDT_OVERLAYS 278435d1a47SPeter Jones bool "Load custom ACPI SSDT overlay from an EFI variable" 2795ee70cd6SArd Biesheuvel depends on EFI && ACPI 280435d1a47SPeter Jones default ACPI_TABLE_UPGRADE 281435d1a47SPeter Jones help 282435d1a47SPeter Jones Allow loading of an ACPI SSDT overlay from an EFI variable specified 283435d1a47SPeter Jones by a kernel command line option. 284435d1a47SPeter Jones 285435d1a47SPeter Jones See Documentation/admin-guide/acpi/ssdt-overlays.rst for more 286435d1a47SPeter Jones information. 287