summaryrefslogtreecommitdiffstats
path: root/ipmi_fru_info_area.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fru: support two time string formatsPatrick Venture2019-08-081-3/+26
| | | | | | | | | | | Support parsing two time string formats to enable use of ipmi-fru-parser and entity-manager to provide FRU details on dbus. Tested: Verified the entity-manager dbus output for the FRU MfgDate is now parsed correctly. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I053ec225b51166269c5a5a800ad8d607fd0cc233
* fru: use ipmifruproperty for property lookupPatrick Venture2019-08-011-4/+4
| | | | | | | | | | | | | | | | | | The member IPMIFruData::property was unused and instead the property lookup was performed with the phosphor-dbus-interface property name. The IPMIFruData::property field is meant to map from dbus property to FRU property to allow a variety of dbus mappings. Tested: Verified the member was unused. Tested: Verified that a configuration yaml mapping is respected and ipmid will report the information expected given a FRU published to dbus. Note: The fields for IPMI FRU properties were taken from the example YAML and are expected to be what was used by machines leveraging this feature. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I44f73b67ecdeae2d772daa38cc21cc18cdf9c7ce
* ipmi_fru_info_area: Handle exception during parsing of chassis typeOskar Senft2019-02-111-1/+11
| | | | | | | This is a fix for 40f59e2c50572705496ae743577f124f24afd77e. Change-Id: I850f87968600759c2758841803ebd23c0856319d Signed-off-by: Oskar Senft <osk@google.com>
* ipmi_fru_info_area: Pad output buffer.Oskar Senft2018-12-171-0/+17
| | | | | | | | | Always pad the output buffer to the maximum IPMI FRU size. This enables tools like ipmitool to write a new FRU blob with data longer than the original payload. Change-Id: Id6eb2c80504fb42ac72d7b643d186e9641a0832c Signed-off-by: Oskar Senft <osk@google.com>
* ipmi_fru_info_area: Add support for chassis typeOskar Senft2018-12-171-1/+21
| | | | | Change-Id: Ifd89fb37dc8515757d6014edeb028eb25e37bb95 Signed-off-by: Oskar Senft <osk@google.com>
* add std namespace prefix to common methodsPatrick Venture2018-09-251-2/+3
| | | | | | | | Standard clib methods should be explicitly grabbed from the standard namespace. Change-Id: I8bcfcb260a99180d535ec8102c1a24c318cbc209 Signed-off-by: Patrick Venture <venture@google.com>
* add .clang-formatPatrick Venture2018-09-071-98/+97
| | | | | Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5 Signed-off-by: Patrick Venture <venture@google.com>
* Validate Mfg Date/Time in Board Info AreaNagaraju Goruganti2018-07-311-2/+5
| | | | | | | | | | | -FRU's Mfg Date/Time is the number of minutes from 0:00 hrs 1/1/96 and a 3 byte field length for Mfg Data/Time in Board Info Area. -So max Mfg date equals to 1006632900 secs from 00:00:00 hrs 1/1/1996. Resolves openbmc/openbmc#3202 Change-Id: I6a71b8b881b699195fee2a18b743e195fa4703a5 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Fix FRU BuildDate DBus/IPMI exportingAndres Oportus2018-04-171-4/+25
| | | | | | | | | | | | | | | | When BMC exports the date into DBUS it translates/expands the 3 bytes FRU format date into an easy to read string as in "2015-11-06 - 22:23:00", when exporting the DBUS date back to IPMI it needs to translate back this date into the 3 bytes FRU format, without this fix we get a build date in 1996 that is the epoch for the FRU date format. This change reconstructs the FRU date from the easy to read string for exporting into IPMI. Tested: Manual check that BuildDate from busctl and ipmitool match Resolves openbmc/openbmc#3013 Change-Id: I0fd1dd8f945f18b53c14bff321c9e233fdb2d742 Signed-off-by: Andres Oportus <andresoportus@google.com>
* Fix the typoRatan Gupta2018-02-131-7/+7
| | | | | Change-Id: I5eff36514969ca7e301578f0913b5da250b426c9 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* FRU: Change the type code to ASCIIRatan Gupta2018-02-131-2/+15
| | | | | | | | | | | | | | | In board and product area format there is type and length field for each field. 6-7 bit of typelength field specifies the type and first five bits specify the length.a eg:- Board Manufacturer type/length byte followed by actual number of bytes defined in first five bits of type length of Board Manufacturer field. Change-Id: Iaaf608cc93829fb1dd8d0c54a49bd467a7cadbea Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* FRU: Fix the area offset calculation of Read FRU Data responseRatan Gupta2018-02-131-8/+16
| | | | | | | | Common header contains the offset of areas This commit fixes the offset calculation. Change-Id: Iba002d1832063a329df43834d4e30d359ecaf7b0 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* construct IPMI FRU Info data based on inventory dataMarri Devender Rao2017-07-251-0/+369
Change-Id: If8ee75b48323d29b568ef807d381a3e5600527d5 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
OpenPOWER on IntegriCloud