summaryrefslogtreecommitdiffstats
path: root/extensions/openpower-pels/data_interface.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PEL: Save BMC Version ID in UserData sectionMatt Spinler2020-01-311-5/+25
| | | | | | | | 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: Add API to get the PLDM instance IDMatt Spinler2019-12-171-1/+23
| | | | | | | | | | | | | 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 APIs to read the FW versionsMatt Spinler2019-12-091-0/+27
| | | | | | | | | | | | | 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: Keep track of if host is runningMatt Spinler2019-12-031-0/+83
| | | | | | | | | | | | | | | | | 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
* PEL: Add license prologue to source filesMatt Spinler2019-11-061-0/+15
| | | | | Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I31b12f509d32b79064a8a427af35e6a310273051
* PEL: Interface to collect system dataMatt Spinler2019-09-271-0/+123
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
OpenPOWER on IntegriCloud