Commit a MaintenanceProcedure log entry on a 0xDE SEL record
In the case of a procedure callout, HB sends a eSEL of 0xDF type.
It is followed by a Add SEL record with OEM record type 0xDE
and byte 11 in the record indicate the procedure associated
with the eSEL.
Resolves openbmc/openbmc#2368
Change-Id: Ia57f423c9d533cd8968b613d7522b409a9820198
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 8d9e93d..9052b6f 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -578,7 +578,19 @@
// Pack the actual response
memcpy(response, &p->eventdata[1], 2);
- send_esel(recordid);
+ // Hostboot sends SEL with OEM record type 0xDE to indicate that there is
+ // a maintenance procedure associated with eSEL record.
+ static constexpr auto procedureType = 0xDE;
+ if (p->recordtype == procedureType)
+ {
+ // In the OEM record type 0xDE, byte 11 in the SEL record indicate the
+ // procedure number.
+ createProcedureLogEntry(p->sensortype);
+ }
+ else
+ {
+ send_esel(recordid);
+ }
return rc;
}