| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the OpenPower host firmware subsystem hostboot creates PELs, those
PELs get added to OpenBMC event logs in the ESEL entry of the
AdditionalData property. (Eventually hostboot will update their code to
use PLDM to send down PELs.)
This commit looks for that ESEL keyword on incoming event logs, extracts
the PEL data, and adds it to the PEL repository with all of the other
PELs.
It extracts the PEL data by converting the string value to a vector of
uint8_ts starting after the IPMI data fields contained in that string.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I2b7f2915dceb9c306466b8181cae05a3ddd65057
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are cases where the PEL code wants to be able to create OpenBMC
event logs (and thus PELs) for problems it encounters when trying to
create or import other PELs. For example, if the host were to send down
a malformed PEL, this code would like to create a new event log and
capture part of that bad PEL in the new PEL for debug purposes, as the
malformed PEL cannot be reported anywhere since it is malformed.
To handle this, create the EventLogger class that provides a log()
function that allows the PEL extension code to create OpenBMC event logs
(and thus PELs) from within.
The underlying function to do the event log creating is passed in via
the constructor so that it can be changed for testing.
The sd_event_add_defer function (wrapped by sdeventplus) is used to
dispatch the creation of a single event, so that the entry point is from
the event loop. If there are still events left on the queue after that,
then they will be also be scheduled with sd_event_add_defer so that the
events are always created from event loop calls.
EventLogger does not allow events to be added to the queue if it is
being done from within the creation function so that the code can't
get stuck in a loop of creating a new event every time an event is
created.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6a9062074dc62cfb6043139ff0a9f3dfcd06c708
|
|
|
|
|
|
|
|
|
| |
To close the file descriptor returned from the getPEL D-Bus method call,
use the 'Defer' sdeventplus object to schedule it to happen from the
event loop.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I2b850a1c92215e7f66166cc5440d7071663065c0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the org.open_power.Logging.PEL D-Bus interface on
/xyz/openbmc_project/logging.
It provides the following methods:
* getPEL - Return a unix FD to the PEL data based on the PEL id.
* getPELFromOBMCID - Return PEL data in a vector based on the
corresponding OpenBMC event log id.
* hostAck - Called when the host has sent the PEL up to the OS,
which is the final step in the reporting process.
* hostReject - Called when the host has an issue with a PEL, either:
- The host doesn't have any more room for PELs at this moment.
- The PEL was malformed.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I633ae9e26d8336973363a1a207e8fd493f7ff7d2
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This class will watch for new PELs being created, and handle sending
them up to the host. This first commit for this class mostly just fills
in the constructor to set up the various callbacks it will use.
It is only instantiated in the Manager class if the Manager constructor
used is the one that passes in the HostInterface object, to allow for
configurations that don't need PELs passed up.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0ddcf94d047979eb78209d396c2351566c634dbe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are PEL fields that contain information that must be obtained from
various places throughout the BMC, such as the machine type/model/SN
from VPD, a few types of codes levels, etc.
Create a DataInterface class that will provide the APIs for collecting
this information. It has an abstract base class so that its functions
can be mocked to return specific data in test cases.
This commit provides APIs to read and present the machine type-model and
machine serial number. These will be used in the FailingMTM and
ExtendedUserHeader PEL sections.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iec41fea8d9510ba711475154f019bd59f0028d2e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
This class will have the logic for how to handle PELs. It will
also eventually provide D-Bus interfaces.
This first commit has stubs, plus some basic code to find if a PEL
is being passed in with the OpenBMC event log.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I55a5da4d2239c688fded31c112895c3c92bab56d
|