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/vpd-manager/manager.hpp b/vpd-manager/manager.hpp
index 3beb412..e2a806b 100644
--- a/vpd-manager/manager.hpp
+++ b/vpd-manager/manager.hpp
@@ -149,6 +149,16 @@
*/
void assetTagCallback(sdbusplus::message::message& msg);
+ /**
+ * @brief Restores and defaulted VPD on the system VPD EEPROM.
+ *
+ * This function will read the system VPD EEPROM and check if any of the
+ * keywords that need to be preserved across FRU replacements are defaulted
+ * in the EEPROM. If they are, this function will restore them from the
+ * value that is in the D-Bus cache.
+ */
+ void restoreSystemVpd();
+
/** @brief Persistent sdbusplus DBus bus connection. */
sdbusplus::bus::bus _bus;