libpldmresponder & pldmtool : Expand support for GetPLDMCommands
Update newly available pldm commands for bios and platform.
Resolves : https://github.com/openbmc/pldm/issues/9
Tested on latest BMC environment.
$ pldmtool base GetPLDMCommands -t 3
[
{
"PLDM Command Code": 1,
"PLDM Command": "GetBIOSTable"
},
{
"PLDM Command Code": 2,
"PLDM Command": "SetBIOSTable"
},
{
"PLDM Command Code": 7,
"PLDM Command": "SetBIOSAttributeCurrentValue"
},
{
"PLDM Command Code": 8,
"PLDM Command": "GetBIOSAttributeCurrentValueByHandle"
},
{
"PLDM Command Code": 12,
"PLDM Command": "GetDateTime"
},
{
"PLDM Command Code": 13,
"PLDM Command": "SetDateTime"
}
]
$ pldmtool base GetPLDMCommands -t 2
[
{
"PLDM Command Code": 4,
"PLDM Command": "SetEventReceiver"
},
{
"PLDM Command Code": 10,
"PLDM Command": "PlatformEventMessage"
},
{
"PLDM Command Code": 17,
"PLDM Command": "GetSensorReading"
},
{
"PLDM Command Code": 33,
"PLDM Command": "GetStateSensorReadings"
},
{
"PLDM Command Code": 49,
"PLDM Command": "SetNumericEffecterValue"
},
{
"PLDM Command Code": 50,
"PLDM Command": "GetNumericEffecterValue"
},
{
"PLDM Command Code": 57,
"PLDM Command": "SetStateEffecterStates"
},
{
"PLDM Command Code": 81,
"PLDM Command": "GetPDR"
}
]
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
Change-Id: Id7fbc449d6eb90541e46f98cf0aa2bf5d6f48316
diff --git a/pldmtool/pldm_base_cmd.cpp b/pldmtool/pldm_base_cmd.cpp
index 475932f..8315640 100644
--- a/pldmtool/pldm_base_cmd.cpp
+++ b/pldmtool/pldm_base_cmd.cpp
@@ -39,6 +39,7 @@
const std::map<const char*, pldm_bios_commands> pldmBiosCmds{
{"GetBIOSTable", PLDM_GET_BIOS_TABLE},
+ {"SetBIOSTable", PLDM_SET_BIOS_TABLE},
{"SetBIOSAttributeCurrentValue", PLDM_SET_BIOS_ATTRIBUTE_CURRENT_VALUE},
{"GetBIOSAttributeCurrentValueByHandle",
PLDM_GET_BIOS_ATTRIBUTE_CURRENT_VALUE_BY_HANDLE},
@@ -48,7 +49,12 @@
const std::map<const char*, pldm_platform_commands> pldmPlatformCmds{
{"SetNumericEffecterValue", PLDM_SET_NUMERIC_EFFECTER_VALUE},
{"SetStateEffecterStates", PLDM_SET_STATE_EFFECTER_STATES},
- {"GetPDR", PLDM_GET_PDR}};
+ {"GetPDR", PLDM_GET_PDR},
+ {"GetNumericEffecterValue", PLDM_GET_NUMERIC_EFFECTER_VALUE},
+ {"SetEventReceiver", PLDM_SET_EVENT_RECEIVER},
+ {"GetSensorReading", PLDM_GET_SENSOR_READING},
+ {"GetStateSensorReadings", PLDM_GET_STATE_SENSOR_READINGS},
+ {"PlatformEventMessage", PLDM_PLATFORM_EVENT_MESSAGE}};
const std::map<const char*, pldm_fru_commands> pldmFruCmds{
{"GetFRURecordTableMetadata", PLDM_GET_FRU_RECORD_TABLE_METADATA},