aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gpllib
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-11-30 13:25:00 +0100
committerErwan Velu <erwan.velu@free.fr>2009-12-04 10:11:16 +0100
commit0d9d74e42beb2154f59cedb0109aed65f0b54fc7 (patch)
tree498543308ef32067f1bf70e5ed6779a5b0f27c04 /com32/gpllib
parentdde06e4c981d004fb2227dc8e8a28aa7e099e0ce (diff)
downloadsyslinux-0d9d74e42beb2154f59cedb0109aed65f0b54fc7.tar.gz
syslinux-0d9d74e42beb2154f59cedb0109aed65f0b54fc7.tar.xz
syslinux-0d9d74e42beb2154f59cedb0109aed65f0b54fc7.zip
dmi: Switching processor voltage from V to mV
Impact: Changing units Processor voltage is now millivolts
Diffstat (limited to 'com32/gpllib')
-rw-r--r--com32/gpllib/dmi/dmi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/com32/gpllib/dmi/dmi.c b/com32/gpllib/dmi/dmi.c
index 55b625ae..d3a43a8d 100644
--- a/com32/gpllib/dmi/dmi.c
+++ b/com32/gpllib/dmi/dmi.c
@@ -298,19 +298,19 @@ static void dmi_base_board_features(uint8_t code, s_dmi * dmi)
static void dmi_processor_voltage(uint8_t code, s_dmi * dmi)
{
/* 3.3.5.4 */
- static const float voltage[] = {
- 5.0,
- 3.3,
- 2.9
+ static const uint16_t voltage[] = {
+ 5000,
+ 3300,
+ 2900
};
int i;
if (code & 0x80)
- dmi->processor.voltage = ((float)(code & 0x7f) / 10);
+ dmi->processor.voltage_mv = (code & 0x7f) * 100;
else {
for (i = 0; i <= 2; i++)
if (code & (1 << i))
- dmi->processor.voltage = voltage[i];
+ dmi->processor.voltage_mv = voltage[i];
}
}