@@ -499,6 +499,9 @@ static void smbios_build_type_4_table(unsigned instance)
t->l1_cache_handle = 0xFFFF; /* N/A */
t->l2_cache_handle = 0xFFFF; /* N/A */
t->l3_cache_handle = 0xFFFF; /* N/A */
+ SMBIOS_TABLE_SET_STR(4, serial_number_str, type4.serial);
+ SMBIOS_TABLE_SET_STR(4, asset_tag_number_str, type4.asset);
+ SMBIOS_TABLE_SET_STR(4, part_number_str, type4.part);
SMBIOS_BUILD_TABLE_POST;
smbios_type4_count++;
@@ -541,6 +544,11 @@ static void smbios_build_type_17_table(unsigned instance, unsigned size_mb)
SMBIOS_TABLE_SET_STR(17, bank_locator_str, type17.bank);
t->memory_type = 0x07; /* RAM */
t->type_detail = 0; /* hardcoded in SeaBIOS */
+ t->speed = 0; /* Unknown */
+ SMBIOS_TABLE_SET_STR(17, manufacturer_str, type17.manufacturer);
+ SMBIOS_TABLE_SET_STR(17, serial_number_str, type17.serial);
+ SMBIOS_TABLE_SET_STR(17, asset_tag_number_str, type17.asset);
+ SMBIOS_TABLE_SET_STR(17, part_number_str, type17.part);
SMBIOS_BUILD_TABLE_POST;
}
@@ -633,6 +641,7 @@ void smbios_set_defaults(const char *manufacturer,
SMBIOS_SET_DEFAULT(type4.version, version);
*/
SMBIOS_SET_DEFAULT(type17.loc_pfx, "DIMM");
+ SMBIOS_SET_DEFAULT(type17.manufacturer, manufacturer);
}
uint8_t *smbios_get_table(size_t *length)
@@ -100,7 +100,7 @@ struct smbios_type_3 {
/* contained elements follow */
} QEMU_PACKED;
-/* SMBIOS type 4 - Processor Information (v2.0) */
+/* SMBIOS type 4 - Processor Information (v2.3) */
struct smbios_type_4 {
struct smbios_structure_header header;
uint8_t socket_designation_str;
@@ -118,6 +118,10 @@ struct smbios_type_4 {
uint16_t l1_cache_handle;
uint16_t l2_cache_handle;
uint16_t l3_cache_handle;
+ uint8_t serial_number_str;
+ uint8_t asset_tag_number_str;
+ uint8_t part_number_str;
+
} QEMU_PACKED;
/* SMBIOS type 16 - Physical Memory Array
@@ -132,7 +136,7 @@ struct smbios_type_16 {
uint16_t memory_error_information_handle;
uint16_t number_of_memory_devices;
} QEMU_PACKED;
-/* SMBIOS type 17 - Memory Device
+/* SMBIOS type 17 - Memory Device (v2.3)
* Associated with one type 19
*/
struct smbios_type_17 {
@@ -148,6 +152,11 @@ struct smbios_type_17 {
uint8_t bank_locator_str;
uint8_t memory_type;
uint16_t type_detail;
+ uint16_t speed;
+ uint8_t manufacturer_str;
+ uint8_t serial_number_str;
+ uint8_t asset_tag_number_str;
+ uint8_t part_number_str;
} QEMU_PACKED;
/* SMBIOS type 19 - Memory Array Mapped Address */