History log of /openbmc/phosphor-logging/test/openpower-pels/pel_utils.cpp (Results 1 – 20 of 20)
Revision Date Author Comments
# ac1ba3f2 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I077deb6e98025e4e8c6abd4d039f9af4db19342b
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# d26fa3e7 21-Apr-2021 Patrick Williams <patrick@stwcx.xyz>

openpower-pels: clean up various compile warnings

Compile warnings observed when compiling parts of the
openpower-pels (or corresponding tests) under stricter
compiler warning flags

openpower-pels: clean up various compile warnings

Compile warnings observed when compiling parts of the
openpower-pels (or corresponding tests) under stricter
compiler warning flags of Meson.

Issues fixed:
- many unused parameters
- invalid case fall-through
- excess semi-colons
- incorrect 'const' on return-by-value type
- removal of variable length array in test case
- uncaught return from 'system' call in test case

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I8af69184042cf8661d1307a02ecf3afcab4724a1

show more ...


# 386a61e6 13-Aug-2020 Matt Spinler <spinler@us.ibm.com>

PEL: ExtendedUserData section class

This class represents the Extended User Data section. This section is
similar to the UserData class in that it stores free form FFDC data,
except

PEL: ExtendedUserData section class

This class represents the Extended User Data section. This section is
similar to the UserData class in that it stores free form FFDC data,
except that it is meant to be added to an already existing PEL by a
creator subsystem that is different than the PEL creator's subsystem.
As such, it stores the section creator's creator ID value as a field
within the section, which the regular UserData class doesn't do.

The same parsers that run on the UserData section can also run on this
section.

Change-Id: I8562a89141f0305e397703f0cb92a06eb9f10133

show more ...


# 48c44dbb 25-Aug-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Set platform SAI LED group

There is now an LED group to set when the platform SAI LED needs to be
asserted when handling the service indicators for PEL callouts.

Signed-off

PEL: Set platform SAI LED group

There is now an LED group to set when the platform SAI LED needs to be
asserted when handling the service indicators for PEL callouts.

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

show more ...


# 6c081cc4 05-Aug-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Add callouts to pelFactory()'s test PEL

Add a hardware callout to the PEL that gets returned from pelFactory()
in unit test.

This brings the size up to between 400 and 500

PEL: Add callouts to pelFactory()'s test PEL

Add a hardware callout to the PEL that gets returned from pelFactory()
in unit test.

This brings the size up to between 400 and 500 so there is also a
testcase update that needs to be made so it doesn't assert.

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

show more ...


# 454f656f 07-Jul-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Create a PEL that takes parameters for test

Make a pelFactory() function that unit tests can use where the caller
can specify the following attributes:
* ID (PLID also set to

PEL: Create a PEL that takes parameters for test

Make a pelFactory() function that unit tests can use where the caller
can specify the following attributes:
* ID (PLID also set to this. BMC log ID = ID + 500)
* Creator ID
* Severity
* Action Flags
* PEL Size

The desired size is reached by adding a UserData section as the last
section.

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

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 ...


# c63e2e82 02-Dec-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Add ExtendedUserHeader section class

This is a required PEL section.

The section contains:
* The machine type/model/SN
* The server firmware version
* The BMC firmw

PEL: Add ExtendedUserHeader section class

This is a required PEL section.

The section contains:
* The machine type/model/SN
* The server firmware version
* The BMC firmware version
* The 'Event Common Reference Time' (not used yet)
* The symptom ID (a unique event signature)

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

show more ...


# 97f7abcf 06-Nov-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Add license prologue to test source files

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


# bd716f00 15-Oct-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Create SRC section from message registry

This adds the ability to create an SRC PEL section based on the message
registry entry for an OpenBMC event log.

The event log's Ad

PEL: Create SRC section from message registry

This adds the ability to create an SRC PEL section based on the message
registry entry for an OpenBMC event log.

The event log's AdditionalData property is used as a source for the user
defined data words of the SRC, while the other fields in the SRC's data
words are filled in either from the message registry fields or from
current system state or configuration.

The ASCII string field of the SRC is filled in based on the message
registry entry.

This commit doesn't fill in every system status field, as many aren't
even available anywhere yet. Also, this commit doesn't support adding
callouts to an SRC, that will also be handled in the future.

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

show more ...


# 213e5c1b 11-Oct-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Add 3 more sections to the test PEL data

Several testcases use pelDataFactory() for their PEL data. Add SRC,
FailingMTMS, and UserData sections to this data to get some better

PEL: Add 3 more sections to the test PEL data

Several testcases use pelDataFactory() for their PEL data. Add SRC,
FailingMTMS, and UserData sections to this data to get some better
coverage.

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

show more ...


# 42828bd9 11-Oct-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Refactor the test data factory

This commit has no functional changes, it just does some things
to make the PEL data creator for testcases, pelDataFactory(), be
more manageable:

PEL: Refactor the test data factory

This commit has no functional changes, it just does some things
to make the PEL data creator for testcases, pelDataFactory(), be
more manageable:

- Change to return a plain vector instead of a unique_ptr<vector>.
- Keeps the data for each section in separate vectors and then
either returns those as-is or combines them into a PEL.
- Change the TestPelType enum to TestPELType to match the style guide.
- Have pelDataFactory provide the SRC section instead of srcDataFactory.

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

show more ...


# f9bae185 09-Oct-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Add SRC PEL section class

This section consists of:
- An 8B header
- 8 4B words of hex data
- Some data is predefined based on the SRC format, some is free format.
- A

PEL: Add SRC PEL section class

This section consists of:
- An 8B header
- 8 4B words of hex data
- Some data is predefined based on the SRC format, some is free format.
- A 32B ASCII character string (The AsciiString class)
- An optional section for FRU callouts (The Callouts class)

Usually, the term SRC (System Reference Code) refers to the contents of
the ASCII string and the hex data words, which can then be looked up in
service documentation to find the meaning of the event log. This PEL
section wraps this pure SRC with additional data like callouts.

This commit only adds support for unflattening the section from an
existing PEL, and flattening it again. Future commits will add support
for creating an SRC from message registry data.

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

show more ...


# 32f13c91 09-Oct-2019 Matt Spinler <spinler@us.ibm.com>

PEL: SRC callouts subsection object

This Callouts class represents the optional subsection of an SRC PEL
section that contains FRU callouts. It is only present in the SRC when
there

PEL: SRC callouts subsection object

This Callouts class represents the optional subsection of an SRC PEL
section that contains FRU callouts. It is only present in the SRC when
there are callouts, and it comes at the end of the section.

It is basically just a container for the Callout objects that represent
the actual callouts.

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

show more ...


# 6c9662c9 09-Oct-2019 Matt Spinler <spinler@us.ibm.com>

PEL: SRC FRU callout structure

This class represents a single FRU callout in the SRC section of a PEL.
When there are multiple callouts, there will be multiple instances of
this clas

PEL: SRC FRU callout structure

This class represents a single FRU callout in the SRC section of a PEL.
When there are multiple callouts, there will be multiple instances of
this class created. Technically, the callout isn't always a FRU, such
as it could be a maintenance procedure name, but the spec still refers
to this section as the FRU callout section.

The callout priority and location code are in this structure.

There can also be up to one each of three types of substructures
in a single callout:
* FRU Identity (must be first if present)
* Power Controlling Enclosure (PCE)
* Manufacturing Replaceable Unit (MRU)

This commit just provides support for creating this object from a
flattened PEL, such as one that comes down from the host. A future
commit will add support for creating a callout for BMC created event
logs.

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

show more ...


# 367144cf 19-Sep-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Find an entry in the message registry JSON

The message registry is a JSON file that holds data required to create a
PEL out of an OpenBMC event log. It includes fields like 'subsyst

PEL: Find an entry in the message registry JSON

The message registry is a JSON file that holds data required to create a
PEL out of an OpenBMC event log. It includes fields like 'subsystem',
'event type', 'action flags', 'SRC reason code', etc.

Many fields in the message registry are optional, and a very minimal
entry make look like:

{
"Name": "xyz.openbmc_project.Power.Error.Fault",
"Subsystem": "power_supply",
"ActionFlags": ["service_action", "report"],

"SRC":
{
"ReasonCode": "0x2030"
}
}

This commit adds support to look up a message registry entry based on an
OpenBMC event log's 'Message' property (i.e.
xyz.openbmc_project.Power.Error.Fault) and then fill in a structure with
the fields found. Future commits will fill in the SRC related fields,
as well as actually create the PEL.

The message registry file can be found on the BMC at:
/usr/share/phosphor-logging/pels/message_registry.json.

For testing, users can put their own message_registry.json in
/etc/phosphor-logging, and that will take precedence.

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

show more ...


# 89fa082a 17-Jul-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Add repository to save PELs

Create the Repository class that can save PELs in (and later retrieve
them from) the filesystem. It provides an add() method that can add
a PEL obje

PEL: Add repository to save PELs

Create the Repository class that can save PELs in (and later retrieve
them from) the filesystem. It provides an add() method that can add
a PEL object to the repository.

Now, when the Manager class sees an OpenBMC event log created with the
RAWPEL metadata in the AdditionalData property that points at a file
that contains a PEL, it can save that PEL. Before the PEL is saved, the
log ID and commit timestamp fields in the PEL will be updated - the log
ID to a unique value, and the timestamp to the current time.

Change-Id: I8dbaddf0f155bcb6d40b933294ada83feb75ce53

show more ...


# cb6b059e 16-Jul-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Add PEL class

This class represents a Platform Event Log.

A PEL consists of sections, and this commit just adds support for the
only required sections - the Private Header

PEL: Add PEL class

This class represents a Platform Event Log.

A PEL consists of sections, and this commit just adds support for the
only required sections - the Private Header and User Header, by
including those specific objects. More will be added in the future.

The only constructor provided in this commit is to construct the object
from an existing flattened PEL buffer. This is for use in the case when
a PEL is received from off the BMC, such as from the host. Future
commits will add support for creating PELs from OpenBMC event logs.

Since there aren't objects yet for every PEL section, the class cannot
make a full flattened PEL without still keeping around the original PEL
data it received in the constructor as mentioned above. So for now it
will keep that data and just overlay the sections it does support when
flattening. In the future, a fully formed PEL will be able to be
constructed from just flattening the section objects in the correct
order.

This commit provides a few public methods of note:

* data() - returns a flattened PEL
* assignID() - sets a unique ID in the log ID field in the Private
Header
* setCommitTime() - Sets the commit timestamp in the Private Header
to the current time
* valid() - Says if the PEL is properly formed

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

show more ...


# 03c1d915 10-Jul-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Add UserHeader class

The second section in a PEL is always the 'User Header' section. This
commit adds a class to represent that. Right now, the only constructor
available is

PEL: Add UserHeader class

The second section in a PEL is always the 'User Header' section. This
commit adds a class to represent that. Right now, the only constructor
available is filling in its data fields from a PEL stream.

Several of the fields in this section have predefined values that are
defined by the PEL specification. Defining any constants or enums for
those will be left to future commits where they will actually be used.

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

show more ...


# d3335dfa 10-Jul-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Add PrivateHeader class

The first section in a PEL is always the 'Private Header' section. This
commit adds a class to represent that. Right now, the only constructor
availabl

PEL: Add PrivateHeader class

The first section in a PEL is always the 'Private Header' section. This
commit adds a class to represent that. Right now, the only constructor
available is filling in its data fields from a PEL stream.

The Section base class, which will be the base class of all PEL
sections, is also being introduced here. It contains the section header
structure, and a valid flag that derived classes can use.

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

show more ...