Kconfig 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menu "EFI (Extensible Firmware Interface) Support"
  3. depends on EFI
  4. config EFI_ESRT
  5. bool
  6. depends on EFI && !IA64
  7. default y
  8. config EFI_VARS_PSTORE
  9. tristate "Register efivars backend for pstore"
  10. depends on PSTORE
  11. select UCS2_STRING
  12. default y
  13. help
  14. Say Y here to enable use efivars as a backend to pstore. This
  15. will allow writing console messages, crash dumps, or anything
  16. else supported by pstore to EFI variables.
  17. config EFI_VARS_PSTORE_DEFAULT_DISABLE
  18. bool "Disable using efivars as a pstore backend by default"
  19. depends on EFI_VARS_PSTORE
  20. default n
  21. help
  22. Saying Y here will disable the use of efivars as a storage
  23. backend for pstore by default. This setting can be overridden
  24. using the efivars module's pstore_disable parameter.
  25. config EFI_RUNTIME_MAP
  26. bool "Export efi runtime maps to sysfs"
  27. depends on X86 && EFI && KEXEC_CORE
  28. default y
  29. help
  30. Export efi runtime memory maps to /sys/firmware/efi/runtime-map.
  31. That memory map is used for example by kexec to set up efi virtual
  32. mapping the 2nd kernel, but can also be used for debugging purposes.
  33. See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map.
  34. config EFI_FAKE_MEMMAP
  35. bool "Enable EFI fake memory map"
  36. depends on EFI && X86
  37. default n
  38. help
  39. Saying Y here will enable "efi_fake_mem" boot option.
  40. By specifying this parameter, you can add arbitrary attribute
  41. to specific memory range by updating original (firmware provided)
  42. EFI memmap.
  43. This is useful for debugging of EFI memmap related feature.
  44. e.g. Address Range Mirroring feature.
  45. config EFI_MAX_FAKE_MEM
  46. int "maximum allowable number of ranges in efi_fake_mem boot option"
  47. depends on EFI_FAKE_MEMMAP
  48. range 1 128
  49. default 8
  50. help
  51. Maximum allowable number of ranges in efi_fake_mem boot option.
  52. Ranges can be set up to this value using comma-separated list.
  53. The default value is 8.
  54. config EFI_SOFT_RESERVE
  55. bool "Reserve EFI Specific Purpose Memory"
  56. depends on EFI && EFI_STUB && ACPI_HMAT
  57. default ACPI_HMAT
  58. help
  59. On systems that have mixed performance classes of memory EFI
  60. may indicate specific purpose memory with an attribute (See
  61. EFI_MEMORY_SP in UEFI 2.8). A memory range tagged with this
  62. attribute may have unique performance characteristics compared
  63. to the system's general purpose "System RAM" pool. On the
  64. expectation that such memory has application specific usage,
  65. and its base EFI memory type is "conventional" answer Y to
  66. arrange for the kernel to reserve it as a "Soft Reserved"
  67. resource, and set aside for direct-access (device-dax) by
  68. default. The memory range can later be optionally assigned to
  69. the page allocator by system administrator policy via the
  70. device-dax kmem facility. Say N to have the kernel treat this
  71. memory as "System RAM" by default.
  72. If unsure, say Y.
  73. config EFI_DXE_MEM_ATTRIBUTES
  74. bool "Adjust memory attributes in EFISTUB"
  75. depends on EFI && EFI_STUB && X86
  76. default y
  77. help
  78. UEFI specification does not guarantee all memory to be
  79. accessible for both write and execute as the kernel expects
  80. it to be.
  81. Use DXE services to check and alter memory protection
  82. attributes during boot via EFISTUB to ensure that memory
  83. ranges used by the kernel are writable and executable.
  84. config EFI_PARAMS_FROM_FDT
  85. bool
  86. help
  87. Select this config option from the architecture Kconfig if
  88. the EFI runtime support gets system table address, memory
  89. map address, and other parameters from the device tree.
  90. config EFI_RUNTIME_WRAPPERS
  91. bool
  92. config EFI_GENERIC_STUB
  93. bool
  94. config EFI_ZBOOT
  95. bool "Enable the generic EFI decompressor"
  96. depends on EFI_GENERIC_STUB && !ARM
  97. select HAVE_KERNEL_GZIP
  98. select HAVE_KERNEL_LZ4
  99. select HAVE_KERNEL_LZMA
  100. select HAVE_KERNEL_LZO
  101. select HAVE_KERNEL_XZ
  102. select HAVE_KERNEL_ZSTD
  103. help
  104. Create the bootable image as an EFI application that carries the
  105. actual kernel image in compressed form, and decompresses it into
  106. memory before executing it via LoadImage/StartImage EFI boot service
  107. calls. For compatibility with non-EFI loaders, the payload can be
  108. decompressed and executed by the loader as well, provided that the
  109. loader implements the decompression algorithm and that non-EFI boot
  110. is supported by the encapsulated image. (The compression algorithm
  111. used is described in the zboot image header)
  112. config EFI_ARMSTUB_DTB_LOADER
  113. bool "Enable the DTB loader"
  114. depends on EFI_GENERIC_STUB && !RISCV && !LOONGARCH
  115. default y
  116. help
  117. Select this config option to add support for the dtb= command
  118. line parameter, allowing a device tree blob to be loaded into
  119. memory from the EFI System Partition by the stub.
  120. If the device tree is provided by the platform or by
  121. the bootloader this option may not be needed.
  122. But, for various development reasons and to maintain existing
  123. functionality for bootloaders that do not have such support
  124. this option is necessary.
  125. config EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER
  126. bool "Enable the command line initrd loader" if !X86
  127. depends on EFI_STUB && (EFI_GENERIC_STUB || X86)
  128. default y if X86
  129. depends on !RISCV && !LOONGARCH
  130. help
  131. Select this config option to add support for the initrd= command
  132. line parameter, allowing an initrd that resides on the same volume
  133. as the kernel image to be loaded into memory.
  134. This method is deprecated.
  135. config 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. config EFI_CAPSULE_LOADER
  150. tristate "EFI capsule loader"
  151. depends on EFI && !IA64
  152. help
  153. This option exposes a loader interface "/dev/efi_capsule_loader" for
  154. users to load EFI capsules. This driver requires working runtime
  155. capsule support in the firmware, which many OEMs do not provide.
  156. Most users should say N.
  157. config EFI_CAPSULE_QUIRK_QUARK_CSH
  158. bool "Add support for Quark capsules with non-standard headers"
  159. depends on X86 && !64BIT
  160. select EFI_CAPSULE_LOADER
  161. default y
  162. help
  163. Add support for processing Quark X1000 EFI capsules, whose header
  164. layout deviates from the layout mandated by the UEFI specification.
  165. config EFI_TEST
  166. tristate "EFI Runtime Service Tests Support"
  167. depends on EFI
  168. default n
  169. help
  170. This driver uses the efi.<service> function pointers directly instead
  171. of going through the efivar API, because it is not trying to test the
  172. kernel subsystem, just for testing the UEFI runtime service
  173. interfaces which are provided by the firmware. This driver is used
  174. by the Firmware Test Suite (FWTS) for testing the UEFI runtime
  175. interfaces readiness of the firmware.
  176. Details for FWTS are available from:
  177. <https://wiki.ubuntu.com/FirmwareTestSuite>
  178. Say Y here to enable the runtime services support via /dev/efi_test.
  179. If unsure, say N.
  180. config EFI_DEV_PATH_PARSER
  181. bool
  182. config APPLE_PROPERTIES
  183. bool "Apple Device Properties"
  184. depends on EFI_STUB && X86
  185. select EFI_DEV_PATH_PARSER
  186. select UCS2_STRING
  187. help
  188. Retrieve properties from EFI on Apple Macs and assign them to
  189. devices, allowing for improved support of Apple hardware.
  190. Properties that would otherwise be missing include the
  191. Thunderbolt Device ROM and GPU configuration data.
  192. If unsure, say Y if you have a Mac. Otherwise N.
  193. config RESET_ATTACK_MITIGATION
  194. bool "Reset memory attack mitigation"
  195. depends on EFI_STUB
  196. help
  197. Request that the firmware clear the contents of RAM after a reboot
  198. using the TCG Platform Reset Attack Mitigation specification. This
  199. protects against an attacker forcibly rebooting the system while it
  200. still contains secrets in RAM, booting another OS and extracting the
  201. secrets. This should only be enabled when userland is configured to
  202. clear the MemoryOverwriteRequest flag on clean shutdown after secrets
  203. have been evicted, since otherwise it will trigger even on clean
  204. reboots.
  205. config EFI_RCI2_TABLE
  206. bool "EFI Runtime Configuration Interface Table Version 2 Support"
  207. depends on X86 || COMPILE_TEST
  208. help
  209. Displays the content of the Runtime Configuration Interface
  210. Table version 2 on Dell EMC PowerEdge systems as a binary
  211. attribute 'rci2' under /sys/firmware/efi/tables directory.
  212. RCI2 table contains BIOS HII in XML format and is used to populate
  213. BIOS setup page in Dell EMC OpenManage Server Administrator tool.
  214. The BIOS setup page contains BIOS tokens which can be configured.
  215. Say Y here for Dell EMC PowerEdge systems.
  216. config EFI_DISABLE_PCI_DMA
  217. bool "Clear Busmaster bit on PCI bridges during ExitBootServices()"
  218. help
  219. Disable the busmaster bit in the control register on all PCI bridges
  220. while calling ExitBootServices() and passing control to the runtime
  221. kernel. System firmware may configure the IOMMU to prevent malicious
  222. PCI devices from being able to attack the OS via DMA. However, since
  223. firmware can't guarantee that the OS is IOMMU-aware, it will tear
  224. down IOMMU configuration when ExitBootServices() is called. This
  225. leaves a window between where a hostile device could still cause
  226. damage before Linux configures the IOMMU again.
  227. If you say Y here, the EFI stub will clear the busmaster bit on all
  228. PCI bridges before ExitBootServices() is called. This will prevent
  229. any malicious PCI devices from being able to perform DMA until the
  230. kernel reenables busmastering after configuring the IOMMU.
  231. This option will cause failures with some poorly behaved hardware
  232. and should not be enabled without testing. The kernel commandline
  233. options "efi=disable_early_pci_dma" or "efi=no_disable_early_pci_dma"
  234. may be used to override this option.
  235. config EFI_EARLYCON
  236. def_bool y
  237. depends on SERIAL_EARLYCON && !ARM && !IA64
  238. select FONT_SUPPORT
  239. select ARCH_USE_MEMREMAP_PROT
  240. config EFI_CUSTOM_SSDT_OVERLAYS
  241. bool "Load custom ACPI SSDT overlay from an EFI variable"
  242. depends on ACPI
  243. default ACPI_TABLE_UPGRADE
  244. help
  245. Allow loading of an ACPI SSDT overlay from an EFI variable specified
  246. by a kernel command line option.
  247. See Documentation/admin-guide/acpi/ssdt-overlays.rst for more
  248. information.
  249. config EFI_DISABLE_RUNTIME
  250. bool "Disable EFI runtime services support by default"
  251. default y if PREEMPT_RT
  252. help
  253. Allow to disable the EFI runtime services support by default. This can
  254. already be achieved by using the efi=noruntime option, but it could be
  255. useful to have this default without any kernel command line parameter.
  256. The EFI runtime services are disabled by default when PREEMPT_RT is
  257. enabled, because measurements have shown that some EFI functions calls
  258. might take too much time to complete, causing large latencies which is
  259. an issue for Real-Time kernels.
  260. This default can be overridden by using the efi=runtime option.
  261. config EFI_COCO_SECRET
  262. bool "EFI Confidential Computing Secret Area Support"
  263. help
  264. Confidential Computing platforms (such as AMD SEV) allow the
  265. Guest Owner to securely inject secrets during guest VM launch.
  266. The secrets are placed in a designated EFI reserved memory area.
  267. In order to use the secrets in the kernel, the location of the secret
  268. area (as published in the EFI config table) must be kept.
  269. If you say Y here, the address of the EFI secret area will be kept
  270. for usage inside the kernel. This will allow the
  271. virt/coco/efi_secret module to access the secrets, which in turn
  272. allows userspace programs to access the injected secrets.
  273. config EFI_EMBEDDED_FIRMWARE
  274. bool
  275. select CRYPTO_LIB_SHA256
  276. endmenu
  277. config UEFI_CPER
  278. bool
  279. config UEFI_CPER_ARM
  280. bool
  281. depends on UEFI_CPER && ( ARM || ARM64 )
  282. default y
  283. config UEFI_CPER_X86
  284. bool
  285. depends on UEFI_CPER && X86
  286. default y