Enable 'oem-ibm' in pldmtool for base commands.
pldmtool base GetPLDMTypes
Supported types: 0(base) 2(platform) 3(bios) 4(fru) 63(oem-ibm)
pldmtool base GetPLDMCommands -t 63
upported Commands : 1(GetFileTable) 4(ReadFile) 5(WriteFile) 6(ReadFileInToMemory) 7(WriteFileFromMemory) 8(ReadFileByTypeIntoMemory) 9(WriteFileByTypeFromMemory) 10(NewFileAvailable) 11(ReadFileByType) 12(WriteFileByType) 13(FileAck) 240(GetAlertStatus)
pldmtool base GetPLDMVersion -t 63
Type 63(oem-ibm): 1.0.0
pldmtool oem-ibm --help
oem type command
Usage: ./pldmtool oem-ibm [OPTIONS] SUBCOMMAND
Options:
-h,--help Print this help message and exit
Subcommands:
GetAlertStatus get alert status descriptor
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
Change-Id: I4937e56dcf11eb0c0a2a272a3439821f9eb60b5f
diff --git a/tool/pldm_base_cmd.cpp b/tool/pldm_base_cmd.cpp
index 7edc33c..c0801a0 100644
--- a/tool/pldm_base_cmd.cpp
+++ b/tool/pldm_base_cmd.cpp
@@ -4,6 +4,11 @@
#include "libpldm/utils.h"
+#ifdef OEM_IBM
+#include "libpldm/file_io.h"
+#include "libpldm/host.h"
+#endif
+
namespace pldmtool
{
@@ -17,8 +22,11 @@
std::vector<std::unique_ptr<CommandInterface>> commands;
const std::map<const char*, pldm_supported_types> pldmTypes{
- {"base", PLDM_BASE}, {"platform", PLDM_PLATFORM}, {"bios", PLDM_BIOS},
- {"fru", PLDM_FRU}, {"oem", PLDM_OEM},
+ {"base", PLDM_BASE}, {"platform", PLDM_PLATFORM},
+ {"bios", PLDM_BIOS}, {"fru", PLDM_FRU},
+#ifdef OEM_IBM
+ {"oem-ibm", PLDM_OEM},
+#endif
};
const std::map<const char*, pldm_supported_commands> pldmBaseCmds{
@@ -44,6 +52,24 @@
{"GetFRURecordTableMetadata", PLDM_GET_FRU_RECORD_TABLE_METADATA},
{"GetFRURecordTable", PLDM_GET_FRU_RECORD_TABLE}};
+#ifdef OEM_IBM
+const std::map<const char*, pldm_host_commands> pldmIBMHostCmds{
+ {"GetAlertStatus", PLDM_HOST_GET_ALERT_STATUS}};
+
+const std::map<const char*, pldm_fileio_commands> pldmIBMFileIOCmds{
+ {"GetFileTable", PLDM_GET_FILE_TABLE},
+ {"ReadFile", PLDM_READ_FILE},
+ {"WriteFile", PLDM_WRITE_FILE},
+ {"ReadFileInToMemory", PLDM_READ_FILE_INTO_MEMORY},
+ {"WriteFileFromMemory", PLDM_WRITE_FILE_FROM_MEMORY},
+ {"ReadFileByTypeIntoMemory", PLDM_READ_FILE_BY_TYPE_INTO_MEMORY},
+ {"WriteFileByTypeFromMemory", PLDM_WRITE_FILE_BY_TYPE_FROM_MEMORY},
+ {"NewFileAvailable", PLDM_NEW_FILE_AVAILABLE},
+ {"ReadFileByType", PLDM_READ_FILE_BY_TYPE},
+ {"WriteFileByType", PLDM_WRITE_FILE_BY_TYPE},
+ {"FileAck", PLDM_FILE_ACK}};
+#endif
+
} // namespace
class GetPLDMTypes : public CommandInterface
@@ -287,6 +313,10 @@
case PLDM_FRU:
printCommand(pldmFruCmds, i);
break;
+ case PLDM_OEM:
+ printCommand(pldmIBMHostCmds, i);
+ printCommand(pldmIBMFileIOCmds, i);
+ break;
default:
break;
}