summaryrefslogtreecommitdiff
path: root/hw/i386/smbios.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-10-30 13:56:40 +0100
committerMichael S. Tsirkin <mst@redhat.com>2013-12-10 13:29:22 +0200
commitb29ad07ee8ff44115ac9167bba51d1cf59f8649c (patch)
tree78b9ab76e174b37e0da296910d26c357190aed1d /hw/i386/smbios.c
parent026736cebfe0e4a96f0761a2bae62cca92ce2a4e (diff)
downloadqemu-b29ad07ee8ff44115ac9167bba51d1cf59f8649c.tar.gz
smbios: Set system manufacturer, product & version by default
Currently, we get SeaBIOS defaults: manufacturer Bochs, product Bochs, no version. Best SeaBIOS can do, but we can provide better defaults: manufacturer QEMU, product & version taken from QEMUMachine desc and name. Take care to do this only for new machine types, of course. Note: Michael Tsirkin doesn't trust us to keep values of QEMUMachine member product stable in the future. Use copies instead, and in a way that makes it obvious that they're guest ABI. Note that we can be trusted to keep values of member name, because that has always been ABI. Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/smbios.c')
-rw-r--r--hw/i386/smbios.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c
index d3f1ee65c6..e8f41ad435 100644
--- a/hw/i386/smbios.c
+++ b/hw/i386/smbios.c
@@ -256,6 +256,20 @@ static void smbios_build_type_1_fields(void)
}
}
+void smbios_set_type1_defaults(const char *manufacturer,
+ const char *product, const char *version)
+{
+ if (!type1.manufacturer) {
+ type1.manufacturer = manufacturer;
+ }
+ if (!type1.product) {
+ type1.product = product;
+ }
+ if (!type1.version) {
+ type1.version = version;
+ }
+}
+
uint8_t *smbios_get_table(size_t *length)
{
if (!smbios_immutable) {