Skip to contentSkip to conversation

SMBIOS: Build full type 4 tables

PATCH Superseded Gabriel L. Somlo 1 participant 1 message Mar 10, 2014

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 9/10 SMBIOS: Build full type 4 tables

Build full smbios type 4 (processor information) tables, and make them available to the bios via fw_cfg.

---
 hw/i386/pc.c     |  7 +++++
 hw/i386/smbios.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 99 insertions(+)
hw/i386/pc.c +7 -0
index e715a33..6d85dca 100644
@@ -979,6 +979,9 @@ void pc_hot_add_cpu(const int64_t id, Error **errp)
     pc_new_cpu(current_cpu_model, apic_id, icc_bridge, errp);
 }
 
+/* smbios type 4 (processor information) needs these */
+extern uint32_t smbios_cpuid_version, smbios_cpuid_features;
+
 void pc_cpus_init(const char *cpu_model, DeviceState *icc_bridge)
 {
     int i;
@@ -1011,6 +1014,10 @@ void pc_cpus_init(const char *cpu_model, DeviceState *icc_bridge)
         sysbus_mmio_map_overlap(SYS_BUS_DEVICE(icc_bridge), 0,
                                 APIC_DEFAULT_ADDRESS, 0x1000);
     }
+
+    /* tell smbios about cpuid version and features */
+    smbios_cpuid_version = cpu->env.cpuid_version;
+    smbios_cpuid_features = cpu->env.features[FEAT_1_EDX];
 }
 
 /* pci-info ROM file. Little endian format */
hw/i386/smbios.c +92 -0

137 lines not on this page · raw message

Signature · 1 line
1.8.1.4