acpi,config: Fix SMBIOS 3.0 entry point structure definition
diff --git a/common/lib/acpi.h b/common/lib/acpi.h
index fac5ef24..d0e68031 100644
--- a/common/lib/acpi.h
+++ b/common/lib/acpi.h
@@ -95,10 +95,8 @@ struct smbios_entry_point_64 {
uint8_t docrev;
uint8_t entry_point_revision;
uint8_t reserved;
- /// Size of the largest SMBIOS structure, in bytes, and encompasses the
- /// structureâs formatted area and text strings
- uint16_t max_structure_size;
- uint16_t padding;
+ /// Size of the SMBIOS Structure Table, in bytes.
+ uint32_t table_maximum_size;
/// 64-bit physical starting address of the read-only SMBIOS Structure
/// Table.
uint64_t table_address;
diff --git a/common/lib/config.c b/common/lib/config.c
index 69a335bf..257d5154 100644
--- a/common/lib/config.c
+++ b/common/lib/config.c
@@ -187,9 +187,7 @@ bool init_config_smbios(void) {
if (smbios_entry_64) {
hdr = (void *)(uintptr_t) smbios_entry_64->table_address;
- // SMBIOS 3.0 entry point does not provide table_length.
- // Use a safe maximum bound; iteration terminates on type 127 end marker.
- table_length = 0x10000;
+ table_length = smbios_entry_64->table_maximum_size;
} else {
hdr = (void *)(uintptr_t) smbios_entry_32->table_address;
struct_count = smbios_entry_32->number_of_structures;
