aboutsummaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorGabriel L. Somlo <gsomlo@gmail.com>2014-05-19 10:09:55 -0400
committerMichael S. Tsirkin <mst@redhat.com>2014-05-21 15:47:50 +0300
commit0d73394ad93aa12755316b3a90b3193aeeb95f90 (patch)
tree49638615f5506b68dad6b1a923bf13e2a5d2f257 /hw/i386
parent84351843eba330022e245a742899cf71fc817ec5 (diff)
SMBIOS: Fix type 17 field sizes
Fields for configured_clock_speed and various voltage values introduced in spec v2.7+ should be "word", i.e. 16 bits. Reported-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/smbios.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c
index 17938215f6..b3bedde8b9 100644
--- a/hw/i386/smbios.c
+++ b/hw/i386/smbios.c
@@ -683,10 +683,10 @@ static void smbios_build_type_17_table(unsigned instance, ram_addr_t size)
SMBIOS_TABLE_SET_STR(17, asset_tag_number_str, type17.asset);
SMBIOS_TABLE_SET_STR(17, part_number_str, type17.part);
t->attributes = 0; /* Unknown */
- t->configured_clock_speed = cpu_to_le32(0); /* Unknown */
- t->minimum_voltage = cpu_to_le32(0); /* Unknown */
- t->maximum_voltage = cpu_to_le32(0); /* Unknown */
- t->configured_voltage = cpu_to_le32(0); /* Unknown */
+ t->configured_clock_speed = cpu_to_le16(0); /* Unknown */
+ t->minimum_voltage = cpu_to_le16(0); /* Unknown */
+ t->maximum_voltage = cpu_to_le16(0); /* Unknown */
+ t->configured_voltage = cpu_to_le16(0); /* Unknown */
SMBIOS_BUILD_TABLE_POST;
}