From 60e800bbeec752bd63e8eb557ceb8d0797614f98 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 9 Oct 2024 14:34:51 +0200 Subject: [PATCH] SbsaQemu: update to SMBIOS 3.7 We were saying "SMBIOS 3.4" but structure sizes were from 3.7 one so FWTS complained: FAILED [HIGH] DMIBadTableLength: Test 3, Type 17 expects length of 0x5c, has incorrect length of 0x64 Added all missing fields as well. Signed-off-by: Marcin Juszkiewicz --- Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 2 +- .../SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.c | 26 +++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc index ec6dfa652d..4441f5f101 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc @@ -518,7 +518,7 @@ DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE # # SMBIOS entry point version # - gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0304 + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0307 gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0 gArmTokenSpaceGuid.PcdSystemBiosRelease|0x0100 diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.c index 148ef6e7a7..4635e137fa 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.c +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.c @@ -112,17 +112,21 @@ SMBIOS_TABLE_TYPE17 mMemDevInfoType17 = { 0 // Reserved :10; } }, - 0, // FirwareVersion - 0, // ModuleManufacturerID (unknown) - 0, // ModuleProductID (unknown) - 0, // MemorySubsystemControllerManufacturerID (unknown) - 0, // MemorySubsystemControllerProductID (unknown) - 0, // NonVolatileSize - 0, // VolatileSize; initialized at runtime, refer to MemDevInfoUpdateSmbiosType17 - 0, // CacheSize - 0, // LogicalSize (since MemoryType is not MemoryTypeLogicalNonVolatileDevice) - 0, // ExtendedSpeed - 0 // ExtendedConfiguredMemorySpeed + 0, // FirwareVersion + 0, // ModuleManufacturerID (unknown) + 0, // ModuleProductID (unknown) + 0, // MemorySubsystemControllerManufacturerID (unknown) + 0, // MemorySubsystemControllerProductID (unknown) + 0, // NonVolatileSize + 0, // VolatileSize; initialized at runtime, refer to MemDevInfoUpdateSmbiosType17 + 0, // CacheSize + 0, // LogicalSize (since MemoryType is not MemoryTypeLogicalNonVolatileDevice) + 0, // ExtendedSpeed + 0, // ExtendedConfiguredMemorySpeed + 0, // Pmic0ManufacturerID + 0, // Pmic0RevisionNumber + 0, // RcdManufacturerID + 0, // RcdRevisionNumber }; CHAR8 *mMemDevInfoType17Strings[] = { NULL