From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <alistair.francis@wdc.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Bin Meng <bin.meng@windriver.com>,
Weiwei Li <liwei1518@gmail.com>,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Ani Sinha <anisinha@redhat.com>,
qemu-riscv@nongnu.org, qemu-devel@nongnu.org,
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Subject: [PATCH v2 2/4] smbios: function to set default processor family
Date: Fri, 29 Dec 2023 13:07:22 +0100 [thread overview]
Message-ID: <20231229120724.41383-3-heinrich.schuchardt@canonical.com> (raw)
In-Reply-To: <20231229120724.41383-1-heinrich.schuchardt@canonical.com>
Provide a function to set the default processor family.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
v2:
new patch
---
hw/smbios/smbios.c | 7 +++++++
include/hw/firmware/smbios.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index 647bc6d603..03fe736565 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 7f3259a630..6e514982d4 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,
--
2.43.0
next prev parent reply other threads:[~2023-12-29 12:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-29 12:07 [PATCH v2 0/4] target/riscv: SMBIOS support for RISC-V virt machine Heinrich Schuchardt
2023-12-29 12:07 ` [PATCH v2 1/4] smbios: add processor-family option Heinrich Schuchardt
2024-01-05 5:24 ` Alistair Francis
2024-01-05 5:44 ` Heinrich Schuchardt
2024-01-22 4:53 ` Alistair Francis
2024-01-22 4:52 ` Alistair Francis
2024-01-22 9:59 ` Andrew Jones
2023-12-29 12:07 ` Heinrich Schuchardt [this message]
2024-01-22 10:00 ` [PATCH v2 2/4] smbios: function to set default processor family Andrew Jones
2023-12-29 12:07 ` [PATCH v2 3/4] target/riscv: SMBIOS support for RISC-V virt machine Heinrich Schuchardt
2024-01-03 20:40 ` Daniel Henrique Barboza
2024-01-22 9:57 ` Andrew Jones
2024-01-22 12:28 ` Heinrich Schuchardt
2024-01-22 12:59 ` Andrew Jones
2024-01-22 13:22 ` Heinrich Schuchardt
2024-01-25 3:16 ` Alistair Francis
2023-12-29 12:07 ` [PATCH v2 4/4] qemu-options: enable -smbios option on RISC-V Heinrich Schuchardt
2024-01-03 20:40 ` Daniel Henrique Barboza
2024-01-05 5:26 ` Alistair Francis
2024-01-22 10:00 ` Andrew Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231229120724.41383-3-heinrich.schuchardt@canonical.com \
--to=heinrich.schuchardt@canonical.com \
--cc=alistair.francis@wdc.com \
--cc=anisinha@redhat.com \
--cc=bin.meng@windriver.com \
--cc=dbarboza@ventanamicro.com \
--cc=imammedo@redhat.com \
--cc=liwei1518@gmail.com \
--cc=mst@redhat.com \
--cc=palmer@dabbelt.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=zhiwei_liu@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).