PEL: Fixes for State.Boot.Raw Value updates
The first entry in the std::tuple of the Value property, which is used
to hold the 8 character SRC refcode, changed from a uint64_t to a
std::vector<uint8_t>. Make the necessary updates.
Tested:
Create a PEL with a severity value of 0x51 = critical system
termination. It has the refcode sent to this Value property:
```
$ busctl get-property xyz.openbmc_project.State.Boot.Raw \
/xyz/openbmc_project/state/boot/raw0 \
xyz.openbmc_project.State.Boot.Raw Value
(ayay)
8 49 49 48 48 50 54 48 50
^^ this is the correct 8 byte 11002602 refcode
and the rest is the 72 byte progress SRC:
72 2 9 0 9 0 0 0 188 0 0 0 85 46 45 0
16 0 0 0 0 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 49 49 48 48 50 54 48
50 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
```
And now create another PEL, and this progress SRC should be in the hex
words:
```
"Reference Code": "BD8D3601",
"Hex Word 2": "00000055",
"Hex Word 3": "2E2D0010",
"Hex Word 4": "11002602", <-------------------
"Hex Word 5": "00000000",
"Hex Word 6": "00000000",
"Hex Word 7": "00000000",
"Hex Word 8": "00000000",
"Hex Word 9": "00000000",
```
Change-Id: I8050eaf3e372b724fa41dc358633d4b3d29fc782
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/extensions/openpower-pels/data_interface.cpp b/extensions/openpower-pels/data_interface.cpp
index 67b4c32..2d648a0 100644
--- a/extensions/openpower-pels/data_interface.cpp
+++ b/extensions/openpower-pels/data_interface.cpp
@@ -703,7 +703,8 @@
#endif
void DataInterface::createProgressSRC(
- const uint64_t& priSRC, const std::vector<uint8_t>& srcStruct) const
+ const std::vector<uint8_t>& priSRC,
+ const std::vector<uint8_t>& srcStruct) const
{
DBusValue variant = std::make_tuple(priSRC, srcStruct);
@@ -810,7 +811,8 @@
std::vector<uint8_t> DataInterface::getRawProgressSRC(void) const
{
- using RawProgressProperty = std::tuple<uint64_t, std::vector<uint8_t>>;
+ using RawProgressProperty =
+ std::tuple<std::vector<uint8_t>, std::vector<uint8_t>>;
DBusValue value;
getProperty(service_name::bootRawProgress, object_path::bootRawProgress,