aboutsummaryrefslogtreecommitdiff
path: root/hw/ipmi/ipmi-sensor.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@fr.ibm.com>2016-01-06 09:34:19 +0100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-03-07 18:19:00 +1100
commit67212eb3ca9fed121432b814b5e58fb8d2cfebae (patch)
tree6b693da68cb3c867516394ee7f30ce53eef8c36f /hw/ipmi/ipmi-sensor.c
parent361000f61f3691cc5b970587366f8154610d2771 (diff)
downloadskiboot-67212eb3ca9fed121432b814b5e58fb8d2cfebae.zip
skiboot-67212eb3ca9fed121432b814b5e58fb8d2cfebae.tar.gz
skiboot-67212eb3ca9fed121432b814b5e58fb8d2cfebae.tar.bz2
hw/ipmi: fix event data 1 for System Firmware Progress sensor
The IPMI Specs document (29.7 Event Data Field Formats) describes the Event Data 1 field for discrete sensor as follow : [7:6] - 00b = unspecified byte 2 01b = previous state and/or severity in byte 2 10b = OEM code in byte 2 11b = sensor-specific event extension code in byte 2 [5:4] - 00b = unspecified byte 3 01b = reserved 10b = OEM code in byte 3 11b = sensor-specific event extension code in byte 3 [3:0] - Offset from Event/Reading Code for discrete event state The "System Firmware Progress" offset in the "System Firmware Progress" Sensor being 0x02, we should be using 0xc2 in the event data 1 field. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/ipmi/ipmi-sensor.c')
-rw-r--r--hw/ipmi/ipmi-sensor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ipmi/ipmi-sensor.c b/hw/ipmi/ipmi-sensor.c
index dd63986..cabb745 100644
--- a/hw/ipmi/ipmi-sensor.c
+++ b/hw/ipmi/ipmi-sensor.c
@@ -92,6 +92,7 @@ int ipmi_set_fw_progress_sensor(uint8_t state)
request.sensor_number = fw_sensor_num;
request.operation = 0xa0; /* Set event data bytes, assertion bits */
request.assertion_mask[0] = 0x04; /* Firmware progress offset */
+ request.event_data[0] = 0xc2;
request.event_data[1] = state;
prlog(PR_INFO, "IPMI: setting fw progress sensor %02x to %02x\n",