History log of /openbmc/entity-manager/src/fru_utils.cpp (Results 1 – 21 of 21)
Revision Date Author Comments
# 5a80703c 03-Mar-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I71c8504caaa31ac43ae0f20c002ed081078e3f48
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

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

show more ...


# ae2a6f2a 02-Sep-2024 Chiang Brian <chiang.brian@inventec.com>

Strip extra spaces from fru

Trailing spaces were discovered in the FRU EEPROM of some SSDs, which
should not originally appear in the device. Strip the trailing spaces
in case that one gets the prop

Strip extra spaces from fru

Trailing spaces were discovered in the FRU EEPROM of some SSDs, which
should not originally appear in the device. Strip the trailing spaces
in case that one gets the properties about FRU with unnecessary spaces.

Tested:
before the CL added:

curl http://localhost/redfish/v1/Chassis/SSD_NVMe_2/ | \
grep -E "PartNumber|SerialNumber"
% Total % Received % Xferd Average Speed Time Time Time
Dload Upload Total Spent Left
100 1661 100 1661 0 0 104k 0 --:--:-- --:--:-- --:--:--
"PartNumber": "MZWLO7T6HBLA-01AGG ",
"SerialNumber": "S7BVNE0W900253 ",

After after CL added :

curl http://localhost/redfish/v1/Chassis/SSD_NVMe_2/ | \
grep -E "PartNumber|SerialNumber"
% Total % Received % Xferd Average Speed Time Time Time
Dload Upload Total Spent Left
100 1661 100 1661 0 0 98739 0 --:--:-- --:--:-- --:--:--
"PartNumber": "MZWLO7T6HBLA-01AGG",
"SerialNumber": "S7BVNE0W900253"

Change-Id: I4faf5b4fa62f2330ed0d12f41b552af41ce7dd9a
Signed-off-by: Brian Chiang <chiang.brian@inventec.com>

show more ...


# c3db2c3c 20-Aug-2024 Alexander Hansen <alexander.hansen@9elements.com>

meson: use phosphor-logging for debug statements

There is no need to individually patch each file to enable debug
logging.

All the different definitions of 'bool debug' are removed in favor of
usin

meson: use phosphor-logging for debug statements

There is no need to individually patch each file to enable debug
logging.

All the different definitions of 'bool debug' are removed in favor of
using phosphor-logging.

Change-Id: Ia9a8ecfa4ea220f588d7cf2d291b14067e0391e7
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# b7077437 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: Id49ad73c860533f4658c909e86d6dc8e1423efb4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 536665b0 13-May-2024 Yi-Shum <EasonChen1@quantatw.com>

Make fru-device produce Mfg date in ISO8601 format

Modify the time format of BOARD_MANUFACTURE_DATE in fru-device to
ISO8601 format.

Tested:
```
root@bmc:~# busctl introspect xyz.openbmc_project.Fr

Make fru-device produce Mfg date in ISO8601 format

Modify the time format of BOARD_MANUFACTURE_DATE in fru-device to
ISO8601 format.

Tested:
```
root@bmc:~# busctl introspect xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice/Minerva_CMM_EVT2
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
...
xyz.openbmc_project.FruDevice interface - - -
.ADDRESS property u 84 emits-change
.BOARD_FRU_VERSION_ID property s "FRU Ver 0.01" emits-change
.BOARD_INFO_AM1 property s "19-100140" emits-change
.BOARD_INFO_AM2 property s "TOD-TDT" emits-change
.BOARD_INFO_AM3 property s "D1KI6" emits-change
.BOARD_LANGUAGE_CODE property s "25" emits-change
.BOARD_MANUFACTURER property s "Quanta" emits-change
.BOARD_MANUFACTURE_DATE property s "20240509T053800Z" emits-change
...

```

Change-Id: Ie2bcd60e4973ada81885df299fdfe132fe242828
Signed-off-by: Yi-Shum <EasonChen1@quantatw.com>

show more ...


# fc171428 04-Apr-2024 Ed Tanous <ed@tanous.net>

Update clang-tidy

Fix a bunch of minor issues, ignore others. We use a lot of global
variables. Enabling a check will hopefully make sure we don't add more.

Change-Id: Ie76053d4afc95a5372b70b2fb7

Update clang-tidy

Fix a bunch of minor issues, ignore others. We use a lot of global
variables. Enabling a check will hopefully make sure we don't add more.

Change-Id: Ie76053d4afc95a5372b70b2fb768be464468cec0
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# a3ca14a6 27-Mar-2024 Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>

Add clang tidy check

Change-Id: I1c9f03e95aa0ca1977ddef84ea765222d2281b4f


# b9dd7f86 20-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 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-17 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: I014bacc34b5a3a7a2a6de6a29b81a3b147eb6ed9
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 3f98b5eb 12-Apr-2023 Willy Tu <wltu@google.com>

fru-device: Remove the use of mktime

mktime get the time in localtime and will mess up the time if the
timezone != UTC. The FRU data should be the raw data in UTC and the
reader will convert to loca

fru-device: Remove the use of mktime

mktime get the time in localtime and will mess up the time if the
timezone != UTC. The FRU data should be the raw data in UTC and the
reader will convert to localtime at their end.

This issue is detected when we change the timezone to PST/PDT with
https://gerrit.openbmc.org/c/openbmc/openbmc/+/58293
and the FRU EEPROM time does not match the expected Mfg Date anymore.

Used the timestamp of 1/1/1996 UTC directly.

Data Reader:
https://gerrit.openbmc.org/c/openbmc/phosphor-host-ipmid/+/58466

Tested:
Fru EEPROM Mfg Time now is in the same (after timezone conversion)
between the raw data and FRU output.

Change-Id: I48f9233ee96b676428ba9e9f9f6b34d3da74e612
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 2b3ed30c 14-Apr-2023 Marvin Drees <marvin.drees@9elements.com>

fru-device: retry with bytewise read

certain powersupplies, e.g. SuperMicro PWS-920P-SQ
require that their FRU eeprom be read bytewise.
otherwise, only garbage is read.

Tested: on Tyan S8030 board.

fru-device: retry with bytewise read

certain powersupplies, e.g. SuperMicro PWS-920P-SQ
require that their FRU eeprom be read bytewise.
otherwise, only garbage is read.

Tested: on Tyan S8030 board. FRU eeprom is now read correctly.

Change-Id: I36a0ce8d8f955d4fe3867dbd63fefda63b1a9b13
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 5286afe2 12-Oct-2022 Hieu Huynh <hieuh@os.amperecomputing.com>

FruDevice: Parsing Multirecord UUID

Extend entity-manager's FruDevice to read UUID from FRU EEPROM
and update to dbus at MULTIRECORD_UUID.
The Record Type ID is: 0x03 (Management Access Record)
Sub-

FruDevice: Parsing Multirecord UUID

Extend entity-manager's FruDevice to read UUID from FRU EEPROM
and update to dbus at MULTIRECORD_UUID.
The Record Type ID is: 0x03 (Management Access Record)
Sub-record Type is: 0x07 (System Unique ID)

Tested:
1. Get the UUID value:
busctl get-property xyz.openbmc_project.FruDevice \
/xyz/openbmc_project/FruDevice/MB \
xyz.openbmc_project.FruDevice \
MULTIRECORD_UUID
s "e74d8ad8-ed3b-11ec-ace5-34025a7001de"

Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com>
Change-Id: I61fbea9a5d90b8d857d49444775f80761386845b

show more ...


# df190619 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: I07b444d4ae00b0fce52a846f2bff2e6b99fb971c
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 9d6f5904 26-Aug-2022 Kumar Thangavel <thangavel.k@hcl.com>

Add a helper function getFruData to updateFRUProperty

Refactoring updateFRUProperty function and created a new helper
function getFruData. Moved this function to fru_utils.cpp as it
is common for al

Add a helper function getFruData to updateFRUProperty

Refactoring updateFRUProperty function and created a new helper
function getFruData. Moved this function to fru_utils.cpp as it
is common for all fru-device deamons and avoid code duplication.

This patch is created based on suggestion on the below patch.
https://gerrit.openbmc.org/c/openbmc/entity-manager/+/51555

TESTED : Built Facebook YosemiteV2 images and loaded
on the target hardware. Verified all the fru's read and write.

Signed-off-by: Kumar Thangavel <thangavel.k@hcl.com>
Change-Id: I7514469d5798c68efce7353ca486195016cacf81

show more ...


# 9f2162af 10-Aug-2022 Kumar Thangavel <thangavel.k@hcl.com>

Refactor : Add a helper function to addFruObjectToDbus

Refactoring addFruObjectToDbus function and created a new helper
function getProductName. Moved this function to fru_utils.cpp as
it is common

Refactor : Add a helper function to addFruObjectToDbus

Refactoring addFruObjectToDbus function and created a new helper
function getProductName. Moved this function to fru_utils.cpp as
it is common for all fru-device deamons and avoid code duplication.

This patch is created based on suggestion on the below patch.
https://gerrit.openbmc.org/c/openbmc/entity-manager/+/51555

TESTED : Built Facebook YosemiteV2 images and loaded
on the target hardware. Verified all the fru's read and write.

Signed-off-by: Kumar Thangavel <thangavel.k@hcl.com>
Change-Id: I272d2fd2fc664a471774c668503d87147eb80a54

show more ...


# d79d0251 24-Aug-2022 Kumar Thangavel <thangavel.k@hcl.com>

Refactor : Add a helper function findIndexForFRU to
addFruObjectToDbus

Refactoring addFruObjectToDbus function and created a new helper
function findIndexForFRU. Moved this function to fru_utils.cpp

Refactor : Add a helper function findIndexForFRU to
addFruObjectToDbus

Refactoring addFruObjectToDbus function and created a new helper
function findIndexForFRU. Moved this function to fru_utils.cpp
as it is common for all fru-device deamons and avoid code
duplication.

This patch is created based on suggestion on the below patch.
https://gerrit.openbmc.org/c/openbmc/entity-manager/+/51555

TESTED : Built Facebook YosemiteV2 images and loaded
on the target hardware. Verified all the fru's read and write.

Signed-off-by: Kumar Thangavel <thangavel.k@hcl.com>
Change-Id: I2c9b3eb0dfb6050217c3ad459932cda59deea8c8

show more ...


# 51b557b7 13-Sep-2022 Kumar Thangavel <thangavel.k@hcl.com>

Add a helper function copyRestFRUArea to updateFRUProperty

Refactoring updateFRUProperty function and created a new helper
function copyRestFRUArea. Moved this function to fru_utils.cpp
as it is com

Add a helper function copyRestFRUArea to updateFRUProperty

Refactoring updateFRUProperty function and created a new helper
function copyRestFRUArea. Moved this function to fru_utils.cpp
as it is common for all fru-device deamons and avoid code
duplication.

This patch is created based on suggestion on the below patch.
https://gerrit.openbmc.org/c/openbmc/entity-manager/+/51555

TESTED : Built Facebook YosemiteV2 images and loaded
on the target hardware. Verified all the fru's read and write.

Signed-off-by: Kumar Thangavel <thangavel.k@hcl.com>
Change-Id: I3a3ac6ff3190f0d91f5806e4824400cca0a590e4
Signed-off-by: Kumar Thangavel <thangavel.k@hcl.com>

show more ...


# 213ee21f 11-Nov-2022 krishnar4 <krishnar@ami.com>

Fru-device : Extended support for 16bit logic bus

The uint8_t bus of getFruInfo() restricted the number of logical I2C
buses that we could implement in the sysfs interface, and it was
unfortunately

Fru-device : Extended support for 16bit logic bus

The uint8_t bus of getFruInfo() restricted the number of logical I2C
buses that we could implement in the sysfs interface, and it was
unfortunately static_cast'ed to uint_8.which limit on busses to 255.
while Linux kernel can extend the logical I2C bus number to more than
512 without any issues.
This commit add the support of 16 bit logical bus.

reference Link :-
https://lore.kernel.org/all/CACWQX82=MuAavxCqOerxi-Sdywh0xatb-f+1YzGyVSg74oNGqA@mail.gmail.com/T/

Tested :
fru-device successfully recognizes all 8 and 16 bit logic bus.

dependent commit:-
https://gerrit.openbmc.org/c/openbmc/phosphor-host-ipmid/+/58635

Signed-off-by: krishnar4 <krishnar@ami.com>
Change-Id: I4cea81999dc194a1b6915681eeefc846580de15f

show more ...


# bdfc5ec6 29-Aug-2022 Kumar Thangavel <thangavel.k@hcl.com>

Add a helper function findFruAreaLocationAndField to
updateFRUProperty

Refactoring updateFRUProperty function and created a new helper
function findFruAreaLocationAndField. Moved this function to
fr

Add a helper function findFruAreaLocationAndField to
updateFRUProperty

Refactoring updateFRUProperty function and created a new helper
function findFruAreaLocationAndField. Moved this function to
fru_utils.cpp as it is common for all fru-device deamons and
avoid code duplication.

This patch is created based on suggestion on the below patch.
https://gerrit.openbmc.org/c/openbmc/entity-manager/+/51555

TESTED : Built Facebook YosemiteV2 images and loaded
on the target hardware. Verified all the fru's read and write.

Signed-off-by: Kumar Thangavel <thangavel.k@hcl.com>
Change-Id: I82265e66ea5db10003e96978979250ea45c2052d

show more ...


# 3013fb49 09-Jul-2022 Ed Tanous <edtanous@google.com>

Make clang-tidy changes

clang-tidy has a number of checks it recommends. These checks are
documented in the next commit, but make the code pass our coding
standard.

Tested:
Minor changes made by t

Make clang-tidy changes

clang-tidy has a number of checks it recommends. These checks are
documented in the next commit, but make the code pass our coding
standard.

Tested:
Minor changes made by the robot.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I6cfaab92211af9c4c1eccd981ba9fe7b8c523457

show more ...


# 309c0b13 24-Feb-2022 Zev Weiss <zev@bewilderbeest.net>

fru-device: add FRUReader EEPROM cache

This doesn't provide a huge benefit currently, but is a preparatory step
for adding support for a wider variety of FRU format parsers. If
parsers for multiple

fru-device: add FRUReader EEPROM cache

This doesn't provide a huge benefit currently, but is a preparatory step
for adding support for a wider variety of FRU format parsers. If
parsers for multiple formats are interested in reading the same areas of
an EEPROM, the caching provided by this abstraction avoids the redundant
bus traffic of all of them re-reading the same bytes over and over.

Tested: on an ASRock Rack romed8hm3, fru-device successfully recognizes
and parses the baseboard FRU EEPROM as it did prior to this patch.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I0d774508bc29dbda346309fe7fe42dbdf97bee43

show more ...


# e45d8c71 25-May-2022 Brad Bishop <bradleyb@fuzziesquirrel.com>

treewide: comply with the OpenBMC style guidelines

The guidelines say cpp source code filenames should be lower_snake_case:
https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#f

treewide: comply with the OpenBMC style guidelines

The guidelines say cpp source code filenames should be lower_snake_case:
https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#files

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: Ia04017b0eb9a65ce1303af5b6dc36e730410fd91

show more ...