Message ID | 1413987713-30528-8-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show |
On Wed, 22 Oct, at 04:21:50PM, Ard Biesheuvel wrote: > 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> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > --- > drivers/firmware/efi/efi.c | 4 ++++ > include/linux/efi.h | 6 +++++- > 2 files changed, 9 insertions(+), 1 deletion(-) Looks like you might also need to change driver/xen/efi.c to set EFI_INVALID_TABLE_ADDR for the new table address?
On 27 October 2014 16:26, Matt Fleming <matt@console-pimps.org> wrote: > On Wed, 22 Oct, at 04:21:50PM, Ard Biesheuvel wrote: >> 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> >> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> >> --- >> drivers/firmware/efi/efi.c | 4 ++++ >> include/linux/efi.h | 6 +++++- >> 2 files changed, 9 insertions(+), 1 deletion(-) > > Looks like you might also need to change driver/xen/efi.c to set > EFI_INVALID_TABLE_ADDR for the new table address? > You're quite right. Will add it in v2
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 8590099ac148..9035c1b74d58 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -30,6 +30,7 @@ struct efi __read_mostly efi = { .acpi = EFI_INVALID_TABLE_ADDR, .acpi20 = EFI_INVALID_TABLE_ADDR, .smbios = EFI_INVALID_TABLE_ADDR, + .smbios3 = EFI_INVALID_TABLE_ADDR, .sal_systab = EFI_INVALID_TABLE_ADDR, .boot_info = EFI_INVALID_TABLE_ADDR, .hcdp = EFI_INVALID_TABLE_ADDR, @@ -86,6 +87,8 @@ static ssize_t systab_show(struct kobject *kobj, str += sprintf(str, "ACPI=0x%lx\n", efi.acpi); if (efi.smbios != EFI_INVALID_TABLE_ADDR) str += sprintf(str, "SMBIOS=0x%lx\n", efi.smbios); + if (efi.smbios3 != EFI_INVALID_TABLE_ADDR) + str += sprintf(str, "SMBIOS3=0x%lx\n", efi.smbios3); if (efi.hcdp != EFI_INVALID_TABLE_ADDR) str += sprintf(str, "HCDP=0x%lx\n", efi.hcdp); if (efi.boot_info != EFI_INVALID_TABLE_ADDR) @@ -260,6 +263,7 @@ static __initdata efi_config_table_type_t common_tables[] = { {MPS_TABLE_GUID, "MPS", &efi.mps}, {SAL_SYSTEM_TABLE_GUID, "SALsystab", &efi.sal_systab}, {SMBIOS_TABLE_GUID, "SMBIOS", &efi.smbios}, + {SMBIOS3_TABLE_GUID, "SMBIOS 3.0", &efi.smbios3}, {UGA_IO_PROTOCOL_GUID, "UGA", &efi.uga}, {NULL_GUID, NULL, NULL}, }; diff --git a/include/linux/efi.h b/include/linux/efi.h index 0949f9c7e872..27d69388ded0 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -547,6 +547,9 @@ void efi_native_runtime_setup(void); #define SMBIOS_TABLE_GUID \ EFI_GUID( 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) +#define SMBIOS3_TABLE_GUID \ + EFI_GUID( 0xf2fd1544, 0x9794, 0x4a2c, 0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 ) + #define SAL_SYSTEM_TABLE_GUID \ EFI_GUID( 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) @@ -810,7 +813,8 @@ extern struct efi { unsigned long mps; /* MPS table */ unsigned long acpi; /* ACPI table (IA64 ext 0.71) */ unsigned long acpi20; /* ACPI table (ACPI 2.0) */ - unsigned long smbios; /* SM BIOS table */ + unsigned long smbios; /* SM BIOS table (32 bit entry point) */ + unsigned long smbios3; /* SM BIOS table (64 bit entry point) */ unsigned long sal_systab; /* SAL system table */ unsigned long boot_info; /* boot info table */ unsigned long hcdp; /* HCDP table */