PASS 2 Planar support for vpd parser
The system has two planar passes - Pass1 & Pass2 Planars.
Pass1 Planar a buffer connects all pcie cards, Whereas
Pass2 Planar has mux connection established for pcie card selection.
ibm-read-vpd picks up the right deviceTree and json
(either 2UPass1/2UPass2/4UPass1/4UPass2)
based on the HW and IM kw of the planar.
Test-
tested on Rainier 2U simics
root@rainier:/tmp# ./ibm-read-vpd -f /tmp/systemVpd
imKeyword- 50001001, HW - 0001
Processing with this JSON - /usr/share/vpd/50001001_v1.json
root@rainier:/tmp# ./ibm-read-vpd -f /tmp/systemVpd
imKeyword- 50001001, HW - 0011
Processing with this JSON - /usr/share/vpd/50001001_v2.json
root@rainier:/tmp# ./ibm-read-vpd -f /tmp/systemVpd
imKeyword- 50001000, HW - 0011
Processing with this JSON - /usr/share/vpd/50001000_v2.json
root@rainier:/tmp# ./ibm-read-vpd -f /tmp/systemVpd
imKeyword- 50001000, HW - 0001
Processing with this JSON - /usr/share/vpd/50001000_v1.json
root@rainier:/tmp#
Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
Change-Id: I36de12d9697039e61e6ad569e1e119f001e782f6
diff --git a/ibm_vpd_utils.hpp b/ibm_vpd_utils.hpp
index 9aaebee..29996a9 100644
--- a/ibm_vpd_utils.hpp
+++ b/ibm_vpd_utils.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "const.hpp"
+#include "store.hpp"
#include "types.hpp"
#include <iostream>
@@ -162,5 +163,24 @@
return stdOutput;
}
+/** @brief This API checks for IM and HW keywords, and based
+ * on these values decides which system json to be used.
+ * @param[in] vpdMap - parsed vpd
+ * @returns System json path
+ */
+string getSystemsJson(const Parsed& vpdMap);
+
+/** @brief Reads HW Keyword from the vpd
+ * @param[in] vpdMap - parsed vpd
+ * @returns value of HW Keyword
+ */
+const string getHW(const Parsed& vpdMap);
+
+/** @brief Reads IM Keyword from the vpd
+ * @param[in] vpdMap - parsed vpd
+ * @returns value of IM Keyword
+ */
+const string getIM(const Parsed& vpdMap);
+
} // namespace vpd
-} // namespace openpower
+} // namespace openpower
\ No newline at end of file