aboutsummaryrefslogtreecommitdiffstats
path: root/com32
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
parentdde06e4c981d004fb2227dc8e8a28aa7e099e0ce (diff)
downloadsyslinux.git-0d9d74e42beb2154f59cedb0109aed65f0b54fc7.tar.gz
syslinux.git-0d9d74e42beb2154f59cedb0109aed65f0b54fc7.tar.xz
syslinux.git-0d9d74e42beb2154f59cedb0109aed65f0b54fc7.zip
dmi: Switching processor voltage from V to mV
Impact: Changing units Processor voltage is now millivolts
Diffstat (limited to 'com32')
-rw-r--r--com32/gplinclude/dmi/dmi_processor.h2
-rw-r--r--com32/gpllib/dmi/dmi.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/com32/gplinclude/dmi/dmi_processor.h b/com32/gplinclude/dmi/dmi_processor.h
index de2f4e4f..63b8767f 100644
--- a/com32/gplinclude/dmi/dmi_processor.h
+++ b/com32/gplinclude/dmi/dmi_processor.h
@@ -84,7 +84,7 @@ typedef struct {
char family[PROCESSOR_FAMILY_SIZE];
char manufacturer[PROCESSOR_MANUFACTURER_SIZE];
char version[PROCESSOR_VERSION_SIZE];
- float voltage;
+ uint16_t voltage_mv;
uint16_t external_clock;
uint16_t max_speed;
uint16_t current_speed;
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];
}
}