Commit 1c5fecb6 authored by Narendra K's avatar Narendra K Committed by Ard Biesheuvel
Browse files

efi: Export Runtime Configuration Interface table to sysfs



System firmware advertises the address of the 'Runtime
Configuration Interface table version 2 (RCI2)' via
an EFI Configuration Table entry. This code retrieves the RCI2
table from the address and exports it to sysfs as a binary
attribute 'rci2' under /sys/firmware/efi/tables directory.
The approach adopted is similar to the attribute 'DMI' under
/sys/firmware/dmi/tables.

RCI2 table contains BIOS HII in XML format and is used to populate
BIOS setup page in Dell EMC OpenManage Server Administrator tool.
The BIOS setup page contains BIOS tokens which can be configured.

Signed-off-by: default avatarNarendra K <Narendra.K@dell.com>
Reviewed-by: default avatarMario Limonciello <mario.limonciello@dell.com>
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
parent 5828efb9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -28,3 +28,11 @@ Description: Displays the physical addresses of all EFI Configuration
		versions are always printed first, i.e. ACPI20 comes
		before ACPI.
Users:		dmidecode

What:		/sys/firmware/efi/tables/rci2
Date:		July 2019
Contact:	Narendra K <Narendra.K@dell.com>, linux-bugs@dell.com
Description:	Displays the content of the Runtime Configuration Interface
		Table version 2 on Dell EMC PowerEdge systems in binary format
Users:		It is used by Dell EMC OpenManage Server Administrator tool to
		populate BIOS setup page.
+3 −0
Original line number Diff line number Diff line
@@ -82,6 +82,9 @@ static const unsigned long * const efi_tables[] = {
	&efi.esrt,
	&efi.properties_table,
	&efi.mem_attr_table,
#ifdef CONFIG_EFI_RCI2_TABLE
	&rci2_table_phys,
#endif
};

u64 efi_setup;		/* efi setup_data physical address */
+13 −0
Original line number Diff line number Diff line
@@ -180,6 +180,19 @@ config RESET_ATTACK_MITIGATION
	  have been evicted, since otherwise it will trigger even on clean
	  reboots.

config EFI_RCI2_TABLE
	bool "EFI Runtime Configuration Interface Table Version 2 Support"
	help
	  Displays the content of the Runtime Configuration Interface
	  Table version 2 on Dell EMC PowerEdge systems as a binary
	  attribute 'rci2' under /sys/firmware/efi/tables directory.

	  RCI2 table contains BIOS HII in XML format and is used to populate
	  BIOS setup page in Dell EMC OpenManage Server Administrator tool.
	  The BIOS setup page contains BIOS tokens which can be configured.

	  Say Y here for Dell EMC PowerEdge systems.

endmenu

config UEFI_CPER
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ obj-$(CONFIG_EFI_BOOTLOADER_CONTROL) += efibc.o
obj-$(CONFIG_EFI_TEST)			+= test/
obj-$(CONFIG_EFI_DEV_PATH_PARSER)	+= dev-path-parser.o
obj-$(CONFIG_APPLE_PROPERTIES)		+= apple-properties.o
obj-$(CONFIG_EFI_RCI2_TABLE)		+= rci2-table.o

arm-obj-$(CONFIG_EFI)			:= arm-init.o arm-runtime.o
obj-$(CONFIG_ARM)			+= $(arm-obj-y)
+3 −0
Original line number Diff line number Diff line
@@ -465,6 +465,9 @@ static __initdata efi_config_table_type_t common_tables[] = {
	{LINUX_EFI_TPM_EVENT_LOG_GUID, "TPMEventLog", &efi.tpm_log},
	{LINUX_EFI_TPM_FINAL_LOG_GUID, "TPMFinalLog", &efi.tpm_final_log},
	{LINUX_EFI_MEMRESERVE_TABLE_GUID, "MEMRESERVE", &efi.mem_reserve},
#ifdef CONFIG_EFI_RCI2_TABLE
	{DELLEMC_EFI_RCI2_TABLE_GUID, NULL, &rci2_table_phys},
#endif
	{NULL_GUID, NULL, NULL},
};

Loading