From: Simon Glass <sjg@chromium.org>
Check for both GUIDs when looking for the SMBIOS tables. This allows
both table versions to be detected when running from OVMF.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
---
(no changes since v1)
lib/efi_client/efi_app.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
@@ -164,7 +164,8 @@ static void free_memory(struct efi_priv *priv)
static void scan_tables(struct efi_system_table *sys_table)
{
efi_guid_t acpi = EFI_ACPI_TABLE_GUID;
- efi_guid_t smbios = SMBIOS3_TABLE_GUID;
+ efi_guid_t smbios = SMBIOS_TABLE_GUID;
+ efi_guid_t smbios3 = SMBIOS3_TABLE_GUID;
uint i;
for (i = 0; i < sys_table->nr_tables; i++) {
@@ -172,8 +173,9 @@ static void scan_tables(struct efi_system_table *sys_table)
if (!memcmp(&tab->guid, &acpi, sizeof(efi_guid_t)))
gd_set_acpi_start(map_to_sysmem(tab->table));
- else if (!memcmp(&tab->guid, &smbios, sizeof(efi_guid_t)))
- gd->arch.smbios_start = map_to_sysmem(tab->table);
+ else if (!memcmp(&tab->guid, &smbios, sizeof(efi_guid_t)) ||
+ !memcmp(&tab->guid, &smbios3, sizeof(efi_guid_t)))
+ gd_set_smbios_start(map_to_sysmem(tab->table));
}
}