diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-01-23 19:42:27 +0100 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2024-02-09 20:43:14 +1000 |
commit | 6f3b727bcc867688034ef1489a58e958142973b1 (patch) | |
tree | b3cd4c562d6b98a4a2802a1bce82c06cdae21f38 | |
parent | b5831d79671cea3f7bd42cffab93fe6eab8c3db0 (diff) | |
download | qemu-6f3b727bcc867688034ef1489a58e958142973b1.zip qemu-6f3b727bcc867688034ef1489a58e958142973b1.tar.gz qemu-6f3b727bcc867688034ef1489a58e958142973b1.tar.bz2 |
smbios: function to set default processor family
Provide a function to set the default processor family.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Message-ID: <20240123184229.10415-3-heinrich.schuchardt@canonical.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
-rw-r--r-- | hw/smbios/smbios.c | 7 | ||||
-rw-r--r-- | include/hw/firmware/smbios.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 647bc6d..c0c5a81 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -989,6 +989,13 @@ void smbios_set_cpuid(uint32_t version, uint32_t features) field = value; \ } +void smbios_set_default_processor_family(uint16_t processor_family) +{ + if (type4.processor_family <= 0x01) { + type4.processor_family = processor_family; + } +} + void smbios_set_defaults(const char *manufacturer, const char *product, const char *version, bool legacy_mode, bool uuid_encoded, SmbiosEntryPointType ep_type) diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h index 7f3259a..6e51498 100644 --- a/include/hw/firmware/smbios.h +++ b/include/hw/firmware/smbios.h @@ -295,6 +295,7 @@ void smbios_set_cpuid(uint32_t version, uint32_t features); void smbios_set_defaults(const char *manufacturer, const char *product, const char *version, bool legacy_mode, bool uuid_encoded, SmbiosEntryPointType ep_type); +void smbios_set_default_processor_family(uint16_t processor_family); uint8_t *smbios_get_table_legacy(MachineState *ms, size_t *length); void smbios_get_tables(MachineState *ms, const struct smbios_phys_mem_area *mem_array, |