summaryrefslogtreecommitdiff
path: root/redfish-core/lib/log_services.hpp
diff options
context:
space:
mode:
authorManojkiran Eda <manojkiran.eda@gmail.com>2021-02-27 11:55:04 +0300
committerGunnar Mills <gmills@us.ibm.com>2021-03-19 18:38:57 +0300
commit6c9a279eeec173dd64bf4866beec90839f1a1a42 (patch)
tree73ac6d66b77bb742770d196d501bf52a6605121a /redfish-core/lib/log_services.hpp
parent4e69c9040b996b48b6e361ac8caed47e91b71a83 (diff)
downloadbmcweb-6c9a279eeec173dd64bf4866beec90839f1a1a42.tar.xz
Change PostCode property signature
- This commit would change the backend signature of the PostCode Raw Value property. - IBM progress codes are typically around 72 bytes including a primary code (typically 8 bytes) & a secondary code that contains hex words that would provide additional details on the core problem during boot hangs. - The intent behind this commit is to change the signature of the backend Post Code Raw Value Property as per the proposed PDI change. - This commit has various dependencies across mutiple repos like phosphor-host-postd, phosphor-post-code-manager, all the dependent commit can be found in gerrit with topic name : progress codes Tested By : 1. PATCHED a witherspoon system with the new PDI library with both changes(40927,40936). 2. PACTHED the new snoopd daemon, post code manager, bmcweb & pldm with the progress code support. 3. Trigger a progress code(ASCII Value : STANDBY) using the pldm tool as shown below: ./pldmtool raw --data 0x80 0x3F 0xC 0x0A 0x00 0x00 0x00 0x00 0x00 0x07 0x00 0x00 0x00 0x48 0x00 0x00 0x00 0x02 0x00 0x00 0x01 0x00 0x00 0x00 0x48 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x53 0x54 0x41 0x4e 0x44 0x42 0x59 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 4. Now check the Raw Property : busctl call xyz.openbmc_project.State.Boot.Raw /xyz/openbmc_project/state/boot/raw0 org.freedesktop.DBus.Properties Get ss xyz.openbmc_project.State.Boot.Raw Value v (tay) 6004496007600167200 72 2 0 0 1 0 0 0 72 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 83 84 65 78 68 66 89 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 5. Check the Redfish GET on Post Code Log Service Entry { "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of POST Code Log Entries", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2021-02-27T08:38:31+00:00", "EntryType": "Event", "Id": "B1-1", "Message": "Boot Count: 1: TS Offset: 0.0000; POST Code: 0x5354414e44425920", "MessageArgs": [ "1", "0.0000", "0x5354414e44425920" ], "MessageId": "OpenBMC.0.1.BIOSPOSTCode", "Name": "POST Code Log Entry", "Severity": "OK" } ], "Members@odata.count": 1, "Members@odata.nextLink": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries?$skip=1000", "Name": "BIOS POST Code Log Entries" } The post code Field shows 0x5354414e44425920 in Hex(In Ascii it would be STANDBY) Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I960a9a4f35ac8d7af03e9547d1f609b6adda0caa
Diffstat (limited to 'redfish-core/lib/log_services.hpp')
-rw-r--r--redfish-core/lib/log_services.hpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 883fc6914c..4abf35484a 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -3107,7 +3107,8 @@ class PostCodesClear : public Node
static void fillPostCodeEntry(
const std::shared_ptr<AsyncResp>& aResp,
- const boost::container::flat_map<uint64_t, uint64_t>& postcode,
+ const boost::container::flat_map<
+ uint64_t, std::tuple<uint64_t, std::vector<uint8_t>>>& postcode,
const uint16_t bootIndex, const uint64_t codeIndex = 0,
const uint64_t skip = 0, const uint64_t top = 0)
{
@@ -3119,7 +3120,8 @@ static void fillPostCodeEntry(
nlohmann::json& logEntryArray = aResp->res.jsonValue["Members"];
uint64_t firstCodeTimeUs = 0;
- for (const std::pair<uint64_t, uint64_t>& code : postcode)
+ for (const std::pair<uint64_t, std::tuple<uint64_t, std::vector<uint8_t>>>&
+ code : postcode)
{
currentCodeIndex++;
std::string postcodeEntryID =
@@ -3167,7 +3169,7 @@ static void fillPostCodeEntry(
// assemble messageArgs: BootIndex, TimeOffset(100us), PostCode(hex)
std::ostringstream hexCode;
hexCode << "0x" << std::setfill('0') << std::setw(2) << std::hex
- << code.second;
+ << std::get<0>(code.second);
std::ostringstream timeOffsetStr;
// Set Fixed -Point Notation
timeOffsetStr << std::fixed;
@@ -3227,9 +3229,11 @@ static void getPostCodeForEntry(const std::shared_ptr<AsyncResp>& aResp,
const uint64_t codeIndex)
{
crow::connections::systemBus->async_method_call(
- [aResp, bootIndex, codeIndex](
- const boost::system::error_code ec,
- const boost::container::flat_map<uint64_t, uint64_t>& postcode) {
+ [aResp, bootIndex,
+ codeIndex](const boost::system::error_code ec,
+ const boost::container::flat_map<
+ uint64_t, std::tuple<uint64_t, std::vector<uint8_t>>>&
+ postcode) {
if (ec)
{
BMCWEB_LOG_DEBUG << "DBUS POST CODE PostCode response error";
@@ -3263,7 +3267,9 @@ static void getPostCodeForBoot(const std::shared_ptr<AsyncResp>& aResp,
crow::connections::systemBus->async_method_call(
[aResp, bootIndex, bootCount, entryCount, skip,
top](const boost::system::error_code ec,
- const boost::container::flat_map<uint64_t, uint64_t>& postcode) {
+ const boost::container::flat_map<
+ uint64_t, std::tuple<uint64_t, std::vector<uint8_t>>>&
+ postcode) {
if (ec)
{
BMCWEB_LOG_DEBUG << "DBUS POST CODE PostCode response error";