Skip to content

Commit 435d1a4

Browse files
vathpelaardbiesheuvel
authored andcommitted
efi: Make it possible to disable efivar_ssdt entirely
In most cases, such as CONFIG_ACPI_CUSTOM_DSDT and CONFIG_ACPI_TABLE_UPGRADE, boot-time modifications to firmware tables are tied to specific Kconfig options. Currently this is not the case for modifying the ACPI SSDT via the efivar_ssdt kernel command line option and associated EFI variable. This patch adds CONFIG_EFI_CUSTOM_SSDT_OVERLAYS, which defaults disabled, in order to allow enabling or disabling that feature during the build. Cc: <[email protected]> Signed-off-by: Peter Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent 8c0a839 commit 435d1a4

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

drivers/firmware/efi/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,3 +278,14 @@ config EFI_EARLYCON
278278
depends on SERIAL_EARLYCON && !ARM && !IA64
279279
select FONT_SUPPORT
280280
select ARCH_USE_MEMREMAP_PROT
281+
282+
config EFI_CUSTOM_SSDT_OVERLAYS
283+
bool "Load custom ACPI SSDT overlay from an EFI variable"
284+
depends on EFI_VARS && ACPI
285+
default ACPI_TABLE_UPGRADE
286+
help
287+
Allow loading of an ACPI SSDT overlay from an EFI variable specified
288+
by a kernel command line option.
289+
290+
See Documentation/admin-guide/acpi/ssdt-overlays.rst for more
291+
information.

drivers/firmware/efi/efi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static void generic_ops_unregister(void)
189189
efivars_unregister(&generic_efivars);
190190
}
191191

192-
#if IS_ENABLED(CONFIG_ACPI)
192+
#ifdef CONFIG_EFI_CUSTOM_SSDT_OVERLAYS
193193
#define EFIVAR_SSDT_NAME_MAX 16
194194
static char efivar_ssdt[EFIVAR_SSDT_NAME_MAX] __initdata;
195195
static int __init efivar_ssdt_setup(char *str)

0 commit comments

Comments
 (0)