History log of /openbmc/phosphor-logging/extensions/openpower-pels/fru_identity.cpp (Results 1 – 14 of 14)
Revision Date Author Comments
# 66f3675d 30-Sep-2024 Patrick Williams <patrick@stwcx.xyz>

openpower-pels: fru-identity: fix crash in setPartNumber

On newer libstdc++ implementations, the following backtrace is
observed:

```
#2 0x00007ffff7a578b7 in abort () from /usr/lib64/libc.so.6

openpower-pels: fru-identity: fix crash in setPartNumber

On newer libstdc++ implementations, the following backtrace is
observed:

```
#2 0x00007ffff7a578b7 in abort () from /usr/lib64/libc.so.6
#3 0x00007ffff7cda2af in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) () from /usr/lib/gcc/x86_64-pc-linux-gnu/14/libstdc++.so.6
#4 0x000055555556ac6f in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::front (this=0x7fffffffd790) at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:1315
#5 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::front (this=0x7fffffffd790) at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:1315
#6 openpower::pels::src::FRUIdentity::setPartNumber (this=this@entry=0x7fffffffd8a0, partNumber="") at ../extensions/openpower-pels/fru_identity.cpp:216
#7 0x000055555556ae12 in openpower::pels::src::FRUIdentity::FRUIdentity (this=this@entry=0x7fffffffd8a0, partNumber="", ccin="", serialNumber="") at ../extensions/openpower-pels/fru_identity.cpp:102
#8 0x0000555555562aaf in testHWCallout (pn="", ccin="", sn="", expectedPN="", expectedCCIN="", expectedSN="") at ../test/openpower-pels/fru_identity_test.cpp:97
#9 0x00005555555645b0 in FRUIdentityTest_CreateHardwareCalloutTest_Test::TestBody (this=<optimized out>) at /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/basic_string.tcc:242
```

Fix this by avoiding accessing `front()` when the part number string
is empty. While there, do a minor performance optimization to avoid
unnecessary string copies, by using `erase` instead of `substr`.

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

show more ...


# 5bc26533 10-Apr-2024 Arya K Padman <aryakpadman@gmail.com>

PEL: Changing the remaining traces to lg2 style

Some of the logging traces of PEL files still uses old style of logging.

Changing the remaining traces in PEL files to lg2 style of logging.Some
of t

PEL: Changing the remaining traces to lg2 style

Some of the logging traces of PEL files still uses old style of logging.

Changing the remaining traces in PEL files to lg2 style of logging.Some
of the traces in phosphor logging code which use the old style is also
considered.

Change-Id: I0daf9589af443881cb61730047c23db17fdec2c3
Signed-off-by: Arya K Padman <aryakpadman@gmail.com>

show more ...


# 1aa90d49 13-Sep-2023 Jayanth Othayoth <ojayanth@in.ibm.com>

PEL: switch fmt::format to use std::format

fmt::format is supported in the c++ std. This will
help to remove fmt package dependency.

Change-Id: I89f0a5b67bbfe54168a20e93c989a1ae87f54503
Signed-

PEL: switch fmt::format to use std::format

fmt::format is supported in the c++ std. This will
help to remove fmt package dependency.

Change-Id: I89f0a5b67bbfe54168a20e93c989a1ae87f54503
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>

show more ...


# 2544b419 04-Oct-2022 Patrick Williams <patrick@stwcx.xyz>

clang-format: update with latest

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


# d26fa3e7 21-Apr-2021 Patrick Williams <patrick@stwcx.xyz>

openpower-pels: clean up various compile warnings

Compile warnings observed when compiling parts of the
openpower-pels (or corresponding tests) under stricter
compiler warning flags of Meson.

Issue

openpower-pels: clean up various compile warnings

Compile warnings observed when compiling parts of the
openpower-pels (or corresponding tests) under stricter
compiler warning flags of Meson.

Issues fixed:
- many unused parameters
- invalid case fall-through
- excess semi-colons
- incorrect 'const' on return-by-value type
- removal of variable length array in test case
- uncaught return from 'system' call in test case

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

show more ...


# 468aab5f 13-Aug-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Add support for raw symbolic FRUs and procs

Allow the FRUIdentity and Callout objects to take the raw maintenance
procedure and symbolic FRU names as opposed to just the PEL message
registry na

PEL: Add support for raw symbolic FRUs and procs

Allow the FRUIdentity and Callout objects to take the raw maintenance
procedure and symbolic FRU names as opposed to just the PEL message
registry names. This will allow the values to come from sources
besides the registry, such as the device tree used by PHAL.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I4171fb7128ae1b1b5e3e635f7f95b7f7df7c6638

show more ...


# 18f4b6e8 21-May-2020 Matt Spinler <spinler@us.ibm.com>

PEL: GCC10/clang-format-10 fixes

GCC10 didn't appreciate how strncpy was used in FRUIdentity where the
code depended on how it placed the null terminator. To fix, make a
function to do the copy.

I

PEL: GCC10/clang-format-10 fixes

GCC10 didn't appreciate how strncpy was used in FRUIdentity where the
code depended on how it placed the null terminator. To fix, make a
function to do the copy.

In addition, clang-format-10 was merged into CI at the same time as
GCC10, so include the changes it needs as well.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I04c70e37284a149b6c8655a6d7e6fedddaa0913a

show more ...


# 2b6dfa00 09-Apr-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Add symbolic FRU support to FRUIdentity

A symbolic FRU is a FRU where the part is known, but the part number is
not available for it. A trusted symbolic FRU adds the requirement that
the locat

PEL: Add symbolic FRU support to FRUIdentity

A symbolic FRU is a FRU where the part is known, but the part number is
not available for it. A trusted symbolic FRU adds the requirement that
the location code is known to be correct so it can be used for lighting
LEDs and FRU replacement.

The symbolic FRU name shares the same field as the part number.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I2fa936d9d7235c5cff245effcdb9d445aefffe23

show more ...


# a27e2e50 09-Apr-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Get rid of the enum for a maint procedure

It simplifies the code to just use the string name of the procedure as defined
by the message registry schema, and make it be less maintenance to add
n

PEL: Get rid of the enum for a maint procedure

It simplifies the code to just use the string name of the procedure as defined
by the message registry schema, and make it be less maintenance to add
new procedures in the future, especially if they come from the registry
so the enum isn't even needed.

This will also make it the same as upcoming support for symbolic FRU
callouts, which will always just come from the registry or an external
user so would not need an enum.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ia8550235678ba1fc717a6b0875e2d7ff3888bfec

show more ...


# ba0ee002 13-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Create FRUIdentity with FRUs/procedures

Add constructors to the FRUIdentity structure in the SRC section to take
either a hardware callout with PN/SN/CCIN, or a maintenance procedure
callout wi

PEL: Create FRUIdentity with FRUs/procedures

Add constructors to the FRUIdentity structure in the SRC section to take
either a hardware callout with PN/SN/CCIN, or a maintenance procedure
callout with a maintenance procedure enum. Both of these also take
callout priority.

These will be used when creating PELs that have callouts.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I5071d98df38b63ba53224c3f3b853e57234ed74e

show more ...


# a09354b7 13-Mar-2020 Matt Spinler <spinler@us.ibm.com>

PEL: Make FRUIdentity::flattenedSize() calc size

This function was just returning the _size property, but in the future
_size will instead be set to what this function returns.

Signed-off-by: Matt

PEL: Make FRUIdentity::flattenedSize() calc size

This function was just returning the _size property, but in the future
_size will instead be set to what this function returns.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I5e5c2cefb595aa07c55c7d32de66372037f79c77

show more ...


# 724d0d8c 06-Nov-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Const flattens for the SRC sub classes

Make the flatten functions const for the various classes
that represent the SRC substructures.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id

PEL: Const flattens for the SRC sub classes

Make the flatten functions const for the various classes
that represent the SRC substructures.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I08f4ae6de65e269c9f1b82315115969c8552c782

show more ...


# 711d51d8 06-Nov-2019 Matt Spinler <spinler@us.ibm.com>

PEL: Add license prologue to source files

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I31b12f509d32b79064a8a427af35e6a310273051


# a906c940 08-Oct-2019 Matt Spinler <spinler@us.ibm.com>

PEL: FRU identity SRC substructure

This substructure is part of the callout subsection in the SRC
section of a PEL, and contains information about the FRU (Field
Replaceable Unit) being called out.

PEL: FRU identity SRC substructure

This substructure is part of the callout subsection in the SRC
section of a PEL, and contains information about the FRU (Field
Replaceable Unit) being called out.

This includes:
* The specific type of FRU (see the flags field definitions)
* The FRU part number
* The FRU CCIN value (CCIN = a keyword in VPD).
* The FRU serial number

Instead of just calling out a FRU, this structure can instead be used to
call out a maintenance procedure, which is a string that is used as
a key into the service documentation that maps to a procedure to fix
the problem.

This commit only adds support for creating an object from a flattened PEL,
such as one that comes down from the host. A future commit will handle
creating it from scratch for BMC errors.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ic2b9489abea48084116bf2f450bd293c2d655979

show more ...