Skip to content
Commit 0ef217f4 authored by George Liu's avatar George Liu
Browse files

log_services: Add AdditionalDataURI to Post Code log entries

- Need to support the Additional Data URI on Post Code log service.
  IBM progress codes are typically 72 bytes including a primary code
  (8 bytes) and a secondary code that contains hex words that would
  provide additional details on the core problem during boot hangs.
  These secondary hex words would be in this Additional Data URI.

- Need to check for the secondary progress code(std::vector<uint8_t>)
  If it is empty, then do not generate the Additional Data URI.
  If it is not empty, then generate Additional Data URI for that
  particular post entry.

- This commit is not alone for IBM, it is a generic code that should
  work on every system.
  As per the recent PDI change that went into Progress code structure
  https://github.com/openbmc/phosphor-dbus-interfaces/commit/9a96970ebb93eb1f495c200801343a4d1c53977c#diff-0aad0ef8ed32e2652256f50357eede1aedd6ff1398df1bb1a121ad9125916c5f
  1. The primary code(uint64_t) is what we see in the BIOSPOSTCode
     Message registry.
  2. The secondary code(array[byte]) is the entire raw buffer which
     could be used to offload the information out of BMC.
  This should not impact any systems that does not have a secondary
  code, as if the secondary code is empty -> we will not populate the
  AdditionalDataURI at all.

Tested:
- Ran Redfish validator which instructed to bump the odata.type from
  v1_4_0 to v1_8_0 and passed.

- Verified the new AdditionalDataURI was correct for
  LogServices/PostCodes/Entries/<str>:
  $ curl -k
https://127.0.0.1:2443/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1


  {
	"@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries",
	"@odata.type": "#LogEntry.v1_8_0.LogEntry",
	"Description": "Collection of POST Code Log Entries",
	"Members": [
	  {
        "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1",
	    "@odata.type": "#LogEntry.v1_8_0.LogEntry",
	    "AdditionalDataURI": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1/attachment",
	    ... ...
      }
	],
	"Members@odata.count": 1,
	"Name": "BIOS POST Code Log Entries"
  }

Signed-off-by: default avatarGeorge Liu <liuxiwei@inspur.com>
Change-Id: I897888a08db94e22b5a8098bc2a874b00bfb5361
parent 0e8ac5e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment