@@ -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,
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@jms.id.au> --- hw/ipmi/ipmi-sensor.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)