summaryrefslogtreecommitdiffstats
path: root/extensions/openpower-pels
Commit message (Collapse)AuthorAgeFilesLines
* PEL: Sanitize the SRC ASCII string fieldHEADmasterMatt Spinler2020-02-171-0/+9
| | | | | | | | | | | | | | | | | This field may be displayed by things like a web UI and LCD panel, so on unflattening convert any disallowed characters to a space. Only allow: alphanumeric, '.', ':', '/', ' '. When a host PEL is received, the PEL will be unflattened and reflattened when the commit timestamp and PLID are modified, and this will be fixed up then. This matches other service processor implementations that dealt with PELs. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I7afe64e199ebd2448b54e4ba5769de436d30b9ba
* PEL: Add ESEL event log keyword to READMEMatt Spinler2020-02-141-0/+15
| | | | | | | | Explain how the ESEL keyword can be used in the Additional Data event log property to send in PEL data. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I47fd97c4ee5f756b7d0139a4041f1e395c2859b3
* PEL: Add PELs from ESELsMatt Spinler2020-02-142-45/+143
| | | | | | | | | | | | | | | | | 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
* PEL: New event log when receiving bad host PELMatt Spinler2020-02-142-2/+56
| | | | | | | | | | | | Create a new event log/PEL when a PEL comes in from the host but it isn't valid. The PEL subsystem used is 'platform firmware' because the code won't know which specific host subsystem it came from. The severity is unrecoverable as opposed to informational to make it easier to notice. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I933e5c82f1ef755c6266604fbdec6d0c1fe5b784
* PEL: Create error log for 'bad PEL'Matt Spinler2020-02-142-6/+39
| | | | | | | | | Create an event log (and a PEL) for the case when the host rejects a PEL because it is malformed. This requires a new message registry entry for the error. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ibd52921b5d6020f98b457b9ee0b3bb4f0b95e707
* PEL: Add ability to create event logsMatt Spinler2020-02-143-6/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* PEL: Allow adding to AdditionalDataMatt Spinler2020-02-141-1/+22
| | | | | | | | | Add an interface to add a key/value pair to the data stored in the AdditionalData class. Also add an interface to get to the raw underlying map of data. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I61200f92b45be8e86992d3f4888698d6a5bbe251
* PEL: Print Failing MTMS section into JSONHarisuddin Mohamed Isa2020-02-075-15/+38
| | | | | | | | | | | | | | | | | Remove any trailing whitespace for serial number. "Failing MTMS": { "Section Version": "1", "Sub-section type": "0", "Created by": "0x4552", "Machine Type Model": "OPWR-131", "Serial Number": "1318ABA" }, Testing: Manually run peltool and verified output. All unit tests passed. Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com> Change-Id: I7a05790bdf406ef6d7946ffae831a45ee6dd5cda
* PEL: Fix SRC Format and more SRC flags in peltoolHarisuddin Mohamed Isa2020-02-062-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | "Primary SRC": { "Section Version": "1", "Sub-section type": "0", "Created by": "0x4552", "SRC Version": "0x02", "SRC Format": "0x60", "Virtual Progress SRC": "False", "I5/OS Service Event Bit": "False", "Hypervisor Dump Initiated":"False", "Power Control Net Fault": "False", "Valid Word Count": "0x04", "Reference Code": "B700F142", "Hex Word 2": "00000060", "Hex Word 3": "00000001", "Hex Word 4": "00000005" } Testing: Manually run peltool and verified output. All unit tests passed. Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com> Change-Id: Ic510b4bcae5eba0ac3cf52f83a10dfa3fb48e533
* PEL: Print SRC section into JSONHarisuddin Mohamed Isa2020-02-0311-51/+530
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For BMC created errors, look up the reason code in the message registry for error description and also meaning of data stored in hexwords 6-9 (if any). Added registry message field in peltool list output. "Primary SRC": { "Section Version": "1", "Sub-section type": "1", "Created by": "0x1000", "SRC Version": "0x02", "SRC Format": "0x55", "Power Control Net Fault": "False", "Error Details": { "Message": "PS 0x64 had a PGOOD Fault", "PS_NUM": "0x64" }, "Valid Word Count": "0x09", "Reference Code": "BD8D1001", "Hex Word 2": "00000055", "Hex Word 3": "00000010", "Hex Word 4": "00000000", "Hex Word 5": "00000000", "Hex Word 6": "00000064", "Hex Word 7": "00000000", "Hex Word 8": "00000000", "Hex Word 9": "00000000" } "Primary SRC": { "Section Version": "1", "Sub-section type": "0", "Created by": "0x4552", "SRC Version": "0x02", "SRC Format": "0x2008000", "Power Control Net Fault": "False", "Valid Word Count": "0x04", "Reference Code": "B2001020", "Hex Word 2": "02008000", "Hex Word 3": "00000000", "Hex Word 4": "00000012", "Callout Section": { "Callout Count": "1", "Callouts": [{ "FRU Type": "Symbolic FRU", "Priority": "Medium Priority", "Part Number": "NEXTLVL" }] } } Testing: Manually run peltool and verified out. All unit tests passed. Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com> Change-Id: I124627ba785413ebda02305b7d9f95431922e714
* PEL: Save BMC Version ID in UserData sectionMatt Spinler2020-01-313-6/+62
| | | | | | | | When creating a PEL, save the VERSION_ID value from the /etc/os-release file in the UserData section that keeps useful system information. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I6d9008b15c5347239bf8c21ef79219d3b6ee08e6
* PEL: Save process name in a UserData sectionMatt Spinler2020-01-313-10/+88
| | | | | | | | | | | | | | When creating a new PEL, add a UserData section that contains various pieces of system information that will be saved in every error log. In this first commit, just save the process name of the creator, provided they passed in the '_PID' AdditionalData item containing their PID. Future commits will add other items like certain D-Bus properties. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I7139b4056e494277ff3388bfa8a00002c9c89dc1
* PEL: Move util namespace to bottom of pel.cppMatt Spinler2020-01-311-37/+37
| | | | | | | | It makes more sense for the util code to be at the bottom of the file rather than in the middle. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I46fe120849377bdf9397aa72addda1e9dfa4e56c
* PEL: Check UserData section size before addingMatt Spinler2020-01-312-1/+11
| | | | | | | | | | | | | | While not really likely, it is technically possible that the AdditionalData property in an event log is large enough that saving it into a UserData section could make the PEL exceed its maximum size of 16KB. To guard against this, check that an overflow wouldn't occur before saving that section in the PEL. In future commits, other UserData sections will be added where this check will also be needed. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Iac312a24b1d445e93de5a09f35a43d940571a3f8
* PEL: Add function to get PEL sizeMatt Spinler2020-01-312-0/+29
| | | | | | | | | | | 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
* openpower-pels: react to PLDM API changeDeepak Kodihalli2020-01-291-1/+1
| | | | | | | | | The PLDM NewFileAvailable request now takes in a uint64 file size instead of uint32. A corresponding request buffer size correction has been added. Change-Id: I68f4a69164b4a3924f48621f94d5492eab230f0e Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* PEL: Add additional HostNotifier documentationMatt Spinler2020-01-271-0/+28
| | | | | | | Give a high level overview of how the class works. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I83957e572239997cde6757abb77481890cf98b7a
* PEL: Close PEL FD after getPEL callMatt Spinler2020-01-272-0/+47
| | | | | | | | | 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
* PEL: Add PEL D-Bus methodsMatt Spinler2020-01-272-6/+149
| | | | | | | | | | | | | | | | | | 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
* PEL: Create the PLDMInterface classMatt Spinler2020-01-271-0/+9
| | | | | | | | | | | | | | Create the PLDMInterface class and pass it into the constructor of the Manager class. This is done at this level so that it can be easily mocked for testing. Add a --enable-dont-send-pels-to-host configure option for systems that don't need PELs sent to the host. If this is set, then don't create and pass in the PLDMInterface class, and then the Manager class won't create a HostNotifier class to do the sending. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I34059470ee117e65c5c02b684a9d916571135bfd
* PEL: Add PLDM command handlerMatt Spinler2020-01-273-0/+446
| | | | | | | | | | | | | | | | Derive a PLDMInterface class from the HostInterface class to implement sending the 'new file available' PLDM command to notify the host of the ID and size of PELs. The command response is received asynchronously by watching for activity on the MCTP file descriptor that was used for the command. If a response isn't received in 10 seconds, it will be considered a failure. Both on response success and failure the class will call the registered callback function and pass it the result. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ica00da590628cc81114a48e2831a436dc2115269
* PEL: Receive a 'bad PEL' indication from hostMatt Spinler2020-01-272-0/+25
| | | | | | | | | | | | | | | | | | | | If the code somehow sent the host a malformed PEL, it will respond with the 'Ack PEL' PLDM command with a special value that indicates this, and the PLDM daemon will relay it to this daemon. In this case, change the host transmission state to 'bad' so it doesn't get sent again. This should never happen as the Repository class already validates PELs and removes bad ones, though maybe the host and Repository have different ideas about what constitutes a malformed PEL. In the future, if event logging support is added to the PEL code running inside the logging daemon, it may be a good idea to create a new PEL for this case. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Id6f9fd37764bf5b5d09b4277a1e36b1f26b3e9a5
* PEL: Notifier support for 'host full'Matt Spinler2020-01-272-4/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | The host firmware may have a limited size for its staging area before it passes the PELs through to the OS, and this area may fill up with PELs it can't send if there are too many or the OS isn't up yet. In this case, it will send down an 'Ack PEL' PLDM command with a special response indicating this host full condition. The PLDM daemon will then call a method on this daemon to let it know. This command handles the host full condition on the HostNotifier class. When this is set: * The PEL that hit this condition will be put back on the queue to be sent again. * No new PELs will be sent up, except as noted below * A 60s timer will be started at the end of which another attempt will be made to send a PEL, in the hopes the condition went away. - If it didn't go away, this process will repeat. - If it did go away, a successful ack will be received and things will proceed as normal. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Iaeb38f43f7acc595bcff234ba50cedf8188b3d9b
* PEL: Support for the host acking a PELMatt Spinler2020-01-272-0/+21
| | | | | | | | | | | | | After the host firmware successfully transfers a PEL to the OS, it will respond with an 'Ack' command that the PLDM daemon sends over to this daemon via a D-Bus method call. Add support to the HostNotifier class for this. It will change the state field in the PEL to 'acked' so that it doesn't get sent up again. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Id2a9985965017d9431419c1375d5374a2d0ae00b
* PEL: On new PEL, send to host if necessaryMatt Spinler2020-01-272-1/+61
| | | | | | | | | | | | | | | | When a new PEL comes in, send it to the host now if the host is up and the class is currently idle. The PLDM command will be dispatched in a standalone function called from the event loop so that this function, which may be part of the 'Create new log' D-Bus method response, can return first. Also added testcases to start verifying these paths now that there is a full mock of the HostInterface class. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ib30a99cc61be9205122287ba310bc315d762e863
* PEL: Take a PEL off the queue and send to hostMatt Spinler2020-01-272-2/+117
| | | | | | | | | | | | | Fill in the code that looks for the first PEL on the queue that still needs to be sent up, and send it. If the failure retry timer is active, or it has already retried the max number of times, then don't send anything. In the former case the timer callback will do the send, and in the latter the next time a log comes in it will start trying again. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ibb9692ca83b23e5e021db8b8a89b5549fb979df1
* PEL: Fill in host state change callbackMatt Spinler2020-01-272-0/+53
| | | | | | | | | | If the host is up, start sending PELs. If the host is off, move all of the PELs that are sent but not acked back to the queue to be sent again next time. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I66d382a85afc88f6b23367fb515df4dbe5326be1
* PEL: Fill in host command response handlerMatt Spinler2020-01-272-1/+79
| | | | | | | | | | | | If notifying the host of a new PEL was successful, then it will modify the PEL's host transmission state to 'sent' and add it to the list of sent PELs. If there was a failure, then a timer will be started so a retry can be done. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I77000c603a18726d4cdbb3920ca349e69198fb7f
* PEL: Logic to enqueue a PEL to send to hostMatt Spinler2020-01-272-0/+33
| | | | | | | | | Fill in the function to determine if a PEL needs to be placed on the qeueue to be sent up to the host. It involves checking both the host and HMC transmission states, as well as the PEL action flags field. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I9f1a9fba1b7e6dc7a167f1c7e9dfd6c40d90883f
* PEL: Add HostNotifier classMatt Spinler2020-01-274-2/+259
| | | | | | | | | | | | | 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
* PEL: Add HostInterface base classMatt Spinler2020-01-271-0/+211
| | | | | | | | | | | | This is an abstract base class that is overridden to send a command to the host (such as a hypervisor) to notify it of new PELs. The only concrete implementation is using the 'New File Available' PLDM command. Using this base class allows the PLDM aspects to be mocked in testcases that involve queuing and sending PELs. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I830298d0fd949b4268c31c83acafe2afd90dd4cb
* PEL: Print the JSON formatted UserDataMatt Spinler2020-01-227-8/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* PEL: Print OBMC event log ID in peltoolMatt Spinler2020-01-211-0/+2
| | | | | | | | | | | In the PrivateHeader section, add an entry into peltool's JSON output for the OpenBMC event log ID. This is a reserved field in the PEL spec, but we are using it to associate the PEL to the BMC event log it came from. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Id347aa67f79d7f5fac1e572de100755df7b29e6e
* PEL: Print host trans state in peltoolMatt Spinler2020-01-213-0/+26
| | | | | | | | In the UserHeader section, add an entry into peltool's JSON output for the host transmission state. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ie906a447859e30175652d291ef2f929e8a7077f6
* PEL: API for getting if system is HMC managedMatt Spinler2020-01-151-0/+16
| | | | | | | | | | | | | | | Add an API to the DataInterface class for determining if the system is HMC (hardware management console, which usually reference to a specific set of software and hardware that connects to IBM servers) managed. As of now there is no way to determine this, so just return the default of false. This status impacts which PELs are sent to the host. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I803bc71c271dec6d68821dd36089e7a46461aac6
* PEL: Trace when event logs don't create PELsMatt Spinler2020-01-151-3/+22
| | | | | | | | | | | | | | 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
* PEL: Print Private Header into JSON alignedHarisuddin Mohamed Isa2020-01-141-11/+12
| | | | | | | | | | | | | | | | | | "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
* PEL: Taking regex calls out of PEL listing functionAatir2020-01-141-20/+17
| | | | | | | Taking out regex calls to improve time complexity Change-Id: Id0ca32bf78b006b3c8e03ac95206c670f92d4002 Signed-off-by: Aatir <aatrapps@gmail.com>
* PEL: PEL listing time fixAatir2020-01-141-96/+196
| | | | | | | | 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>
* PEL: Display PEL by IDAatir2020-01-141-6/+74
| | | | | | | This command displays a PEL by id. Change-Id: I26b8d30b886f47c02dd8cf648e6a261a6867a048 Signed-off-by: Aatir <aatrapps@gmail.com>
* PEL: Print action flags into JSON alignedHarisuddin Mohamed Isa2020-01-098-54/+166
| | | | | | | | | | | | | | | | | | | "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
* PEL: Add API to get the PLDM instance IDMatt Spinler2019-12-172-2/+47
| | | | | | | | | | | | | 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
* PEL: Add repo function to get a PEL FDMatt Spinler2019-12-172-0/+33
| | | | | | | | | | | 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
* PEL: Filled in PEL value descriptionsHarisuddin Mohamed Isa2019-12-121-133/+157
| | | | | | | | | | | 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
* PEL: Fix message registry schema typoMatt Spinler2019-12-111-1/+1
| | | | Change-Id: Ic20d6560a79dc8cc871ebc1ab64ce5aefc2ccfe6
* PEL: Put back in the default error log capsMatt Spinler2019-12-101-2/+0
| | | | | | | | | | 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
* PEL: Add ExtendedUserHeader section classMatt Spinler2019-12-096-17/+460
| | | | | | | | | | | | | | 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
* PEL: Add APIs to read the FW versionsMatt Spinler2019-12-092-0/+69
| | | | | | | | | | | | | 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
* PEL: Add constructors to BCDTimeMatt Spinler2019-12-091-0/+15
| | | | | | | | 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
* PEL: Add Repo API to update transmission statesMatt Spinler2019-12-092-0/+111
| | | | | | | | | 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
OpenPOWER on IntegriCloud