Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <suravee.suthikulpanit@amd.com>
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

+10 -1
+4
drivers/firmware/efi/efi.c
··· 30 30 .acpi = EFI_INVALID_TABLE_ADDR, 31 31 .acpi20 = EFI_INVALID_TABLE_ADDR, 32 32 .smbios = EFI_INVALID_TABLE_ADDR, 33 + .smbios3 = EFI_INVALID_TABLE_ADDR, 33 34 .sal_systab = EFI_INVALID_TABLE_ADDR, 34 35 .boot_info = EFI_INVALID_TABLE_ADDR, 35 36 .hcdp = EFI_INVALID_TABLE_ADDR, ··· 87 86 str += sprintf(str, "ACPI=0x%lx\n", efi.acpi); 88 87 if (efi.smbios != EFI_INVALID_TABLE_ADDR) 89 88 str += sprintf(str, "SMBIOS=0x%lx\n", efi.smbios); 89 + if (efi.smbios3 != EFI_INVALID_TABLE_ADDR) 90 + str += sprintf(str, "SMBIOS3=0x%lx\n", efi.smbios3); 90 91 if (efi.hcdp != EFI_INVALID_TABLE_ADDR) 91 92 str += sprintf(str, "HCDP=0x%lx\n", efi.hcdp); 92 93 if (efi.boot_info != EFI_INVALID_TABLE_ADDR) ··· 263 260 {MPS_TABLE_GUID, "MPS", &efi.mps}, 264 261 {SAL_SYSTEM_TABLE_GUID, "SALsystab", &efi.sal_systab}, 265 262 {SMBIOS_TABLE_GUID, "SMBIOS", &efi.smbios}, 263 + {SMBIOS3_TABLE_GUID, "SMBIOS 3.0", &efi.smbios3}, 266 264 {UGA_IO_PROTOCOL_GUID, "UGA", &efi.uga}, 267 265 {NULL_GUID, NULL, NULL}, 268 266 };
+1
drivers/xen/efi.c
··· 294 294 .acpi = EFI_INVALID_TABLE_ADDR, 295 295 .acpi20 = EFI_INVALID_TABLE_ADDR, 296 296 .smbios = EFI_INVALID_TABLE_ADDR, 297 + .smbios3 = EFI_INVALID_TABLE_ADDR, 297 298 .sal_systab = EFI_INVALID_TABLE_ADDR, 298 299 .boot_info = EFI_INVALID_TABLE_ADDR, 299 300 .hcdp = EFI_INVALID_TABLE_ADDR,
+5 -1
include/linux/efi.h
··· 547 547 #define SMBIOS_TABLE_GUID \ 548 548 EFI_GUID( 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) 549 549 550 + #define SMBIOS3_TABLE_GUID \ 551 + EFI_GUID( 0xf2fd1544, 0x9794, 0x4a2c, 0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 ) 552 + 550 553 #define SAL_SYSTEM_TABLE_GUID \ 551 554 EFI_GUID( 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) 552 555 ··· 813 810 unsigned long mps; /* MPS table */ 814 811 unsigned long acpi; /* ACPI table (IA64 ext 0.71) */ 815 812 unsigned long acpi20; /* ACPI table (ACPI 2.0) */ 816 - unsigned long smbios; /* SM BIOS table */ 813 + unsigned long smbios; /* SMBIOS table (32 bit entry point) */ 814 + unsigned long smbios3; /* SMBIOS table (64 bit entry point) */ 817 815 unsigned long sal_systab; /* SAL system table */ 818 816 unsigned long boot_info; /* boot info table */ 819 817 unsigned long hcdp; /* HCDP table */