History log of /openbmc/phosphor-logging/extensions/openpower-pels/pel.hpp (Results 1 – 25 of 30)
Revision Date Author Comments
# 8e65f4ea 02-May-2023 Matt Spinler <spinler@us.ibm.com>

PEL: New D-Bus properties on PEL entry iface

Fill in the 4 newly added properties on the PEL entry D-Bus interface:
- Platform log ID (PLID)
- Deconfig flag from the SRC section
- Guard flag from th

PEL: New D-Bus properties on PEL entry iface

Fill in the 4 newly added properties on the PEL entry D-Bus interface:
- Platform log ID (PLID)
- Deconfig flag from the SRC section
- Guard flag from the SRC section
- Creation timestamp

These were also added to the PELAttributes map in the Repository class
so that each PEL wouldn't have to be reconstructed from a file again
when creating the D-Bus objects.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7878645f56c634e6111fcecc22ab27673d0c0f5d

show more ...


# 9d921096 15-Dec-2022 Matt Spinler <spinler@us.ibm.com>

PEL: Capture the journal in UserData sections

If a PEL message registry entry has a 'JournalCapture' section, capture
the listed portions of the journal in UserData sections for that error.

If the

PEL: Capture the journal in UserData sections

If a PEL message registry entry has a 'JournalCapture' section, capture
the listed portions of the journal in UserData sections for that error.

If the JSON looks like:

"JournalCapture": {
"NumLines": 30
}

Then the code will capture the previous 30 lines from the journal into a
single UserData section.

If the JSON looks like:

"JournalCapture":
{
"Sections": [
{
"SyslogID": "phosphor-bmc-state-manager",
"NumLines": 20
},
{
"SyslogID": "phosphor-log-manager",
"NumLines": 15
}
]
}

Then the code will create two UserData sections, the first with the most
recent 20 lines from phosphor-bmc-state-manager, and the second with 15
lines from phosphor-log-manager.

If a section would cause the PEL to exceed its maximum size of 16KB, it
will be dropped. While the UserData class does have a shrink() method,
it prunes data from the end, which would cause the most recent journal
entries to be removed, which could be misleading.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I2ecbd8002b0e7087eb166a1219c6ab9da14a122a

show more ...


# 45796e82 01-Jul-2022 Matt Spinler <spinler@us.ibm.com>

PEL: Fix some cppcheck warnings

This is the first of two commits to fix most of the cppcheck warnings in
the PEL code. It doesn't fix all of them because some are false
positives and some are just

PEL: Fix some cppcheck warnings

This is the first of two commits to fix most of the cppcheck warnings in
the PEL code. It doesn't fix all of them because some are false
positives and some are just suggestions.

It's broken up into two commits to make them smaller.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I75937797a6920611b136d600e9efd6c694e4209c

show more ...


# 9ac0d9b8 14-Jul-2022 George Liu <liuxiwei@inspur.com>

PEL: Add BMC uptime to PELs in UserData section

A UserData section has been added to each PEL with additional debug
information, now there is a need to add the output of the uptime
command to UserDa

PEL: Add BMC uptime to PELs in UserData section

A UserData section has been added to each PEL with additional debug
information, now there is a need to add the output of the uptime
command to UserData and display it, but for Hostboot doesn't care
about this property, so skip adding it here it.

Tested: unit test passed
"User Data 0": {
"Section Version": "1",
"Sub-section type": "1",
"Created by": "0x2000",
...
"Uptime": "3y 332d 21h 33m 9s",
"Load": "1.47 0.94 0.61",
},

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I3d4c78bb1650da9a91804fc83de60597992ffc8a

show more ...


# f8e750dd 14-Jan-2022 Andrew Geissler <geissonator@yahoo.com>

openpower-pels: only fail on hw callouts

After further discussion with the IBM service and manufacturing team, it
was determined that firmware should only be automatically going to
Quiesce and preve

openpower-pels: only fail on hw callouts

After further discussion with the IBM service and manufacturing team, it
was determined that firmware should only be automatically going to
Quiesce and preventing the system boot in QuiesceOnError mode when the
PEL has a hardware callout present (vs. any type of callout).

Tested:
- New unit test case
- Verified that an unrecoverable PEL with only a symbolic FRU and a
maintenance procedure callout did not trigger the Quiesce logic
- Verified that a BMC log with a HW callout still triggers the Quiesce
logic
- Verified a boot in simulation with Quiesce enabled

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I8912d59fd69b699c7da5a44da887cce4e987f6d2

show more ...


# 3e274432 14-Sep-2021 Sumit Kumar <sumit_kumar@in.ibm.com>

PEL: Write terminating SRC to the progress SRC

Check for incoming pels for severity type 0x51 - Critical error,
System termination. If found, fetch the SRC and add this SRC to
progre

PEL: Write terminating SRC to the progress SRC

Check for incoming pels for severity type 0x51 - Critical error,
System termination. If found, fetch the SRC and add this SRC to
progress SRC interface on dbus. In addition set the terminate bit
in BMC created pels only.

Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com>
Change-Id: I26194a26743263183dcb61e097c745c4705fa006

show more ...


# 1ddf1e8e 04-Jun-2021 Jayanth Othayoth <ojayanth@in.ibm.com>

PEL: move jsonCalloutSubtype const definition to header

SBE FFDC need to consume this constant to create json
callout type file creation.

Signed-off-by: Jayanth Othayoth <ojayan

PEL: move jsonCalloutSubtype const definition to header

SBE FFDC need to consume this constant to create json
callout type file creation.

Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Change-Id: I71eeccbb478d7cec5bfc8b1844c11f641d8a388b

show more ...


# 3160a544 26-Apr-2021 Sumit Kumar <sumit_kumar@in.ibm.com>

PEL: Update system info into HB PEL extended user data section

Hostboot requested BMC add a UserData section containing debug
information like internal code level name and the bmc/host/c

PEL: Update system info into HB PEL extended user data section

Hostboot requested BMC add a UserData section containing debug
information like internal code level name and the bmc/host/chassis
states that are added to the BMC PELs. To accomodate this BMC code will
look in incoming PELs for an ED section with specific
compID/version/subtype fields, and then modify it with the appropriate
debug contents as mentioned above.

Test: Verified PEL tool output by injecting error to generate
hostboot PEL

Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com>
Change-Id: I72288089f2768412eb9033b121e7f02f72f11fc7

show more ...


# 44fc3168 09-Jul-2020 Andrew Geissler <geissonator@yahoo.com>

pel-quiesce: quiesce on error pels with callout

The PEL requirement is that if a nonInfo host PEL is logged, it has a
callout of any type within it, and the QuiesceOnHwError is enabled,

pel-quiesce: quiesce on error pels with callout

The PEL requirement is that if a nonInfo host PEL is logged, it has a
callout of any type within it, and the QuiesceOnHwError is enabled,
then the boot block / quiesce functionality should be executed.

Tested:

1) Verified nothing occurs when QuiesceOnHwError is not enabled

2) Injected info PEL with no callout and unrecoverable error with no
callout with QuiesceOnHwError enabled and verified no actions were
taken.

3) Injected Error PEL with callout and QuiesceOnHwError enabled
and verified boot block logic was enabled.

Error inject which will create PEL with callout:
busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/logging xyz.openbmc_project.Logging.Create Create ssa{ss} org.open_power.Logging.Error.TestError1 xyz.openbmc_project.Logging.Entry.Level.Error 0

Journal from fail:
Sep 09 14:03:30 w56 phosphor-log-manager[264]: Created PEL 0x50000266 (BMC ID 340) with SRC BD802003
Sep 09 14:03:30 w56 phosphor-log-manager[264]: QuiesceOnHwError enabled, PEL severity not nonError, and callout is present
Sep 09 14:03:30 w56 phosphor-log-manager[264]: QuiesceOnError set and callout present
Sep 09 14:03:30 w56 systemd[1]: Reached target Quiesce Target.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I09e3ced608ffd2661d9cf015a24d4e0d8a6a84bd

show more ...


# 5a90a95b 27-Aug-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Look for callouts in an FFDC JSON file

The PEL constructor takes a list of files that should be added as
UserData sections for FFDC. If one of those files has its format set to

PEL: Look for callouts in an FFDC JSON file

The PEL constructor takes a list of files that should be added as
UserData sections for FFDC. If one of those files has its format set to
JSON, and its subtype set to 0xCA, this will mean it contains a JSON
array of callouts to add to the PEL.

This commit will look for that type and subtype, and then pass the
callout JSON through to the SRC class. A future commit will add the
callouts from the JSON to the PEL.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iec0ca0ad0ae11cc957b8fda880d97116f342d72d

show more ...


# f67bafd0 06-Jul-2020 Harisuddin Mohamed Isa <harisuddin@gmail.com>

PEL: Python3 module support for UserData parsing

This change enables the calling of python3 parsers for UserData section.
Modules will be searched under the namespace "udparsers" from py

PEL: Python3 module support for UserData parsing

This change enables the calling of python3 parsers for UserData section.
Modules will be searched under the namespace "udparsers" from python3
sys.path directories (including the current directory).

Example:

/usr/lib/python3.8/site-packages/udparsers/bxxxx/bxxxx.py

or

./udparsers/bxxxx/bxxxx.py

where

b = Creator Subsystem ID for Hostboot
xxxx = Component ID of UserData section

The parsers will need to provide a function called "parseUDToJson" with
input parameters:

1. (int) Sub-section type
2. (int) Section version
3. (memoryview): Data

The return value needs to be a valid JSON string.

Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: I4d3523083bc48ad0c329c525d83c4a61d36ff611

show more ...


# 85f61a63 03-Jun-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Let SRC class create a debug section

Add functionality so that when the SRC PEL section is being created, it
can save debug data (a vector of strings) along the way, and the PEL

PEL: Let SRC class create a debug section

Add functionality so that when the SRC PEL section is being created, it
can save debug data (a vector of strings) along the way, and the PEL
class will then add that data into a JSON UserData section with any
other debug data. The PEL class will then also write the debug data to
the journal.

This will be used for things like failure messages when looking up
callouts, additional information for device callouts, etc.

The functionality to save debug data is in the Section base class, so in
the future other Section classes can also save debug data for display in
the PEL.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I2f7923303e953c100c94ac81ba7c85152080fb72

show more ...


# 56ad2a0e 26-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Pass FFDC files into PEL

In the case where an OpenBMC event log was created with the
'createWithFFDCFiles' D-Bus method, there needs to be UserData PEL
sections created with the

PEL: Pass FFDC files into PEL

In the case where an OpenBMC event log was created with the
'createWithFFDCFiles' D-Bus method, there needs to be UserData PEL
sections created with the contents of these files.

This commit passes these files into the PEL constructor, which then does
the creating. If any of this would cause the PEL size to go over 16KB,
then that section will be trimmed so it fits in the 16KB, and no more
additional sections will be added.

The function that actually reads the FFDC file and creates the UserData
section is stubbed out and will be implemented in a future commit.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Id27802c91326381a4b80fbe78ab62471cefe0286

show more ...


# a214ed30 28-Feb-2020 Harisuddin Mohamed Isa <harisuddin@gmail.com>

PEL: peltool: Print all PELs into JSON array

Added -a option to display all PELS at once into a JSON array.

Read message registry once to parse SRC sections in PELs.

Signed

PEL: peltool: Print all PELs into JSON array

Added -a option to display all PELS at once into a JSON array.

Read message registry once to parse SRC sections in PELs.

Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: I19690a866a3348cf2d8a9a89be38bc09e3eb7f9f

show more ...


# 4dcd3f46 22-Jan-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Save process name in a UserData section

When creating a new PEL, add a UserData section that contains various
pieces of system information that will be saved in every error log.

PEL: Save process name in a UserData section

When creating a new PEL, add a UserData section that contains various
pieces of system information that will be saved in every error log.

In this first commit, just save the process name of the creator,
provided they passed in the '_PID' AdditionalData item containing their
PID.

Future commits will add other items like certain D-Bus properties.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7139b4056e494277ff3388bfa8a00002c9c89dc1

show more ...


# 6d663820 22-Jan-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Check UserData section size before adding

While not really likely, it is technically possible that the
AdditionalData property in an event log is large enough that saving it
int

PEL: Check UserData section size before adding

While not really likely, it is technically possible that the
AdditionalData property in an event log is large enough that saving it
into a UserData section could make the PEL exceed its maximum size of
16KB. To guard against this, check that an overflow wouldn't occur
before saving that section in the PEL.

In future commits, other UserData sections will be added where this
check will also be needed.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iac312a24b1d445e93de5a09f35a43d940571a3f8

show more ...


# f1b46ff4 22-Jan-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Add function to get PEL size

Add a size() function to the PEL class that adds up the size fields
in the header of every PEL section.

This required a fix to some testcases w

PEL: Add function to get PEL size

Add a size() function to the PEL class that adds up the size fields
in the header of every PEL section.

This required a fix to some testcases where the size field was wrong in
a header.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0d70deae116cd3835f2c0ab34e13811da471fb14

show more ...


# acb7c106 10-Jan-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Print the JSON formatted UserData

Override the getJSON() function in the UserData section so it will
support peltool pretty printing when the data has been stored as JSON
(comp

PEL: Print the JSON formatted UserData

Override the getJSON() function in the UserData section so it will
support peltool pretty printing when the data has been stored as JSON
(component phosphor-logging, subtype 1 as defined in
user_data_formats.hpp).

It first converts the original JSON string to a nlohmann::json object to
validate it is valid JSON and then uses nlohmann::json's stream <<
operator to convert it into a pretty string.

This also sets up a framework where other UserData parsing functions can
be called from, and it is all only compiled into peltool, and not into
phosphor-log-manager.

The UserData section created out of the OpenBMC event log's
AdditionalData property already makes use of this format.

Here are some example outputs. Note that the 'Data' key is added by
this code for JSON that isn't already an object (dict) to make it one.

"User Data": {
"OPERATION": "something",
"REGISTER_FFDC": "REG1=0x8|REG2=0x9|REG3=0x55",
"RETURN_VALUE": "-12",
"TIMEOUT_IN_MSEC": "100",
"_PID": "993"
},

"User Data": {
"Data": [
"OPERATION",
"REGISTER_FFDC",
"RETURN_VALUE",
"TIMEOUT_IN_MSEC",
"_PID"
]
},

"User Data": {
"Data": "This is a string"
}

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7b034ac24339b5b019db3b57d8e71cb03559363e

show more ...


# f38ce984 07-Nov-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Add enums for transmission states

So far, the states are new, sent, and acked.

Also added PEL object access to getting and setting these on the User
Header section object.

PEL: Add enums for transmission states

So far, the states are new, sent, and acked.

Also added PEL object access to getting and setting these on the User
Header section object.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0dfb2d1a39fe69b2a47bf7d461f08e92039a3e03

show more ...


# 0688545b 06-Nov-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Make PEL::flatten() const

This includes making the flatten() method const in the PEL section base
class and in all of its derived classes.

Signed-off-by: Matt Spinler <spin

PEL: Make PEL::flatten() const

This includes making the flatten() method const in the PEL section base
class and in all of its derived classes.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6be787962c6d7dfa01bdced2f9024564e6ac1b08

show more ...


# f1e85e20 01-Nov-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Validate the Action Flags field

According to the PEL spec, the Action Flags and Event Type fields in the
User Header section must be in agreement with the Severity field. So,
wh

PEL: Validate the Action Flags field

According to the PEL spec, the Action Flags and Event Type fields in the
User Header section must be in agreement with the Severity field. So,
when a PEL is being created from an OpenBMC event log, check those
values for correctness and fix them up if required.

In addition, as those fields are optional in the message registry, this
code will also just set these two fields to valid values if they were
left out.

The rules being followed are documented in the PEL readme.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iad88de5080ba79a9ff31f962ef99bfc11994b9ed

show more ...


# 186ce8c9 20-Oct-2019 Aatir <aatrapps@gmail.com>

PEL: PELTool Application

PELTooL application would be used to interact with PELs. This commit has
the first functionality, where a PEL file is passed and all PEL sections
are hexdump

PEL: PELTool Application

PELTooL application would be used to interact with PELs. This commit has
the first functionality, where a PEL file is passed and all PEL sections
are hexdumped in a JSON object.

Signed-off-by: Aatir <aatrapps@gmail.com>
Change-Id: I155d75bb58cbd14a297b094314f7fd1f271f4f37

show more ...


# 97d19b48 29-Oct-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Const accessors for Private/UserHeader

Change the combined non-const accessor/setter functions for the
PrivateHeader and UserHeader fields to the standard const accessors, and
h

PEL: Const accessors for Private/UserHeader

Change the combined non-const accessor/setter functions for the
PrivateHeader and UserHeader fields to the standard const accessors, and
have separate setters for the fields that need to be modified.

In addition, make the 'get PrivateHeader' and 'get UserHeader' functions
on the PEL class return a const reference.

This allows const enforcement on the PEL class, for things like:

void func(const PEL& pel)
{
auto id = pel.privateHeader().id();
}

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I840170e72b41e9e2465f716617500269244de6d9

show more ...


# afa857c7 24-Oct-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Save AdditionalData in a UserData section

Save the contents of the AdditionalData OpenBMC event log property as
JSON in a UserData PEL section.

For example, if the Addition

PEL: Save AdditionalData in a UserData section

Save the contents of the AdditionalData OpenBMC event log property as
JSON in a UserData PEL section.

For example, if the AdditionalData property, which is an array of
strings, looks like:
["KEY1=VALUE1", "KEY=VALUE2"]

Then the data stored as ASCII text in the UserData section is:
{"KEY1":"VALUE1","KEY2":"VALUE2"}

If one of the keys is "ESEL", then that entry is removed from the
UserData output as that contains a full raw PEL from the host sent down
as ASCII text.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ia6ffabb39fdb4315ec2152744414e44f7d2ec4aa

show more ...


# aa659477 23-Oct-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Create FailingMTMS section for new PELs

When a PEL is created from an OpenBMC event log, add the FailingMTMS
section to the PEL. This contains the machine type, model, and serial

PEL: Create FailingMTMS section for new PELs

When a PEL is created from an OpenBMC event log, add the FailingMTMS
section to the PEL. This contains the machine type, model, and serial
number fields.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I8d08e6dda00260efebd2c6ac165270d2aaf98d67

show more ...


12