manager: Move System VPD Restore to Manager

This commit moves the system VPD restore functionality to the VPD
manager.

This ensures there are no race conditions with doing it in the parser
process when the manager is synchronizing BIOS attributes to VPD.

Tested: I tested both the VPD restore as well as the BIOS attribute sync
paths. They tested out fine.

Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: I4e3c274a72f86ad4b4821529ffbe0526203b7df5
diff --git a/ibm_vpd_utils.hpp b/ibm_vpd_utils.hpp
index 7941e0b..e1f3445 100644
--- a/ibm_vpd_utils.hpp
+++ b/ibm_vpd_utils.hpp
@@ -15,6 +15,15 @@
 namespace vpd
 {
 
+// Map to hold record, kwd pair which can be re-stored at standby.
+// The list of keywords for VSYS record is as per the S0 system. Should
+// be updated for another type of systems
+static const std::unordered_map<std::string, std::vector<std::string>>
+    svpdKwdMap{{"VSYS", {"BR", "TM", "SE", "SU", "RB", "WN", "RG"}},
+               {"VCEN", {"FC", "SE"}},
+               {"LXR0", {"LX"}},
+               {"UTIL", {"D0"}}};
+
 /** @brief Return the hex representation of the incoming byte
  *
  * @param [in] c - The input byte
@@ -366,5 +375,18 @@
  * @return The chassis power state.
  */
 std::string getPowerState();
+
+/**
+ * @brief Reads VPD from the supplied EEPROM
+ *
+ * This function reads the given VPD EEPROM file and returns its contents as a
+ * byte array. It handles any offsets into the file that need to be taken care
+ * of by looking up the VPD JSON for a possible offset key.
+ *
+ * @param js[in] - The VPD JSON Object
+ * @param file[in] - The path to the EEPROM to read
+ * @return A byte array containing the raw VPD.
+ */
+Binary getVpdDataInVector(const nlohmann::json& js, const std::string& file);
 } // namespace vpd
 } // namespace openpower
\ No newline at end of file