libpldm: Add encode API for PassComponentTable request
PassComponentTable command is used to pass component information to
the firmware device. PassComponentTable command contain component
information table for a specific component including
ComponentClassificationIndex, ComponentClassification, and version
details. This implementation works with DSP0267_1.1.0, DSP0267_1.0.1
and DSP0267_1.0.0.
Tested: Unit tests passed
Signed-off-by: gokulsanker <gokul.sanker.v.g@intel.com>
Change-Id: I5503faf86e65de1bfd2968dc8dbe0d29d88e008a
diff --git a/libpldm/utils.c b/libpldm/utils.c
index 3d25381..0a1e33c 100644
--- a/libpldm/utils.c
+++ b/libpldm/utils.c
@@ -1,5 +1,5 @@
#include "utils.h"
-
+#include "base.h"
#include <stdio.h>
/** CRC32 code derived from work by Gary S. Brown.
@@ -195,3 +195,17 @@
}
return true;
}
+
+bool is_transfer_flag_valid(uint8_t transfer_flag)
+{
+ switch (transfer_flag) {
+ case PLDM_START:
+ case PLDM_MIDDLE:
+ case PLDM_END:
+ case PLDM_START_AND_END:
+ return true;
+
+ default:
+ return false;
+ }
+}