[Skiboot] [PATCH] hw/ipmi: Fix FW Boot Progress sensor

Joel Stanley joel at jms.id.au
Thu Apr 9 13:30:07 AEST 2015


Experiments determined that we need to set the assertion bits as well as
the event data bytes.

To verify the sensor is being set on your BMC, use ipmitool to query the
SEL logs:

    $ ipmitool sel list
    System Firmware Progress #0x05 | Motherboard initialization | Asserted
    System Firmware Progress #0x05 | Memory initialization | Asserted
    System Firmware Progress #0x05 | System boot initiated | Asserted

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 hw/ipmi/ipmi-sensor.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/hw/ipmi/ipmi-sensor.c b/hw/ipmi/ipmi-sensor.c
index 7d88637..d890534 100644
--- a/hw/ipmi/ipmi-sensor.c
+++ b/hw/ipmi/ipmi-sensor.c
@@ -21,8 +21,6 @@
 #include <string.h>
 
 #define IPMI_WRITE_SENSOR		(1 << 0)
-#define IPMI_WRITE_EVENT_BYTES		(1 << 7)
-#define IPMI_SET_ASSERTION		(1 << 4)
 
 #define FW_PROGRESS_SENSOR_TYPE	0x0F
 #define BOOT_COUNT_SENSOR_TYPE	0xC3
@@ -85,11 +83,11 @@ int ipmi_set_fw_progress_sensor(uint8_t state)
 	memset(&request, 0, sizeof(request));
 
 	request.sensor_number = fw_sensor_num;
-	request.operation = IPMI_WRITE_EVENT_BYTES;
-	request.assertion_mask[0] = 0x02; /* Firmware progress offset */
+	request.operation = 0xa0; /* Set event data bytes, assertion bits */
+	request.assertion_mask[0] = 0x04; /* Firmware progress offset */
 	request.event_data[1] = state;
 
-	prlog(PR_INFO, "IPMI: fw progress sensor (%02x) to %02x ...\n",
+	prlog(PR_INFO, "IPMI: setting fw progress sensor %02x to %02x\n",
 			request.sensor_number, request.event_data[1]);
 
 	msg = ipmi_mkmsg_simple(IPMI_SET_SENSOR_READING, &request,
-- 
2.1.4



More information about the Skiboot mailing list