Skip to content

Commit e1ccbbc

Browse files
author
Ard Biesheuvel
committed
efi: dmi: add support for SMBIOS 3.0 UEFI configuration table
This adds support to the UEFI side for detecting the presence of a SMBIOS 3.0 64-bit entry point. This allows the actual SMBIOS structure table to reside at a physical offset over 4 GB, which cannot be supported by the legacy SMBIOS 32-bit entry point. Since the firmware can legally provide both entry points, store the SMBIOS 3.0 entry point in a separate variable, and let the DMI decoding layer decide which one will be used. Tested-by: Suravee Suthikulpanit <[email protected]> Acked-by: Leif Lindholm <[email protected]> Acked-by: Matt Fleming <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent 4e27d47 commit e1ccbbc

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

drivers/firmware/efi/efi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ struct efi __read_mostly efi = {
3030
.acpi = EFI_INVALID_TABLE_ADDR,
3131
.acpi20 = EFI_INVALID_TABLE_ADDR,
3232
.smbios = EFI_INVALID_TABLE_ADDR,
33+
.smbios3 = EFI_INVALID_TABLE_ADDR,
3334
.sal_systab = EFI_INVALID_TABLE_ADDR,
3435
.boot_info = EFI_INVALID_TABLE_ADDR,
3536
.hcdp = EFI_INVALID_TABLE_ADDR,
@@ -86,6 +87,8 @@ static ssize_t systab_show(struct kobject *kobj,
8687
str += sprintf(str, "ACPI=0x%lx\n", efi.acpi);
8788
if (efi.smbios != EFI_INVALID_TABLE_ADDR)
8889
str += sprintf(str, "SMBIOS=0x%lx\n", efi.smbios);
90+
if (efi.smbios3 != EFI_INVALID_TABLE_ADDR)
91+
str += sprintf(str, "SMBIOS3=0x%lx\n", efi.smbios3);
8992
if (efi.hcdp != EFI_INVALID_TABLE_ADDR)
9093
str += sprintf(str, "HCDP=0x%lx\n", efi.hcdp);
9194
if (efi.boot_info != EFI_INVALID_TABLE_ADDR)
@@ -260,6 +263,7 @@ static __initdata efi_config_table_type_t common_tables[] = {
260263
{MPS_TABLE_GUID, "MPS", &efi.mps},
261264
{SAL_SYSTEM_TABLE_GUID, "SALsystab", &efi.sal_systab},
262265
{SMBIOS_TABLE_GUID, "SMBIOS", &efi.smbios},
266+
{SMBIOS3_TABLE_GUID, "SMBIOS 3.0", &efi.smbios3},
263267
{UGA_IO_PROTOCOL_GUID, "UGA", &efi.uga},
264268
{NULL_GUID, NULL, NULL},
265269
};

drivers/xen/efi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ static const struct efi efi_xen __initconst = {
294294
.acpi = EFI_INVALID_TABLE_ADDR,
295295
.acpi20 = EFI_INVALID_TABLE_ADDR,
296296
.smbios = EFI_INVALID_TABLE_ADDR,
297+
.smbios3 = EFI_INVALID_TABLE_ADDR,
297298
.sal_systab = EFI_INVALID_TABLE_ADDR,
298299
.boot_info = EFI_INVALID_TABLE_ADDR,
299300
.hcdp = EFI_INVALID_TABLE_ADDR,

include/linux/efi.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,9 @@ void efi_native_runtime_setup(void);
547547
#define SMBIOS_TABLE_GUID \
548548
EFI_GUID( 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d )
549549

550+
#define SMBIOS3_TABLE_GUID \
551+
EFI_GUID( 0xf2fd1544, 0x9794, 0x4a2c, 0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 )
552+
550553
#define SAL_SYSTEM_TABLE_GUID \
551554
EFI_GUID( 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d )
552555

@@ -810,7 +813,8 @@ extern struct efi {
810813
unsigned long mps; /* MPS table */
811814
unsigned long acpi; /* ACPI table (IA64 ext 0.71) */
812815
unsigned long acpi20; /* ACPI table (ACPI 2.0) */
813-
unsigned long smbios; /* SM BIOS table */
816+
unsigned long smbios; /* SMBIOS table (32 bit entry point) */
817+
unsigned long smbios3; /* SMBIOS table (64 bit entry point) */
814818
unsigned long sal_systab; /* SAL system table */
815819
unsigned long boot_info; /* boot info table */
816820
unsigned long hcdp; /* HCDP table */

0 commit comments

Comments
 (0)