PLDM:JSON change for BootProgress as Host Sensor
In this commit BootProgress is changed as Host Sensor
in the BMC as a responder flow. This commit implements
a change in the JSON structure.
Tested : By using pldmtool PlatformEventMessage is sent and the
Dbus property is verified.
./pldmtool platform getpdr -d 15 -m 9
{
"nextRecordHandle": 0,
"responseCount": 29,
"recordHandle": 15,
"PDRHeaderVersion": 1,
"PDRType": "State Sensor PDR",
"recordChangeNumber": 0,
"dataLength": 19,
"PLDMTerminusHandle": 1,
"sensorID": 4,
"entityType": "32801(OEM)",
"entityInstanceNumber": 0,
"containerID": 0,
"sensorInit": "noInit",
"sensorAuxiliaryNamesPDR": false,
"compositeSensorCount": 1,
"stateSetID[0]": "Boot Progress(196)",
"possibleStatesSize[0]": 3,
"possibleStates[0]": " 1 2 7 9 21"
}
root@w74-emmc-tacoma:~# obmcutil state
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.On
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Running
BootProgress : xyz.openbmc_project.State.Boot.Progress.ProgressStages.SystemInitComplete
OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive
pldmtool raw --data 0x80 0x02 0x0A 0x01 0xD0 0x00 0x04 0x00 0x01 0x00 0x09 0x01
Request Message:
08 01 80 02 0a 01 d0 00 04 00 01 00 09 01
Response Message:
08 01 00 02 0a 00 00
root@w74-emmc-tacoma:~# obmcutil state
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.On
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Running
BootProgress : xyz.openbmc_project.State.Boot.Progress.ProgressStages.PCIInit
OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive
pldmtool raw --data 0x80 0x02 0x0A 0x01 0xD0 0x00 0x04 0x00 0x01 0x00 0x01 0x01
Request Message:
08 01 80 02 0a 01 d0 00 04 00 01 00 01 01
Response Message:
08 01 00 02 0a 00 00
root@w74-emmc-tacoma:~# obmcutil state
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.On
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Running
BootProgress : xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified
OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
Change-Id: I28a2bd40b6d0c2eed683e92871833f5664c1220e
diff --git a/configurations/events/stateSensorPdrs.json b/configurations/events/stateSensorPdrs.json
index ab6126a..75c5b92 100644
--- a/configurations/events/stateSensorPdrs.json
+++ b/configurations/events/stateSensorPdrs.json
@@ -1,35 +1,38 @@
{
- "sensorPDRs": [
+ "entries": [
{
- "pdrType" : 4,
- "entries" : [{
- "type" : 33,
- "instance" : 0,
- "container" : 0,
- "effecters" : [{
- "set" : {
- "id" : 196,
- "size" : 4,
- "states" : [1,2,3,5,9,21,22,26]
- },
- "dbus" : {
- "path": "/xyz/openbmc_project/state/host0",
- "interface": "xyz.openbmc_project.State.Boot.Progress",
- "property_name": "BootProgress",
- "property_type": "string",
- "property_values": [
- "xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified",
- "xyz.openbmc_project.State.Boot.Progress.ProgressStages.SystemInitComplete",
- "xyz.openbmc_project.State.Boot.Progress.ProgressStages.MemoryInit",
- "xyz.openbmc_project.State.Boot.Progress.ProgressStages.SecondaryProcInit",
- "xyz.openbmc_project.State.Boot.Progress.ProgressStages.PCIInit",
- "xyz.openbmc_project.State.Boot.Progress.ProgressStages.OSRunning",
- "xyz.openbmc_project.State.Boot.Progress.ProgressStages.BusInit",
- "xyz.openbmc_project.State.Boot.Progress.ProgressStages.PrimaryProcInit"
- ]
- }
- }]
- }]
- }]
+ "containerID":0,
+ "entityType":32801,
+ "entityInstance":0,
+ "sensorOffset":0,
+ "event_states": [
+ 1,
+ 2,
+ 3,
+ 5,
+ 7,
+ 9,
+ 21,
+ 22,
+ 26
+ ],
+ "dbus" : {
+ "object_path": "/xyz/openbmc_project/state/host0",
+ "interface": "xyz.openbmc_project.State.Boot.Progress",
+ "property_name": "BootProgress",
+ "property_type": "string",
+ "property_values": [
+ "xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified",
+ "xyz.openbmc_project.State.Boot.Progress.ProgressStages.SystemInitComplete",
+ "xyz.openbmc_project.State.Boot.Progress.ProgressStages.MemoryInit",
+ "xyz.openbmc_project.State.Boot.Progress.ProgressStages.SecondaryProcInit",
+ "xyz.openbmc_project.State.Boot.Progress.ProgressStages.SystemSetup",
+ "xyz.openbmc_project.State.Boot.Progress.ProgressStages.PCIInit",
+ "xyz.openbmc_project.State.Boot.Progress.ProgressStages.OSRunning",
+ "xyz.openbmc_project.State.Boot.Progress.ProgressStages.BusInit",
+ "xyz.openbmc_project.State.Boot.Progress.ProgressStages.PrimaryProcInit"
+ ]
+ }
+ }
+ ]
}
-