xref: /linux/drivers/firmware/efi/Kconfig (revision b617c5266eedbef2ccbb90931bb9175faa4ae0bc)
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"
704851772SMatt Fleming	depends on EFI
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.
1304851772SMatt Fleming
1404851772SMatt Fleming	  Note that using this driver in concert with efibootmgr requires
1504851772SMatt Fleming	  at least test release version 0.5.0-test3 or later, which is
160e4ca02bSPeter Jones	  available from:
1704851772SMatt Fleming	  <http://linux.dell.com/efibootmgr/testing/efibootmgr-0.5.0-test3.tar.gz>
1804851772SMatt Fleming
1904851772SMatt Fleming	  Subsequent efibootmgr releases may be found at:
200e4ca02bSPeter Jones	  <http://github.com/vathpela/efibootmgr>
2104851772SMatt Fleming
223846c158SPeter Jonesconfig EFI_ESRT
233846c158SPeter Jones	bool
243846c158SPeter Jones	depends on EFI && !IA64
253846c158SPeter Jones	default y
263846c158SPeter Jones
2704851772SMatt Flemingconfig EFI_VARS_PSTORE
2804851772SMatt Fleming	tristate "Register efivars backend for pstore"
2904851772SMatt Fleming	depends on EFI_VARS && PSTORE
3004851772SMatt Fleming	default y
3104851772SMatt Fleming	help
3204851772SMatt Fleming	  Say Y here to enable use efivars as a backend to pstore. This
3304851772SMatt Fleming	  will allow writing console messages, crash dumps, or anything
3404851772SMatt Fleming	  else supported by pstore to EFI variables.
3504851772SMatt Fleming
3604851772SMatt Flemingconfig EFI_VARS_PSTORE_DEFAULT_DISABLE
3704851772SMatt Fleming	bool "Disable using efivars as a pstore backend by default"
3804851772SMatt Fleming	depends on EFI_VARS_PSTORE
3904851772SMatt Fleming	default n
4004851772SMatt Fleming	help
4104851772SMatt Fleming	  Saying Y here will disable the use of efivars as a storage
4204851772SMatt Fleming	  backend for pstore by default. This setting can be overridden
4304851772SMatt Fleming	  using the efivars module's pstore_disable parameter.
4404851772SMatt Fleming
45926172d4SDave Youngconfig EFI_RUNTIME_MAP
46926172d4SDave Young	bool "Export efi runtime maps to sysfs"
472965faa5SDave Young	depends on X86 && EFI && KEXEC_CORE
48926172d4SDave Young	default y
49926172d4SDave Young	help
50926172d4SDave Young	  Export efi runtime memory maps to /sys/firmware/efi/runtime-map.
51926172d4SDave Young	  That memory map is used for example by kexec to set up efi virtual
52926172d4SDave Young	  mapping the 2nd kernel, but can also be used for debugging purposes.
53926172d4SDave Young
54926172d4SDave Young	  See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map.
55926172d4SDave Young
560f96a99dSTaku Izumiconfig EFI_FAKE_MEMMAP
570f96a99dSTaku Izumi	bool "Enable EFI fake memory map"
580f96a99dSTaku Izumi	depends on EFI && X86
590f96a99dSTaku Izumi	default n
600f96a99dSTaku Izumi	help
610f96a99dSTaku Izumi	  Saying Y here will enable "efi_fake_mem" boot option.
620f96a99dSTaku Izumi	  By specifying this parameter, you can add arbitrary attribute
630f96a99dSTaku Izumi	  to specific memory range by updating original (firmware provided)
640f96a99dSTaku Izumi	  EFI memmap.
650f96a99dSTaku Izumi	  This is useful for debugging of EFI memmap related feature.
660f96a99dSTaku Izumi	  e.g. Address Range Mirroring feature.
670f96a99dSTaku Izumi
680f96a99dSTaku Izumiconfig EFI_MAX_FAKE_MEM
690f96a99dSTaku Izumi	int "maximum allowable number of ranges in efi_fake_mem boot option"
700f96a99dSTaku Izumi	depends on EFI_FAKE_MEMMAP
710f96a99dSTaku Izumi	range 1 128
720f96a99dSTaku Izumi	default 8
730f96a99dSTaku Izumi	help
740f96a99dSTaku Izumi	  Maximum allowable number of ranges in efi_fake_mem boot option.
750f96a99dSTaku Izumi	  Ranges can be set up to this value using comma-separated list.
760f96a99dSTaku Izumi	  The default value is 8.
770f96a99dSTaku Izumi
78*b617c526SDan Williamsconfig EFI_SOFT_RESERVE
79*b617c526SDan Williams	bool "Reserve EFI Specific Purpose Memory"
80*b617c526SDan Williams	depends on EFI && EFI_STUB && ACPI_HMAT
81*b617c526SDan Williams	default ACPI_HMAT
82*b617c526SDan Williams	help
83*b617c526SDan Williams	  On systems that have mixed performance classes of memory EFI
84*b617c526SDan Williams	  may indicate specific purpose memory with an attribute (See
85*b617c526SDan Williams	  EFI_MEMORY_SP in UEFI 2.8). A memory range tagged with this
86*b617c526SDan Williams	  attribute may have unique performance characteristics compared
87*b617c526SDan Williams	  to the system's general purpose "System RAM" pool. On the
88*b617c526SDan Williams	  expectation that such memory has application specific usage,
89*b617c526SDan Williams	  and its base EFI memory type is "conventional" answer Y to
90*b617c526SDan Williams	  arrange for the kernel to reserve it as a "Soft Reserved"
91*b617c526SDan Williams	  resource, and set aside for direct-access (device-dax) by
92*b617c526SDan Williams	  default. The memory range can later be optionally assigned to
93*b617c526SDan Williams	  the page allocator by system administrator policy via the
94*b617c526SDan Williams	  device-dax kmem facility. Say N to have the kernel treat this
95*b617c526SDan Williams	  memory as "System RAM" by default.
96*b617c526SDan Williams
97*b617c526SDan Williams	  If unsure, say Y.
98*b617c526SDan Williams
990302f71cSMark Salterconfig EFI_PARAMS_FROM_FDT
1000302f71cSMark Salter	bool
1010302f71cSMark Salter	help
1020302f71cSMark Salter	  Select this config option from the architecture Kconfig if
1030302f71cSMark Salter	  the EFI runtime support gets system table address, memory
1040302f71cSMark Salter          map address, and other parameters from the device tree.
1050302f71cSMark Salter
106022ee6c5SArd Biesheuvelconfig EFI_RUNTIME_WRAPPERS
107022ee6c5SArd Biesheuvel	bool
108022ee6c5SArd Biesheuvel
109f4f75ad5SArd Biesheuvelconfig EFI_ARMSTUB
110f4f75ad5SArd Biesheuvel	bool
111f4f75ad5SArd Biesheuvel
1123d7ee348SArd Biesheuvelconfig EFI_ARMSTUB_DTB_LOADER
1133d7ee348SArd Biesheuvel	bool "Enable the DTB loader"
1143d7ee348SArd Biesheuvel	depends on EFI_ARMSTUB
115d3109593SScott Branden	default y
1163d7ee348SArd Biesheuvel	help
1173d7ee348SArd Biesheuvel	  Select this config option to add support for the dtb= command
1183d7ee348SArd Biesheuvel	  line parameter, allowing a device tree blob to be loaded into
1193d7ee348SArd Biesheuvel	  memory from the EFI System Partition by the stub.
1203d7ee348SArd Biesheuvel
121d3109593SScott Branden	  If the device tree is provided by the platform or by
122d3109593SScott Branden	  the bootloader this option may not be needed.
123d3109593SScott Branden	  But, for various development reasons and to maintain existing
124d3109593SScott Branden	  functionality for bootloaders that do not have such support
125d3109593SScott Branden	  this option is necessary.
1263d7ee348SArd Biesheuvel
12706f7d4a1SCompostella, Jeremyconfig EFI_BOOTLOADER_CONTROL
12806f7d4a1SCompostella, Jeremy	tristate "EFI Bootloader Control"
12906f7d4a1SCompostella, Jeremy	depends on EFI_VARS
13006f7d4a1SCompostella, Jeremy	default n
13106f7d4a1SCompostella, Jeremy	---help---
13206f7d4a1SCompostella, Jeremy	  This module installs a reboot hook, such that if reboot() is
13306f7d4a1SCompostella, Jeremy	  invoked with a string argument NNN, "NNN" is copied to the
13406f7d4a1SCompostella, Jeremy	  "LoaderEntryOneShot" EFI variable, to be read by the
13506f7d4a1SCompostella, Jeremy	  bootloader. If the string matches one of the boot labels
13606f7d4a1SCompostella, Jeremy	  defined in its configuration, the bootloader will boot once
13706f7d4a1SCompostella, Jeremy	  to that label. The "LoaderEntryRebootReason" EFI variable is
13806f7d4a1SCompostella, Jeremy	  set with the reboot reason: "reboot" or "shutdown". The
13906f7d4a1SCompostella, Jeremy	  bootloader reads this reboot reason and takes particular
14006f7d4a1SCompostella, Jeremy	  action according to its policy.
14106f7d4a1SCompostella, Jeremy
14265117f1aSKweh, Hock Leongconfig EFI_CAPSULE_LOADER
14365117f1aSKweh, Hock Leong	tristate "EFI capsule loader"
14465117f1aSKweh, Hock Leong	depends on EFI
14565117f1aSKweh, Hock Leong	help
14665117f1aSKweh, Hock Leong	  This option exposes a loader interface "/dev/efi_capsule_loader" for
14765117f1aSKweh, Hock Leong	  users to load EFI capsules. This driver requires working runtime
14865117f1aSKweh, Hock Leong	  capsule support in the firmware, which many OEMs do not provide.
14965117f1aSKweh, Hock Leong
15065117f1aSKweh, Hock Leong	  Most users should say N.
15165117f1aSKweh, Hock Leong
1522959c95dSJan Kiszkaconfig EFI_CAPSULE_QUIRK_QUARK_CSH
1531ae83c5cSMasahiro Yamada	bool "Add support for Quark capsules with non-standard headers"
1542959c95dSJan Kiszka	depends on X86 && !64BIT
1552959c95dSJan Kiszka	select EFI_CAPSULE_LOADER
1562959c95dSJan Kiszka	default y
1572959c95dSJan Kiszka	help
1582959c95dSJan Kiszka	  Add support for processing Quark X1000 EFI capsules, whose header
1592959c95dSJan Kiszka	  layout deviates from the layout mandated by the UEFI specification.
1602959c95dSJan Kiszka
161ff6301daSIvan Huconfig EFI_TEST
162ff6301daSIvan Hu	tristate "EFI Runtime Service Tests Support"
163ff6301daSIvan Hu	depends on EFI
164ff6301daSIvan Hu	default n
165ff6301daSIvan Hu	help
166ff6301daSIvan Hu	  This driver uses the efi.<service> function pointers directly instead
167ff6301daSIvan Hu	  of going through the efivar API, because it is not trying to test the
168ff6301daSIvan Hu	  kernel subsystem, just for testing the UEFI runtime service
169ff6301daSIvan Hu	  interfaces which are provided by the firmware. This driver is used
170ff6301daSIvan Hu	  by the Firmware Test Suite (FWTS) for testing the UEFI runtime
171ff6301daSIvan Hu	  interfaces readiness of the firmware.
172ff6301daSIvan Hu	  Details for FWTS are available from:
173ff6301daSIvan Hu	  <https://wiki.ubuntu.com/FirmwareTestSuite>
174ff6301daSIvan Hu
175ff6301daSIvan Hu	  Say Y here to enable the runtime services support via /dev/efi_test.
176ff6301daSIvan Hu	  If unsure, say N.
177ff6301daSIvan Hu
17858c5475aSLukas Wunnerconfig APPLE_PROPERTIES
17958c5475aSLukas Wunner	bool "Apple Device Properties"
18058c5475aSLukas Wunner	depends on EFI_STUB && X86
18158c5475aSLukas Wunner	select EFI_DEV_PATH_PARSER
18258c5475aSLukas Wunner	select UCS2_STRING
18358c5475aSLukas Wunner	help
18458c5475aSLukas Wunner	  Retrieve properties from EFI on Apple Macs and assign them to
18558c5475aSLukas Wunner	  devices, allowing for improved support of Apple hardware.
18658c5475aSLukas Wunner	  Properties that would otherwise be missing include the
18758c5475aSLukas Wunner	  Thunderbolt Device ROM and GPU configuration data.
18858c5475aSLukas Wunner
18958c5475aSLukas Wunner	  If unsure, say Y if you have a Mac.  Otherwise N.
19058c5475aSLukas Wunner
191ccc829baSMatthew Garrettconfig RESET_ATTACK_MITIGATION
192ccc829baSMatthew Garrett	bool "Reset memory attack mitigation"
193ccc829baSMatthew Garrett	depends on EFI_STUB
194ccc829baSMatthew Garrett	help
195ccc829baSMatthew Garrett	  Request that the firmware clear the contents of RAM after a reboot
196ccc829baSMatthew Garrett	  using the TCG Platform Reset Attack Mitigation specification. This
197ccc829baSMatthew Garrett	  protects against an attacker forcibly rebooting the system while it
198ccc829baSMatthew Garrett	  still contains secrets in RAM, booting another OS and extracting the
199a5c03c31SMatthew Garrett	  secrets. This should only be enabled when userland is configured to
200a5c03c31SMatthew Garrett	  clear the MemoryOverwriteRequest flag on clean shutdown after secrets
201a5c03c31SMatthew Garrett	  have been evicted, since otherwise it will trigger even on clean
202a5c03c31SMatthew Garrett	  reboots.
203ccc829baSMatthew Garrett
2041c5fecb6SNarendra Kconfig EFI_RCI2_TABLE
2051c5fecb6SNarendra K	bool "EFI Runtime Configuration Interface Table Version 2 Support"
2060b6b30c6SNarendra K	depends on X86 || COMPILE_TEST
2071c5fecb6SNarendra K	help
2081c5fecb6SNarendra K	  Displays the content of the Runtime Configuration Interface
2091c5fecb6SNarendra K	  Table version 2 on Dell EMC PowerEdge systems as a binary
2101c5fecb6SNarendra K	  attribute 'rci2' under /sys/firmware/efi/tables directory.
2111c5fecb6SNarendra K
2121c5fecb6SNarendra K	  RCI2 table contains BIOS HII in XML format and is used to populate
2131c5fecb6SNarendra K	  BIOS setup page in Dell EMC OpenManage Server Administrator tool.
2141c5fecb6SNarendra K	  The BIOS setup page contains BIOS tokens which can be configured.
2151c5fecb6SNarendra K
2161c5fecb6SNarendra K	  Say Y here for Dell EMC PowerEdge systems.
2171c5fecb6SNarendra K
21804851772SMatt Flemingendmenu
219fce7d3bfSJan Beulich
220fce7d3bfSJan Beulichconfig UEFI_CPER
221fce7d3bfSJan Beulich	bool
22246cd4b75SLukas Wunner
223c6d8c8efSTyler Baicarconfig UEFI_CPER_ARM
224c6d8c8efSTyler Baicar	bool
225c6d8c8efSTyler Baicar	depends on UEFI_CPER && ( ARM || ARM64 )
226c6d8c8efSTyler Baicar	default y
227c6d8c8efSTyler Baicar
228f9e1bdb9SYazen Ghannamconfig UEFI_CPER_X86
229f9e1bdb9SYazen Ghannam	bool
230f9e1bdb9SYazen Ghannam	depends on UEFI_CPER && X86
231f9e1bdb9SYazen Ghannam	default y
232f9e1bdb9SYazen Ghannam
23346cd4b75SLukas Wunnerconfig EFI_DEV_PATH_PARSER
23446cd4b75SLukas Wunner	bool
23546cd4b75SLukas Wunner	depends on ACPI
23646cd4b75SLukas Wunner	default n
23769c1f396SArd Biesheuvel
23869c1f396SArd Biesheuvelconfig EFI_EARLYCON
23969c1f396SArd Biesheuvel	def_bool y
24069c1f396SArd Biesheuvel	depends on SERIAL_EARLYCON && !ARM && !IA64
24169c1f396SArd Biesheuvel	select FONT_SUPPORT
24269c1f396SArd Biesheuvel	select ARCH_USE_MEMREMAP_PROT
243