History log of /openbmc/openpower-vpd-parser/impl.hpp (Results 1 – 20 of 20)
Revision Date Author Comments
# 08dc31cd 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I917f3a65c985f3df3bb4d7a1bef0a13da54ab7bd
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 45d54976 03-Jul-2023 jinuthomas <jinu.joy.thomas@in.ibm.com>

Catching File Exceptions in openpower-vpd-parser

In this commit, I have added code to handle file exceptions
more effectively. By implementing proper exception handling,
we can improve the robustnes

Catching File Exceptions in openpower-vpd-parser

In this commit, I have added code to handle file exceptions
more effectively. By implementing proper exception handling,
we can improve the robustness and reliability of the file
operations within our codebase.

Here are the key changes made in this commit:

- Introduced a try-catch block around the file operation sections.
- Within the try block, added code to perform the necessary file
operations.
- Implemented catch blocks to handle specific file exceptions.
- In each catch block, included appropriate error handling logic,
such as logging the error message or displaying a user-friendly
error message.
- Ensured that the catch blocks gracefully handle the exceptions
and prevent the program from crashing or behaving unexpectedly.

By adding this exception handling code, we can anticipate and handle
potential file-related errors gracefully, providing a smoother
experience for users and preventing any unexpected crashes or data
loss. This would also aid in debugging issues.

Change-Id: I621a7f0ba68d2c298e4fea0a9d3e21d1939cd090
Signed-off-by: jinuthomas <jinu.joy.thomas@in.ibm.com>

show more ...


# c78d887c 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Ia442cdc88aaeaab2f1384cc46a56f5cd5e40f2f5
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 18bb985c 16-Nov-2022 girik <giridharikrishnan@gmail.com>

Correction of VPD using ECC

ECC algorithm corrects VPD data in 32:1 bit ratio in the
event of corruption.
Main Test Cases:
1) Check correction of KW in records.
2) Check correction while writing and

Correction of VPD using ECC

ECC algorithm corrects VPD data in 32:1 bit ratio in the
event of corruption.
Main Test Cases:
1) Check correction of KW in records.
2) Check correction while writing and reading VPD.
3) Check for Module VPD correction.

Signed-off-by: Giridhari Krishna <giridharikrishnan@gmail.com>
Change-Id: I48a3db18df9d3a2aecde814610ab1b357e6f310d

show more ...


# f31a91bc 09-Jun-2022 Sunny Srivastava <sunnsr25@in.ibm.com>

Update vpd read and write flow

The commit implement changes to log Pel and call out
FRU and record in case of any ECC failure while reading
the vpd data for the FRU and continue with the processing

Update vpd read and write flow

The commit implement changes to log Pel and call out
FRU and record in case of any ECC failure while reading
the vpd data for the FRU and continue with the processing
of rest of the records.

In case of write, BMC reboot is blocked till the VPD is
updated. Doing this will restrict any data/Ecc corruption
due to BMC reboot while VPD data is being updated.

Tested:
Corrupted vpd for tpm_wilson then triggered collection of
vpd for the FRU.
Pel was logged calling out the FRU

'''
root@rain127bmc:~# ibm-read-vpd --file /sys/bus/i2c/drivers/at24/0-0051/eeprom
root@rain127bmc:~# peltool -a
[
{
"Private Header": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "0x4000",
"Created at": "06/10/2022 06:36:59",
"Committed at": "06/10/2022 06:36:59",
"Creator Subsystem": "BMC",
"CSSVER": "",
"Platform Log Id": "0x50002B35",
"Entry Id": "0x50002B35",
"BMC Event Log Id": "10"
},
"User Header": {
"Section Version": "1",
"Sub-section type": "0",
"Log Committed by": "0x2000",
"Subsystem": "CEC Hardware - VPD Interface",
"Event Scope": "Entire Platform",
"Event Severity": "Predictive Error",
"Event Type": "Not Applicable",
"Action Flags": [
"Service Action Required",
"Report Externally",
"HMC Call Home"
],
"Host Transmission": "Not Sent",
"HMC Transmission": "Not Sent"
},
"Primary SRC": {
"Section Version": "1",
"Sub-section type": "1",
"Created by": "0x4000",
"SRC Version": "0x02",
"SRC Format": "0x55",
"Virtual Progress SRC": "False",
"I5/OS Service Event Bit": "False",
"Hypervisor Dump Initiated":"False",
"Backplane CCIN": "2E43",
"Terminate FW Error": "False",
"Deconfigured": "False",
"Guarded": "False",
"Error Details": {
"Message": "A VPD ecc exception occurred."
},
"Valid Word Count": "0x09",
"Reference Code": "BD554002",
"Hex Word 2": "00080255",
"Hex Word 3": "2E430010",
"Hex Word 4": "00000000",
"Hex Word 5": "00000000",
"Hex Word 6": "00000000",
"Hex Word 7": "00000000",
"Hex Word 8": "00000000",
"Hex Word 9": "00000000",
"Callout Section": {
"Callout Count": "1",
"Callouts": [{
"FRU Type": "Normal Hardware FRU",
"Priority": "Mandatory, replace all with this type as a unit",
"Location Code": "U78DB.ND0.WZS002U-P0-C22",
"Part Number": "02WF429",
"CCIN": "6B59",
"Serial Number": "Y131UF09S00H"
}]
}
},
"Extended User Header": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "0x2000",
"Reporting Machine Type": "9105-42A",
"Reporting Serial Number": "13BE990",
"FW Released Ver": "",
"FW SubSys Version": "fw1020.00-58.9",
"Common Ref Time": "00/00/0000 00:00:00",
"Symptom Id Len": "20",
"Symptom Id": "BD554002_2E430010"
},
"Failing MTMS": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "0x2000",
"Machine Type Model": "9105-42A",
"Serial Number": "13BE990"
},
"User Data 0": {
"Section Version": "1",
"Sub-section type": "1",
"Created by": "0x2000",
"BMCState": "Ready",
"BootState": "SecondaryProcInit",
"ChassisState": "On",
"FW Version ID": "fw1020.00-58.9-3-gb29698f8cf",
"HostState": "Running",
"System IM": "50001000"
},
"User Data 1": {
"Section Version": "1",
"Sub-section type": "1",
"Created by": "0x2000",
"CALLOUT_INVENTORY_PATH": "/xyz/openbmc_project/inventory/system/chassis/motherboard/tpm_wilson",
"DESCRIPTION": "ERROR: ECC check did not pass for the Record:VINI"
}
}
]
'''

Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: Ie7c7fff5699d8b89d5aa0995f4074ccb3fdd6c37

show more ...


# 28079c8b 07-Oct-2021 Priyanga Ramasamy <priyanga24@in.ibm.com>

API to read VPD keyword from hardware

This commit adds up a new method in Impl class
to read a given VPD keyword directly from hardware.

Vpd-tool is one such user of this method.

Signed-off-by: Pr

API to read VPD keyword from hardware

This commit adds up a new method in Impl class
to read a given VPD keyword directly from hardware.

Vpd-tool is one such user of this method.

Signed-off-by: Priyanga Ramasamy <priyanga24@in.ibm.com>
Change-Id: I2bb3d3522a958d0970b20c078b7132ace7ebf692

show more ...


# 33c61c2d 06-Apr-2021 PriyangaRamasamy <priyanga24@in.ibm.com>

vpd:pass vector by reference to avoid copy of vector

When the vector is moved from one class to another, it doesn't
solve the other purpose where the vector data is required after
mo

vpd:pass vector by reference to avoid copy of vector

When the vector is moved from one class to another, it doesn't
solve the other purpose where the vector data is required after
moving it. In these cases we have to create a local copy of vector
before moving it.

In order to avoid local copy of vector, instead of moving it,
this commit simply passes the vector by reference which solves
all purpose.

Signed-off-by: PriyangaRamasamy <priyanga24@in.ibm.com>
Change-Id: I29f632651107d65a30e2eca785c9d5ee3ea4042a

show more ...


# f6d541e8 04-Feb-2020 SunnySrivastava1984 <sunnsr25@in.ibm.com>

Editor implementation for VPD manager

This commit implements editor class for VPD manager app.
This calss holds responsibility of handling and editing
vpd data related requests on be

Editor implementation for VPD manager

This commit implements editor class for VPD manager app.
This calss holds responsibility of handling and editing
vpd data related requests on behalf of manager app and
updating the cache with new data if required.

This commit also changes parser class to implement api
needed to validate vpd header file in case of write call.

Steps to build:
meson <build_directory>
ninja -C <directory_path>

-Tested with sample json and sample vpd file
sample command to test
busctl call com.ibm.VPD.Manager /com/ibm/VPD/Manager
com.ibm.VPD.Manager WriteKeyword sssay
<"inventory_path"> <"Record_Name"> <"Keyword_Name">
<no. of bytes to update> <array_of_bytes>

Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: I569f03e329b0f62937c6e143a344d8e4ff02db6f

show more ...


# 19be6d3d 03-Mar-2020 SunnySrivastava1984 <sunnsr25@in.ibm.com>

Common file to hold all constant values

This commit introduces a const.hpp file to hold all the
constants related to the openpower vpd repository.
All new and ongoing implementations

Common file to hold all constant values

This commit introduces a const.hpp file to hold all the
constants related to the openpower vpd repository.
All new and ongoing implementations can make use of this
file to declare or reuse constants.

Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: Ib93c1c264dc8c69198140d63318e7e132d33fb13

show more ...


# c0aeac39 28-Nov-2019 Alpana Kumari <alpankum@in.ibm.com>

VPD ECC support

Added methods/interfaces to create ECC and verify the data using ECC

Tested: tested some of the EEPROMS on Rainier simics
root@rainier:/tmp# ./ipz-read-vpd --fil

VPD ECC support

Added methods/interfaces to create ECC and verify the data using ECC

Tested: tested some of the EEPROMS on Rainier simics
root@rainier:/tmp# ./ipz-read-vpd --file /sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a480.i2c-bus/i2c-8/8-0050/8-00500/nvmem
PASSED
root@rainier:/tmp# ./ipz-read-vpd --file /sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0050/7-00500/nvmem
PASSED
root@rainier:/tmp# ./ipz-read-vpd --file /sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a480.i2c-bus/i2c-8/8-0051/8-00510/nvmem
PASSED
root@rainier:/tmp# ./ipz-read-vpd --file /sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-7/7-0051/7-00510/nvmem
PASSED
root@rainier:/tmp# ./ipz-read-vpd --file /sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a080.i2c-bus/i2c-0/0-0051/0-00510/nvmem
PASSED

Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
Change-Id: I863327f504c2dfa468d5ceadce10250292a968b7

show more ...


# 26a74af7 10-Sep-2019 Alpana Kumari <alpankum@in.ibm.com>

IPZ VPD Parser support

This commit enables the app ibm-read-vpd to read the
IPZ format vpd. To build this app, the application
build must be configured with the "--enable-ibm-parser"

IPZ VPD Parser support

This commit enables the app ibm-read-vpd to read the
IPZ format vpd. To build this app, the application
build must be configured with the "--enable-ibm-parser"
option.

The application populates the Inventory with the parsed
VPD data. The parser relies on a JSON config file
that maps the input VPD file path to the Inventory D-Bus
object that hosts the VPD data as properties.

The JSON file also supplies any additional interfaces
and properties that the D-Bus object should implement.

Argument required to run this application-
ibm-read-vpd --file vpd_file

Tested:

Also tested this on Rainier simulation model and verified that VPD
for FRUs is properly published as properties of D-Bus objects in the
Inventory.

Change-Id: Ic9305f25625adced7f64123589dd083e2679afbb
Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>

show more ...


# ee79ca84 11-Jul-2019 George Liu <liuxiwei@inspur.com>

Fix decoding of MB

The BuildDate property value is incorrect when testing via ipmitool
command and should be parsed as MB keyword instead of RAW.

Testd: BuildDate property value

Fix decoding of MB

The BuildDate property value is incorrect when testing via ipmitool
command and should be parsed as MB keyword instead of RAW.

Testd: BuildDate property value is correct via dbus, ipmitool commands
and unit test.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I6dd14d82df3b7f46b1717960a0a97df4a4c7e30e

show more ...


# c83c4dc3 01-Nov-2018 Patrick Venture <venture@google.com>

Add .clang-format to repo for automated style

Add .clang-format to repo for automated style. A consistent style
across Openbmc makes the code easier to read and edit.

Change-Id

Add .clang-format to repo for automated style

Add .clang-format to repo for automated style. A consistent style
across Openbmc makes the code easier to read and edit.

Change-Id: I7c09792d2482f0be3e01776804347700f3e3e651
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# c576b48c 17-Jul-2017 Dinesh Chinari <chinari@us.ibm.com>

Added BMC, UUID interface map.

Change-Id: I62a7284e58f8688b1560663aab52cc5746a77dda
Signed-off-by: Dinesh Chinari <chinari@us.ibm.com>


# 683bf721 24-Nov-2016 Deepak Kodihalli <dkodihal@in.ibm.com>

parser : parse keyword section of a record

For a given OpenPOWER VPD record, get to it's keyword section and find
all contained keywords, and read the data for each of those.

Ch

parser : parse keyword section of a record

For a given OpenPOWER VPD record, get to it's keyword section and find
all contained keywords, and read the data for each of those.

Change-Id: I87001b3bc0a7b842543aa387e319b98aac8ca3ff
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...


# 4a475bda 24-Nov-2016 Deepak Kodihalli <dkodihal@in.ibm.com>

parser : parse keyword data section

For keywords contained in an OpenPOWER VPD record, read the keyword
data. The data may be raw or encoded in ascii. Return the
resultant data as a

parser : parse keyword data section

For keywords contained in an OpenPOWER VPD record, read the keyword
data. The data may be raw or encoded in ascii. Return the
resultant data as a string.

Some keywords, such as B1 (MAC address) need to be decoded specially.

Change-Id: I64c16c60dc94e173586b20fb6a92809fbb0ac89e
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...


# a1143460 24-Nov-2016 Deepak Kodihalli <dkodihal@in.ibm.com>

parser : process OpenPOWER VPD record

This change adds implementation to look at record information within
OpenPOWER VPD, check if the record is of interest to us, and if yes -
proce

parser : process OpenPOWER VPD record

This change adds implementation to look at record information within
OpenPOWER VPD, check if the record is of interest to us, and if yes -
proceed to read record information, for further parsing and storage.

Change-Id: Ic6df6c88c104fc588d645e626391561a754e741e
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...


# 023112f4 22-Nov-2016 Deepak Kodihalli <dkodihal@in.ibm.com>

parser : read table of contents record

This change implements logic to read the OpenPOWER VPD VTOC record,
which contains information about offsets to other records in the VPD.

parser : read table of contents record

This change implements logic to read the OpenPOWER VPD VTOC record,
which contains information about offsets to other records in the VPD.

Change-Id: Id40dee0f940815766bf2e956c6ab08c875e6f79b
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...


# 810c9def 22-Nov-2016 Deepak Kodihalli <dkodihal@in.ibm.com>

parser : implement header check

This change implements a parser method to check if the OpenPOWER VPD has
the mandatory header record, VHDR.

Change-Id: I9e4cebd8f69e47e1ab0f1b569

parser : implement header check

This change implements a parser method to check if the OpenPOWER VPD has
the mandatory header record, VHDR.

Change-Id: I9e4cebd8f69e47e1ab0f1b569fe4af2c82a5a137
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...


# e08fcad4 22-Nov-2016 Deepak Kodihalli <dkodihal@in.ibm.com>

parser: define implementation class

This change introduces a class that serves as the OpenPOWER VPD parser.
The class provides an API to construct itself with binary OpenPOWER VPD,
a

parser: define implementation class

This change introduces a class that serves as the OpenPOWER VPD parser.
The class provides an API to construct itself with binary OpenPOWER VPD,
and an API to run the parser.

Change-Id: Ifcb360a8b67ac4d2a5116e2515cf689c552819b4
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...