Skip to content
Commit 50304da5 authored by Jayashankar Padath's avatar Jayashankar Padath Committed by Jayashankar Padath
Browse files

pdr: Sensor/Effecter support for enc fault and identify leds



This is to support sensor/effecter pdrs for enclosure fault led
and enclosure identify led.

Testing Result:

EFFECTER:

Enclosure Identify Use Cases:

pldmtool platform GetPDR -d 55
{
    "nextRecordHandle": 56,
    "responseCount": 29,
    "recordHandle": 55,
    "PDRHeaderVersion": 1,
    "PDRType": "State Effecter PDR",
    "recordChangeNumber": 0,
    "dataLength": 19,
    "PLDMTerminusHandle": 1,
    "effecterID": 2,
    "entityType": "System chassis (main enclosure)",
    "entityInstanceNumber": 0,
    "containerID": 0,
    "effecterSemanticID": 0,
    "effecterInit": "noInit",
    "effecterDescriptionPDR": false,
    "compositeEffecterCount": 1,
    "stateSetID[0]": "17",
    "possibleStatesSize[0]": 1,
    "possibleStates[0]": " 1 2"
}

Set On:
pldmtool raw -d 0x80 0x02 0x39 0x02 0x00 0x01 0x01 0x01
Request Message:
08 01 80 02 39 02 00 01 01 01
Response Message:
08 01 00 02 39 00

busctl get-property xyz.openbmc_project.LED.GroupManager
/xyz/openbmc_project/led/groups/enclosure_identify
xyz.openbmc_project.Led.Group Asserted
b true

Set Off:
pldmtool raw -d 0x80 0x02 0x39 0x02 0x00 0x01 0x01 0x02
Request Message:
08 01 80 02 39 02 00 01 01 02
Response Message:
08 01 00 02 39 00

busctl get-property xyz.openbmc_project.LED.GroupManager
/xyz/openbmc_project/led/groups/enclosure_identify
xyz.openbmc_project.Led.Group Asserted
b false

Enclosure Fault Use Cases:

pldmtool platform GetPDR -d 56
{
    "nextRecordHandle": 57,
    "responseCount": 29,
    "recordHandle": 56,
    "PDRHeaderVersion": 1,
    "PDRType": "State Effecter PDR",
    "recordChangeNumber": 0,
    "dataLength": 19,
    "PLDMTerminusHandle": 1,
    "effecterID": 3,
    "entityType": "System chassis (main enclosure)",
    "entityInstanceNumber": 0,
    "containerID": 0,
    "effecterSemanticID": 0,
    "effecterInit": "noInit",
    "effecterDescriptionPDR": false,
    "compositeEffecterCount": 1,
    "stateSetID[0]": "10",
    "possibleStatesSize[0]": 1,
    "possibleStates[0]": " 1 2"
}

Set state as On:
pldmtool raw -d 0x80 0x02 0x39 0x03 0x00 0x01 0x01 0x01
Request Message:
08 01 80 02 39 03 00 01 01 01
Response Message:
08 01 00 02 39 00

busctl get-property xyz.openbmc_project.LED.GroupManager
/xyz/openbmc_project/led/groups/enclosure_fault
xyz.openbmc_project.Led.Group Asserted
b true

Set state as Off:
pldmtool raw -d 0x80 0x02 0x39 0x03 0x00 0x01 0x01 0x02
Request Message:
08 01 80 02 39 03 00 01 01 02
Response Message:
08 01 00 02 39 00

busctl get-property xyz.openbmc_project.LED.GroupManager
/xyz/openbmc_project/led/groups/enclosure_fault
xyz.openbmc_project.Led.Group Asserted
b false

SENSOR:

Enc Identify Use Cases:

pldmtool platform GetPDR -d 24
{
    "nextRecordHandle": 25,
    "responseCount": 27,
    "recordHandle": 24,
    "PDRHeaderVersion": 1,
    "PDRType": "State Sensor PDR",
    "recordChangeNumber": 0,
    "dataLength": 17,
    "PLDMTerminusHandle": 0,
    "sensorID": 3,
    "entityType": "System chassis (main enclosure)",
    "entityInstanceNumber": 0,
    "containerID": 0,
    "sensorInit": "noInit",
    "sensorAuxiliaryNamesPDR": false,
    "compositeSensorCount": 1,
    "stateSetID[0]": "17",
    "possibleStatesSize[0]": 1,
    "possibleStates[0]": " 1 2"
}

Set On:
busctl set-property xyz.openbmc_project.LED.Controller.virtual_enc_id
/xyz/openbmc_project/led/physical/virtual_enc_id xyz.openbmc_project.Led.Physical
State s "xyz.openbmc_project.Led.Physical.Action.On"
pldmtool raw --data 0x80 0x02 0x21 0x03 0x00 0x01 0x00
Request Message:
08 01 80 02 21 03 00 01 00
Response Message:
08 01 00 02 21 00 01 00 01 00 01

Set Off:
busctl set-property xyz.openbmc_project.LED.Controller.virtual_enc_id
/xyz/openbmc_project/led/physical/virtual_enc_id xyz.openbmc_project.Led.Physical
State s "xyz.openbmc_project.Led.Physical.Action.Off"

pldmtool raw --data 0x80 0x02 0x21 0x03 0x00 0x01 0x00
Request Message:
08 01 80 02 21 03 00 01 00
Response Message:
08 01 00 02 21 00 01 00 01 00 02

Enc Fault Use Cases:

pldmtool platform GetPDR -d 25
{
    "nextRecordHandle": 26,
    "responseCount": 27,
    "recordHandle": 25,
    "PDRHeaderVersion": 1,
    "PDRType": "State Sensor PDR",
    "recordChangeNumber": 0,
    "dataLength": 17,
    "PLDMTerminusHandle": 0,
    "sensorID": 4,
    "entityType": "System chassis (main enclosure)",
    "entityInstanceNumber": 0,
    "containerID": 0,
    "sensorInit": "noInit",
    "sensorAuxiliaryNamesPDR": false,
    "compositeSensorCount": 1,
    "stateSetID[0]": "10",
    "possibleStatesSize[0]": 1,
    "possibleStates[0]": " 1 2"
}

Set On:
busctl set-property xyz.openbmc_project.LED.Controller.virtual_enc_fault
/xyz/openbmc_project/led/physical/virtual_enc_fault xyz.openbmc_project.Led.Physical
State s "xyz.openbmc_project.Led.Physical.Action.On"
pldmtool raw --data 0x80 0x02 0x21 0x04 0x00 0x01 0x00
Request Message:
08 01 80 02 21 04 00 01 00
Response Message:
08 01 00 02 21 00 01 00 01 00 01

Set Off:
busctl set-property xyz.openbmc_project.LED.Controller.virtual_enc_fault
/xyz/openbmc_project/led/physical/virtual_enc_fault xyz.openbmc_project.Led.Physical
State s "xyz.openbmc_project.Led.Physical.Action.Off"
pldmtool raw --data 0x80 0x02 0x21 0x04 0x00 0x01 0x00
Request Message:
08 01 80 02 21 04 00 01 00
Response Message:
08 01 00 02 21 00 01 00 01 00 02

Signed-off-by: default avatarJayashankar Padath <jayashankar.padath@in.ibm.com>
Change-Id: Id9ae0ce5bba1c1a63d3de20daa22571d24a8d9f2
parent 06f34416
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment