DBus calls to update VPD cache data for Interfaces
This commit implements required bus call to update vpd cache
once the data has been updated on the hardware.
It updates data for Common interface,Extra interface and COM
interface.
To test on simics use following procedure
- Hexdump the vpd file of EEPROM you want
to update in a .txt file.
- To update data of keyword for any record
make "busctl call" to WriteKeyword.
-After successful execution, agaim hexdump
VPD file of same EEPROM in another .txt
file.
-Difference can be observed in both the
file w.r.t. updated data and ECC.
once complete call has been made, updated
data in cache can be seen using following command
on simics.
- busctl intrsopect <service> <object_path>
- busctl introspect <service> <object_path>
<interface_name>
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: I7997a027b631de25e254be9811c1926902fda8ec
diff --git a/utils.hpp b/utils.hpp
index 59b33ea..fd12698 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -3,6 +3,9 @@
#include "const.hpp"
#include "types.hpp"
+#include <iostream>
+
+using namespace std;
namespace openpower
{
namespace vpd
@@ -40,5 +43,10 @@
openpower::vpd::constants::LE2ByteData
readUInt16LE(Binary::const_iterator iterator);
+/** @brief Encodes a keyword for D-Bus.
+ * @param[in] kw - kwd data in string format
+ * @param[in] encoding - required for kwd data
+ */
+string encodeKeyword(const string& kw, const string& encoding);
} // namespace vpd
} // namespace openpower