History log of /openbmc/phosphor-logging/extensions/openpower-pels/user_data.hpp (Results 1 – 6 of 6)
Revision Date Author Comments
# 3fdcd4e8 25-Aug-2020 Harisuddin Mohamed Isa <harisuddin@gmail.com>

PEL: Fixed Userdata section parsing

A previous commit incorrectly tries to call python parsers when they do
not exist. This fixes it.

Signed-off-by: Harisuddin Mohamed Isa <hari

PEL: Fixed Userdata section parsing

A previous commit incorrectly tries to call python parsers when they do
not exist. This fixes it.

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

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


# cbf3c4d4 24-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Allow shrinking of a UserData section

Add a shrink() function to the UserData class (with a virtual version of
it in the Section base class) that will shrink the class to a new size

PEL: Allow shrinking of a UserData section

Add a shrink() function to the UserData class (with a virtual version of
it in the Section base class) that will shrink the class to a new size.

This is done so that when UserData sections are added to PELs the
sections can be shrunk if necessary to keep the PEL under the maximum
size, which is 16KB.

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

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


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


# 51c9263f 06-Sep-2019 Aatir Manzur <aatrapps@gmail.com>

PEL: User Data class

This class is used for accessing the UserData section of a PEL.

This section contains free format data that can be identified by the
component ID, subtype,

PEL: User Data class

This class is used for accessing the UserData section of a PEL.

This section contains free format data that can be identified by the
component ID, subtype, and version fields in the section header.

Signed-off-by: Aatir Manzur <aatrapps@gmail.com>
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I1223f84353e81202d1ff63c00f3d926cda4994e5

show more ...