| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To help show which events are missing from the PEL message registry,
add a journal entry for when an OpenBMC event log name isn't found
in the registry and a PEL won't be created. Eventually, this will
be replaced with creating a brand new PEL that contains the event
log info.
In addition, add a journal entry displaying the SRC ASCII string of
newly created PELs.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I1228339cfa7d1d5aa60ef3b3ce2b2c0424ab0bf4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"Private Header": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "0x1000",
"Created at": "12/05/2019 18:32:42",
"Committed at": "12/05/2019 18:32:42",
"Creator Subsystem": "BMC",
"CSSVER": "",
"Platform Log Id": "0x50000C00",
"Entry Id": "0x50000C00"
}
Testing: Manually run peltool and verified output
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: Ib6ef49f1b29486a97e86700b19ac982e43bede37
|
|
|
|
|
|
|
| |
Taking out regex calls to improve time complexity
Change-Id: Id0ca32bf78b006b3c8e03ac95206c670f92d4002
Signed-off-by: Aatir <aatrapps@gmail.com>
|
|
|
|
|
|
|
|
| |
Previously PELs were being flattened twice before being listed.
This commit brings it down to one.
Change-Id: I027d1e22e8d6d793c30c6f26a06178a448a6c301
Signed-off-by: Aatir <aatrapps@gmail.com>
|
|
|
|
|
|
|
| |
This command displays a PEL by id.
Change-Id: I26b8d30b886f47c02dd8cf648e6a261a6867a048
Signed-off-by: Aatir <aatrapps@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"User Header": {
"Section Version": "1",
"Sub-section type": "0",
"Log Committed by": "0x4552",
"Subsystem": "System Hypervisor Firmware",
"Event Scope": "Entire Platform",
"Event Severity": "Informational Event",
"Event Type": "Miscellaneous, Informational Only",
"Action Flags": [
"Report Externally"
]
}
Testing: Manually run peltool and verified output
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: Ie8376953b5f1baa093fc0aa9564d50cd4208564e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to send a PLDM command, one must get the instance ID parameter
to use for that command from the PLDM daemon via a D-Bus method.
Implement this API in the DataInterface class, though leave the body of
it stubbed out until the PLDM daemon switches to using async D-Bus
operations as right now the logging daemon and PLDM daemon can deadlock
with each calling into the other.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I592e7bad922c725edee67003e9957388df5f195c
|
|
|
|
|
|
|
|
|
|
|
| |
Add Repository::getPELFD() to return a file descriptor to a PEL data
file based on its ID.
This will be used by a future D-Bus method to return the descriptor to
the PLDM daemon.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I1110a514e30a9387d9672e42862139b988717c53
|
|
|
|
|
|
|
|
|
|
|
| |
Updated getValue to return value description instead of registry name.
Updated unit test to add checking of value description.
Testing: Ran unit test successfully on QEMU and also verified peltool
output
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: Icf64f51a467c3bd4dd9bbcd78aea3df966b20eb7
|
|
|
|
| |
Change-Id: Ic20d6560a79dc8cc871ebc1ab64ce5aefc2ccfe6
|
|
|
|
|
|
|
|
|
|
| |
Since there is no code in place yet to purge old logs after some amount
of total space is consumed, it will be safest to put back in the default
cap of 200. If more than 200 is needed in the short term, we can use
the currently available configure option to increase the cap.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ide1af5432271817f30bfaf0b065c35906aaa05cf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add methods to the DataInterface class to read the BMC and server
firmware versions. The server firmware version represents the version
of all firmware images that are in the flash image, not just the BMC.
There is nowhere to get that version yet, so this commit just has a
placeholder.
These will be used by the ExtendedUserHeader section.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I47389714c987337cb96c72b6bf2b270c78003357
|
|
|
|
|
|
|
|
| |
Add constructors to set all members to zero initially or pass
them all in.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ic28cee19014c739f331fd0498229dfb503b0df88
|
|
|
|
|
|
|
|
|
| |
Provided APIs for the Repository class to update the host and HMC
transmission states on a PEL it contains. It saves the updated PEL data
in the filesystem.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iadbc589ee85d4408339e1171c36b8324910f4f0a
|
|
|
|
|
|
|
|
|
|
| |
When the Repository class starts up, if it finds any existing PELs with
a host transmission state of 'sent', set it back to 'new' so that it
will get sent again, as the BMC restarted or the daemon crashed before
the host could ack it.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ieeca2c1a92eabc0a22051be6b87cecbe0b1d519d
|
|
|
|
|
|
|
|
| |
When a PEL is added to the repository, ensure that the host and HMC
transmission states are set to 'new'.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I9edb9d388a61742c28c1df1552b9678d10b9fcc4
|
|
|
|
|
|
|
|
|
| |
Save the host and HMC (Hardware Management Console) transmission
states in the PEL attributes map so that external callers can
get to them without having to unflatten a PEL from the filesystem.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: If8b396d3c342af2c7a3c34f4f1bb0a7da075e47c
|
|
|
|
|
|
|
|
| |
Pull the code that writes a PEL object to a file into a separate
function so that it can be called in multiple places.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ic5701fdfb03cca915520222bbbd8bb92a9c47c49
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a reserved word in the UserHeader section to store some
PEL states:
* Host Transmission State:
- States involving the progression of a PEL being sent to the
operating system.
* HMC Transmission State:
- States involving the progression of a PEL being sent to the
hardware management console, if there is one attached.
- Usually, an HMC refers to a specific set of hardware and software
sold by IBM that connects to OpenPower systems which has specific
software to deal with receiving PELs.
It is possible that there is an implementation that won't need to send
PELs to either of these entities, in which case these states will
just be unused and left at zero.
This is the same location that other service processor implementations
have stored transmission states.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6a2bfee15336dbd564aeaded88effa55ede0d6c4
|
|
|
|
|
|
|
|
|
| |
getValue function is now being used to get field values for all the
different sections. Therefore, it makes sense to
remove the older implementation of this function from userHeader class.
Change-Id: I041b8c5e0548e9f7ee354f21d2e248ed946df5ec
Signed-off-by: Aatir <aatrapps@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PelTool commands for printing a list of PELs.
PEL list sample:
{
"0x50000004": {
"SRC": "BD8D1001",
"PLID": "0x50000004",
"CreatorID": "BMC",
"Subsystem": "bmc_firmware",
"Commit Time": "10/24/2019 15:50:08",
"Sev": "unrecoverable",
"CompID": "0x1000"
}
}
Change-Id: Ifd864a6561c09de098689195edcf107b3fe550e3
Signed-off-by: Aatir <aatrapps@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PELTool application is able to convert sections to JSON. This commit
takes care of converting the private header section to JSON.
private header section in JSON sample:
"Private Header":[
{"Section Version": "1"},
{"Sub-section type": "0"},
{"Log Committed by": "0x1000"},
{"Entry Creation": "10/24/2019 15:50:08"},
{"Entry Commit": "10/24/2019 15:50:08"},
{"Creator ID": "BMC"},
{"Creator Implementation": ""},
{"Platform Log ID": "0x50000004"},
{"Log Entry ID": "0x50000004"}
]
Signed-off-by: Aatir <aatrapps@gmail.com>
Change-Id: I8b0d7dc7b70cd2a03f67f7c9a48755803634005d
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of the Repository class only storing the path to a PEL file for
a corresponding PEL ID, change it to a structure that includes the PEL's
size and action flags as well as the path. This way, a PEL won't have
to be read from the filesystem to find these values every time someone
needs them.
These new fields will be needed by the code that sends PELs to the host.
Change-Id: I7650b6cbad12cc120426854767403f5cba2ee572
|
|
|
|
|
|
|
|
|
|
|
| |
Add functionality to the Repository class to be able to call functions
provided by others when PELs are added or removed from the repository.
This will be used in the future for things like knowing when a new PEL
is added so it can be sent to the host.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I2effc9d5fa9a38890311a88bcfb07eed1292a453
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the DataInterface class to keep track of if the host is up and
running by keeping track of the OperatingSystemState property on the
xyz.openbmc_project.State.OperatingSystem.Status interface on the
/xyz/openbmc_project/state/host0 object path.
Added a isHostUp() function as well as a subscribeToHostStateChange()
function to allow a user to pass in a function to be run when the host
changes state.
Property values of 'BootComplete' or 'Standby' mean that the host is
running, anything else is considered not running.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I096b2bc4014dff9be85a4bbd74ef27193fd338fb
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor DataInterface to hold the data members in the base
class, and use the derived class for calculating them.
This will make it consistent with functionality that will be
added in the future.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: If6f2ba1890df296cb612c8a64dd60db72c70c46d
|
|
|
|
|
|
|
|
| |
Hex dump function had a bug where the last line was getting printed
incorrectly.
Signed-off-by: Aatir <aatrapps@gmail.com>
Change-Id: I6acab7b57baf376b66b461c31f91a07377a7354a
|
|
|
|
|
|
|
|
|
| |
The spec says that all section sizes must be a
multiple of 4 bytes, so pad the User Data section that
contains the AdditionalData JSON out to that.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I30b46a34604ee10d67755f51fd7d9c41b2f75c9f
|
|
|
|
|
|
|
|
|
| |
CI will run any files called run-ci.sh it finds in a repo, so
add a script of that name to run process_registry.py against
the message registry to check it for errors.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I35da7c1454696b90ec88b3545992414160ae920b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PELTool application is able to convert sections to JSON. This commit
takes care of converting the user header section to JSON.
user header section in JSON sample:
"User Header":[
{"Section Version": "1"},
{"Sub-section type": "0"},
{"Log Committed by": "0x2000"},
{"Subsystem": "bmc_firmware"},
{"Event Scope": "entire_platform"},
{"Event Severity":"unrecoverable"},
{"Event Type": "na"}
]
Signed-off-by: Aatir Manzur <aatrapps@gmail.com>
Change-Id: I0dca1d87019b9e62d711ee6d034f2e8bc0574c2e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the xyz.openbmc_project.Common.Error.* errors from
xyz/openbmc_project/Common.errors.yaml file in the
phosphor-dbus-interfaces repository.
It is possible that errors defined in these YAML files never have event
logs created out of them, but instead are intended to just be returned
on failed D-Bus operations, such as a method failure. Aside from
searching the whole OpenBMC code base there is no way to know, so just
define PELs for all of them to be safe.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I00ce1e9423c2b260f78d2d3d0aa8a495c3b13504
|
|
|
|
|
|
|
|
|
| |
As phosphor-log-manager and peltool share source files, create libpel.la
to contain those common files that will then be included by both of
them.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ie3882d1b0929bace10ae638a8762e2b804e594c7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Action Flags bits in the PEL need to be in agreement with other PEL
fields, such as if the severity is informational then the 'report' flag
cannot be on. In fact, for most logs all of these flags can be deduced
from the other PEL fields.
So, to avoid the case of the action flags in the registry not matching
the other PEL fields, make them optional and the BMC code will set them
appropriately. And when they are specified, the BMC code will still run
through the same code to ensure everything is in agreement.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I5bea83d01846d7a2d3307666e6d0758a99229e3f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a for_each() function to the PEL repository that takes a user
defined function that will be run on every PEL, unless that function
says to stop early.
The user defined function is a std::function<bool>(const PEL&);
For example, to save up to 100 IDs in the repo into a vector:
std::vector<uint32_t> ids;
ForEachFunc f = [&ids](const PEL& pel) {
ids.push_back(pel.id());
return ids.size() == 100 ? true : false;
};
repo.for_each(f);
This will be used to find which PELs still need to be sent up to the
host after a reboot, among other things.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ic60525a8ab3dd593ba37e43a6cb0b3db8dda7cee
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
It doesn't modify the object, so can be const.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ib3bbe2b8467578b0cddce0284aa6ae95f1ad826a
|
|
|
|
|
|
|
|
| |
Make the flatten functions const for the various classes
that represent the SRC substructures.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I08f4ae6de65e269c9f1b82315115969c8552c782
|
|
|
|
|
|
|
|
| |
Future commits will eventually make every flatten function const, as
they should be since flattening an object should not affect it.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I285963805800b29163c5a3979a33590f64c03d00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I31b12f509d32b79064a8a427af35e6a310273051
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Move them to a header file so other files can use them in the future.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Icb604489e9629724a79d2fc8b110e461b6aa6e01
|
|
|
|
|
|
|
|
| |
A future commit will fill in the field if it isn't
present.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I67371433162ce2198a362796d274695a1bd6a6dc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Add a section in the PEL README to document the UserData sections
that will be created in every new PEL.
Change-Id: I9ff9a69f1d22b56aa8bb9d559802d0595d787c0a
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Look up incoming OpenBMC event logs in the message registry and create
PELs for them if a registry entry is found.
What happens when an event log can't be found in the message registry,
such as creating a different PEL, will be addressed in a separate
commit.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I45c634830021fdf2efb54e3cbfd6d496fd3d7d01
|