7fe8b5c686d2507eb5505024cd10de484df33f3f
[linux-2.6-microblaze.git] / drivers / firmware / efi / Kconfig
1 # SPDX-License-Identifier: GPL-2.0-only
2 menu "EFI (Extensible Firmware Interface) Support"
3         depends on EFI
4
5 config EFI_VARS
6         tristate "EFI Variable Support via sysfs"
7         depends on EFI && (X86 || IA64)
8         default n
9         help
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
15           instead.
16
17 config EFI_ESRT
18         bool
19         depends on EFI && !IA64
20         default y
21
22 config EFI_VARS_PSTORE
23         tristate "Register efivars backend for pstore"
24         depends on PSTORE
25         select UCS2_STRING
26         default y
27         help
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.
31
32 config EFI_VARS_PSTORE_DEFAULT_DISABLE
33         bool "Disable using efivars as a pstore backend by default"
34         depends on EFI_VARS_PSTORE
35         default n
36         help
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.
40
41 config EFI_RUNTIME_MAP
42         bool "Export efi runtime maps to sysfs"
43         depends on X86 && EFI && KEXEC_CORE
44         default y
45         help
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.
49
50           See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map.
51
52 config EFI_FAKE_MEMMAP
53         bool "Enable EFI fake memory map"
54         depends on EFI && X86
55         default n
56         help
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)
60           EFI memmap.
61           This is useful for debugging of EFI memmap related feature.
62           e.g. Address Range Mirroring feature.
63
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
67         range 1 128
68         default 8
69         help
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.
73
74 config EFI_SOFT_RESERVE
75         bool "Reserve EFI Specific Purpose Memory"
76         depends on EFI && EFI_STUB && ACPI_HMAT
77         default ACPI_HMAT
78         help
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.
92
93           If unsure, say Y.
94
95 config EFI_DXE_MEM_ATTRIBUTES
96         bool "Adjust memory attributes in EFISTUB"
97         depends on EFI && EFI_STUB && X86
98         default y
99         help
100           UEFI specification does not guarantee all memory to be
101           accessible for both write and execute as the kernel expects
102           it to be.
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.
106
107 config EFI_PARAMS_FROM_FDT
108         bool
109         help
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.
113
114 config EFI_RUNTIME_WRAPPERS
115         bool
116
117 config EFI_GENERIC_STUB
118         bool
119
120 config EFI_ARMSTUB_DTB_LOADER
121         bool "Enable the DTB loader"
122         depends on EFI_GENERIC_STUB && !RISCV
123         default y
124         help
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.
128
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.
134
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)
138         default y if X86
139         depends on !RISCV
140         help
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.
144
145           This method is deprecated.
146
147 config EFI_BOOTLOADER_CONTROL
148         tristate "EFI Bootloader Control"
149         select UCS2_STRING
150         default n
151         help
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.
161
162 config EFI_CAPSULE_LOADER
163         tristate "EFI capsule loader"
164         depends on EFI && !IA64
165         help
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.
169
170           Most users should say N.
171
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
176         default y
177         help
178           Add support for processing Quark X1000 EFI capsules, whose header
179           layout deviates from the layout mandated by the UEFI specification.
180
181 config EFI_TEST
182         tristate "EFI Runtime Service Tests Support"
183         depends on EFI
184         default n
185         help
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>
194
195           Say Y here to enable the runtime services support via /dev/efi_test.
196           If unsure, say N.
197
198 config EFI_DEV_PATH_PARSER
199         bool
200
201 config APPLE_PROPERTIES
202         bool "Apple Device Properties"
203         depends on EFI_STUB && X86
204         select EFI_DEV_PATH_PARSER
205         select UCS2_STRING
206         help
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.
211
212           If unsure, say Y if you have a Mac.  Otherwise N.
213
214 config RESET_ATTACK_MITIGATION
215         bool "Reset memory attack mitigation"
216         depends on EFI_STUB
217         help
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
225           reboots.
226
227 config EFI_RCI2_TABLE
228         bool "EFI Runtime Configuration Interface Table Version 2 Support"
229         depends on X86 || COMPILE_TEST
230         help
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.
234
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.
238
239           Say Y here for Dell EMC PowerEdge systems.
240
241 config EFI_DISABLE_PCI_DMA
242        bool "Clear Busmaster bit on PCI bridges during ExitBootServices()"
243        help
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.
252
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.
257
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.
262
263 config EFI_EARLYCON
264         def_bool y
265         depends on SERIAL_EARLYCON && !ARM && !IA64
266         select FONT_SUPPORT
267         select ARCH_USE_MEMREMAP_PROT
268
269 config EFI_CUSTOM_SSDT_OVERLAYS
270         bool "Load custom ACPI SSDT overlay from an EFI variable"
271         depends on ACPI
272         default ACPI_TABLE_UPGRADE
273         help
274           Allow loading of an ACPI SSDT overlay from an EFI variable specified
275           by a kernel command line option.
276
277           See Documentation/admin-guide/acpi/ssdt-overlays.rst for more
278           information.
279
280 config EFI_DISABLE_RUNTIME
281         bool "Disable EFI runtime services support by default"
282         default y if PREEMPT_RT
283         help
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.
287
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.
292
293           This default can be overridden by using the efi=runtime option.
294
295 config EFI_COCO_SECRET
296         bool "EFI Confidential Computing Secret Area Support"
297         help
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.
301
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.
304
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.
309
310 config EFI_EMBEDDED_FIRMWARE
311         bool
312         select CRYPTO_LIB_SHA256
313
314 endmenu
315
316 config UEFI_CPER
317         bool
318
319 config UEFI_CPER_ARM
320         bool
321         depends on UEFI_CPER && ( ARM || ARM64 )
322         default y
323
324 config UEFI_CPER_X86
325         bool
326         depends on UEFI_CPER && X86
327         default y