df797f2b | 09-Jul-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Add BCD time helpers for PELs
A PEL stores time in BCD, with a byte each for: * year MSB * year LSB * month * day * hour * minutes * seconds * hundredths
This commit adds a structure to repres
PEL: Add BCD time helpers for PELs
A PEL stores time in BCD, with a byte each for: * year MSB * year LSB * month * day * hour * minutes * seconds * hundredths
This commit adds a structure to represent this, and functions to: * Create a BCD structure from a std::chrono::time_point * Convert any number to BCD * Write the BCD structure into a Stream * Extract a BCD structure from a Stream
Refresher: The BCD value of 32 is 0x32.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I09ea4098f3a3981931f595d11fb63aff31d9fb0d
show more ...
|
113ad28c | 09-Jul-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Add Stream class to manipulate PEL data
This stream inserts data into and extracts data from the vector<uint8_t> that it is given in its contructor. That vector is how PEL data is stored. Thi
PEL: Add Stream class to manipulate PEL data
This stream inserts data into and extracts data from the vector<uint8_t> that it is given in its contructor. That vector is how PEL data is stored. This object takes care of the endian conversion for fields that require it, as PEL data is big endian.
On writes, it will expand the vector if necessary.
An exception will be thrown an invalid access is attempted, such as trying to extract a value when at the end of the data.
It provides >> and << operators for common data types, as well as read()/write() functions when using other types.
Example:
std::vector<uint8_t> data; Stream stream{data};
uin32_t value = 0x12345678; stream << value;
stream.offset(0);
uint32_t newValue; stream >> newValue;
assert(value == newValue);
uint8_t buf[3000] = {0}; stream.write(buf, 3000);
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I8dc5566371749b45a260389a564836433323eef8
show more ...
|
4e8078c0 | 09-Jul-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Add PEL Manager class
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 P
PEL: Add PEL Manager class
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
show more ...
|
15ee6aee | 08-Jul-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Add class to wrap AdditionalData
The AdditionalData property on the xyz.openbmc_project.Logging.Entry interface is a vector of strings of the form: "KEY=VALUE". The PEL processing code will b
PEL: Add class to wrap AdditionalData
The AdditionalData property on the xyz.openbmc_project.Logging.Entry interface is a vector of strings of the form: "KEY=VALUE". The PEL processing code will be interested in those keys and values, and this class adds a way to get at those values based on a key without having to do string parsing each time. It returns an std::optional<std::string> value, and if the key isn't found, then the std::optional value will be empty.
For Example: AdditionalData ad{additionalDataPropertyValue};
// Get the value for the FOO key std::optional<std::string> val = ad.getValue("FOO");
if (val) std::cout << (*val).size();
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I6ba458840278784b1cc6a0ed88a7fece8794df7d
show more ...
|
d68043b1 | 25-Jun-2019 |
Matt Spinler <spinler@us.ibm.com> |
PELs: Document _PID as an AdditionalData keyword
When one uses the new `Create` D-Bus API to create an event log that will be converted into a PEL, the log-manager daemon will not know the PID of th
PELs: Document _PID as an AdditionalData keyword
When one uses the new `Create` D-Bus API to create an event log that will be converted into a PEL, the log-manager daemon will not know the PID of the creator, unlike when the 'commit' or 'report' shared library APIs are used.
Document this method for allowing the creator to pass in their PID, which they can find with getpid(), if they want their PID in an event log and in the corresponding PEL.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I0fadaed301bcd87de1d4395f6c6ec0baacfe0b97
show more ...
|
3210a9f3 | 18-Jun-2019 |
Matt Spinler <spinler@us.ibm.com> |
Add initial OpenPower PEL specific documentation
Add a markdown file just for PEL specific documentation starting with how to specify a raw PEL in an OpenBMC event log.
Signed-off-by: Matt Spinler
Add initial OpenPower PEL specific documentation
Add a markdown file just for PEL specific documentation starting with how to specify a raw PEL in an OpenBMC event log.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I5bde74b3f271e334dc77f42fd38ca1fef84bd29a
show more ...
|
99c2b405 | 23-May-2019 |
Matt Spinler <spinler@us.ibm.com> |
OpenPower PEL Extension support framework
The goal of extensions is to extend phosphor-logging's `xyz.openbmc_project.Logging.Entry` log support to allow other log formats to be created without incu
OpenPower PEL Extension support framework
The goal of extensions is to extend phosphor-logging's `xyz.openbmc_project.Logging.Entry` log support to allow other log formats to be created without incurring extra D-Bus call overhead.
The README.md change in this commit provides additional documentation on how extensions work. The summary is that they allow code that resides in this repository to provide functions that can be called at certain points (startup, log creation/deletion) such that the code can then create their own logs based on the contents of an OpenBMC log. A specific extension's code is compiled in using a --enable configure option, so platforms that did not use those log formats would incur no performance/size penalties.
This commit provides the support for extensions, plus a basic OpenPower PEL (Platform Event Log) extension as the first extension. PELs are event logs used only on some OpenPower systems.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ifbb31325261c157678c29bbebc7f6d32d282582f
show more ...
|