History log of /openbmc/phosphor-logging/extensions/openpower-pels/data_interface.cpp (Results 1 – 25 of 57)
Revision Date Author Comments
# bbc11ef9 11-Jan-2024 Matt Spinler <spinler@us.ibm.com>

PEL: Use new Compatible interface

Code previously looked at an IBMCompatible interface provided by
entity-manager to get the system type in order to find the device
callouts file when necessary.

EM

PEL: Use new Compatible interface

Code previously looked at an IBMCompatible interface provided by
entity-manager to get the system type in order to find the device
callouts file when necessary.

EM now also puts the xyz.openbmc_project.Inventory.Decorator.Compatible
on D-Bus with the same Names property.

Change the code to use this new interface so it isn't using an IBM
specific one.

Tested:
With the dev_callouts file renamed in /usr/share:
```
/usr/share/phosphor-logging/pels# ls *Rainier2U*
com.ibm.Hardware.Chassis.Model.Rainier2U_dev_callouts.json
```

and with entity-manager hosting the new interface:

```
busctl get-property xyz.openbmc_project.EntityManager
/xyz/openbmc_project/inventory/system/chassis/Rainier_2U_Chassis \
xyz.openbmc_project.Inventory.Decorator.Compatible Names \
as 2
"com.ibm.Hardware.Chassis.Model.Rainier2U"
"com.ibm.Hardware.Chassis.Model.Rainier"
```

Creating a PEL with a device path callout:
```
CALLOUT_DEVICE_PATH /sys/bus/i2c/devices/7-0052
```

Leads to PEL callouts of:
```
"Callout Section": {
"Callout Count": "3",
"Callouts": [{
"FRU Type": "Normal Hardware FRU",
"Priority": "Mandatory, replace all with this type as a unit",
"Location Code": "U78DA.ND0.1234567-P0-C5",
"Part Number": "F191014",
"CCIN": "6B58",
"Serial Number": "YL6B58010000"
}, {
"FRU Type": "Normal Hardware FRU",
"Priority": "Mandatory, replace all with this type as a unit",
"Location Code": "U78DA.ND0.1234567-P0-T10",
"Part Number": "F191014",
"CCIN": "2E2D",
"Serial Number": "YL2E2D010000"
}, {
"FRU Type": "Normal Hardware FRU",
"Priority": "Lowest priority replacement",
"Location Code": "U78DA.ND0.1234567-P0",
"Part Number": "F191014",
"CCIN": "2E2D",
"Serial Number": "YL2E2D010000"
}]
}
```

which matches what's in the file.

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

show more ...


# cc9b4506 10-Jan-2024 Matt Spinler <spinler@us.ibm.com>

PEL: Removed unused constants in DataInterface

clangd flagged some unused constants and includes.

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

PEL: Removed unused constants in DataInterface

clangd flagged some unused constants and includes.

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

show more ...


# 412f50ed 14-Nov-2023 Matt Spinler <spinler@us.ibm.com>

PEL: Use 'Notify' when setting Functional prop

Use phosphor-inventory-manager's Notify method when setting the
Functional property based on PEL callouts.

Using the method will have PIM persist the

PEL: Use 'Notify' when setting Functional prop

Use phosphor-inventory-manager's Notify method when setting the
Functional property based on PEL callouts.

Using the method will have PIM persist the functional value so it isn't
lost after a reboot, unlike a regular property set call.

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

show more ...


# 6ddbf69e 05-Sep-2023 Willy Tu <wltu@google.com>

Remove SDBUSPP_REMOVE_DEPRECATED_NAMESPACE

Fix the code to support new sdbusplus error without
SDBUSPP_REMOVE_DEPRECATED_NAMESPACE.

Change-Id: I12713ec1757d3835e1acf07c7abf409ff97615e1
Signed-off-b

Remove SDBUSPP_REMOVE_DEPRECATED_NAMESPACE

Fix the code to support new sdbusplus error without
SDBUSPP_REMOVE_DEPRECATED_NAMESPACE.

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

show more ...


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

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 ...


# 52ee3a4f 27-Jul-2023 Matt Spinler <spinler@us.ibm.com>

PEL: Ignore hotplugged FRUs owned by PLDM

When the code is watching for newly plugged fans or power supplies, it
can ignore ones hosted by the PLDM daemon because those are in IO
expansion drawers a

PEL: Ignore hotplugged FRUs owned by PLDM

When the code is watching for newly plugged fans or power supplies, it
can ignore ones hosted by the PLDM daemon because those are in IO
expansion drawers and nothing needs to be done when those are added.

In fact, calling into PLDM to get the location code can cause a D-Bus
deadlock because when this code runs it can be in the middle of PLDM
calling into the logging daemon to create event logs.

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

show more ...


# a167a7d9 30-Jun-2023 Matt Spinler <spinler@us.ibm.com>

PEL: Use lg2 in DataInterface files

Modernize it a bit and it makes it easier to see debug traces which can
be done by just running the daemon from the command line.

Signed-off-by: Matt Spinler <sp

PEL: Use lg2 in DataInterface files

Modernize it a bit and it makes it easier to see debug traces which can
be done by just running the daemon from the command line.

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

show more ...


# 5ee3605d 30-May-2023 Matt Spinler <spinler@us.ibm.com>

PEL: Trace less when watching Present changes

The fans and power supplies in IO expansion drawers are also in the
inventory, hosted by PLDM, and have their Present property set to true
at least once

PEL: Trace less when watching Present changes

The fans and power supplies in IO expansion drawers are also in the
inventory, hosted by PLDM, and have their Present property set to true
at least once every boot after the hypervisor starts and tells PLDM
they are present. This causes multiple traces every boot from the PEL
code watching for fan and power supply hot plugs. Also, one of the
times the items become present, the call to get its location code from
PLDM fails which causes another trace.

Since the PEL code doesn't care about fans and PSs in IO drawers, just
change these traces to debug ones so that no traces show up on normal
boots. There will still be a trace if the code does end up clearing the
deconfig flag from a PEL with a plugged local fan/PS as a callout.

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

show more ...


# 5b423651 04-May-2023 Matt Spinler <spinler@us.ibm.com>

PEL: Watch for fan/PS hotplugs

Code is going to need to know when a fan or power supply (the only
hotpluggable redundant FRUs) are added or replaced so that it can clear
a flag in PELs that have tha

PEL: Watch for fan/PS hotplugs

Code is going to need to know when a fan or power supply (the only
hotpluggable redundant FRUs) are added or replaced so that it can clear
a flag in PELs that have that HW as a callout. This is so other code
that is doing degraded mode notifications will not do any notifications
for PELs calling out HW that has been replaced.

To enable this functionality, add support to the DataInterface class to
tell subscribers via a function callback when a fan or power supply
becomes present, as indicated by the Present property.

Code will watch the Present property of fan and power supplies to change
via the PropertiesChanged signal, as well as watch for InterfacesAdded
to catch when they show up on D-Bus in the first place.

It won't start any of these watches until the BMC gets to ready state so
that the inventory has a chance to be populated first.

On the first boot when the inventory was previously empty there will be
a round of inventory InterfacesAdded signals that will wake up the
daemon when PLDM receives the processor core presence information from
hostboot, but it just checks and sees it's the wrong interface and
returns, and I'm not sure how it can be avoided.

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

show more ...


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

show more ...


# cfca98d6 05-May-2023 Andrew Geissler <geissonator@yahoo.com>

PEL: remove OSStart as indication host is running

This logic is checking whether PHYP is at standby or runtime. The
OSStart was never implemented by PHYP so it should not be looked at to
determine t

PEL: remove OSStart as indication host is running

This logic is checking whether PHYP is at standby or runtime. The
OSStart was never implemented by PHYP so it should not be looked at to
determine this state. The hostboot team is going to utilize this
BootProgress to indicate when they are starting PHYP.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I580703f739be9fe04f49ae00eb51f485e554287f

show more ...


# bad056be 25-Jan-2023 Matt Spinler <spinler@us.ibm.com>

PEL: Handle multiple inv paths per loc code

DataInterface::getInventoryFromLocCode() was only returning a single
inventory path from GetFRUsByExpandedLocationCode() even though multiple
paths may ha

PEL: Handle multiple inv paths per loc code

DataInterface::getInventoryFromLocCode() was only returning a single
inventory path from GetFRUsByExpandedLocationCode() even though multiple
paths may have been returned.

Mostly that was fine, except when a processor on a DCM was called out.
That would lead to only one processor on the DCM being set to not
functional by service_indicators.cpp, so on the web UI the actual CPU
called out may not have been marked as unhealthy (health status critical
in Redfish).

This commit changes getInventoryFromLocCode() to return all the paths
that GetFRUsByExpandedLocationCode() returns, and then makes the
corresponding changes in service_indicators.cpp to be able to handle
multiple inventory paths per location code when setting them to not
functional and creating a critical association.

The other code that was calling this function can just use the first
path returned, since in those cases it's just needed to get the VPD
information for the PEL, and all the paths would return the same info
anyway since they had the same location code.

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

show more ...


# 875b6c7b 20-Oct-2021 Vijay Lobo <vijaylobo@gmail.com>

PEL: Add boot progress code to SRC hex data

Add the first 8 characters from the ASCII string field of the current
progress SRC, taken from the xyz.openbmc_project.State.Boot.Raw D-Bus
interface, to

PEL: Add boot progress code to SRC hex data

Add the first 8 characters from the ASCII string field of the current
progress SRC, taken from the xyz.openbmc_project.State.Boot.Raw D-Bus
interface, to SRC hex word 4 when creating a PEL.

This is how the field is defined in the PEL spec, and is to help with
debug so that one can know which part of the boot was occurring when
the PEL was created. Note that at this point most progress codes are
sent down from one of the host firmware subsystems and not created by
the BMC.

The field is only inserted into the SRC if those characters are present
and represent a valid 4 byte number, such as "C7004000". This is then
represented as 0xC7004000 in the SRC word. Otherwise, the word is left
at a value of zero.

For example:
...
"Valid Word Count": "0x09",
"Reference Code": "BD8D1001",
"Hex Word 2": "00080455",
"Hex Word 3": "2E2D0010",
"Hex Word 4": "C7004000", <---Progress code
"Hex Word 5": "00000000",
"Hex Word 6": "00000005",
"Hex Word 7": "00000000",
"Hex Word 8": "00000000",
"Hex Word 9": "00000000"
...

Signed-off-by: Vijay Lobo <vijaylobo@gmail.com>
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iba41e88626c0e081e5759b994e3630ef8b12daf4

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


# 45796e82 01-Jul-2022 Matt Spinler <spinler@us.ibm.com>

PEL: Fix some cppcheck warnings

This is the first of two commits to fix most of the cppcheck warnings in
the PEL code. It doesn't fix all of them because some are false
positives and some are just

PEL: Fix some cppcheck warnings

This is the first of two commits to fix most of the cppcheck warnings in
the PEL code. It doesn't fix all of them because some are false
positives and some are just suggestions.

It's broken up into two commits to make them smaller.

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

show more ...


# 45e83521 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

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

show more ...


# 744d8515 08-Jun-2022 Matt Spinler <spinler@us.ibm.com>

PEL: Read 'HMC Managed' BIOS attribute

Add a property watch on the base BaseBIOSTable property provided by the
BIOS config manager so that the pvm_hmc_managed BIOS attribute can be
read from it to k

PEL: Read 'HMC Managed' BIOS attribute

Add a property watch on the base BaseBIOSTable property provided by the
BIOS config manager so that the pvm_hmc_managed BIOS attribute can be
read from it to know if the HMC is managed or not.

The DataInterface class already provides an isHMCManaged() method that
is used by the host notification code, and this commit allows it to
return the correct value.

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

show more ...


# 35a405b8 02-Mar-2022 Matt Spinler <spinler@us.ibm.com>

PEL: Shorten D-Bus timeout value

There are several D-Bus method calls made when creating a PEL to collect
data, and if one of the daemons called into is hung, then
phosphor-log-manager can also hang

PEL: Shorten D-Bus timeout value

There are several D-Bus method calls made when creating a PEL to collect
data, and if one of the daemons called into is hung, then
phosphor-log-manager can also hang up to the default timeout value of
25s and an error will be returned to the PEL creator even though the PEL
will eventually be created successfully.

This can cause all sorts of issues for the callers, such as preventing
the PEL from begin reported to the hardware management console to
causing a boot fail because hostboot gets a failure trying to log an
error and shuts down.

To help prevent this, change the timeout value of all D-Bus calls to 10
seconds down from the 25. This would allow two timeouts to occur during
the creation of a PEL without hitting the 25s timeout that callers use.
When timeouts are hit creating a PEL, that field just won't be filled in
and the PEL can otherwise be created with no issues.

Ten seconds was chosen to allow two failures to occur while still
allowing plenty of time for completion from a healthy daemon. Also it
seems like if an operation doesn't complete within 10s it wouldn't
complete within 25 either.

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

show more ...


# 027bf285 24-Jan-2022 Sumit Kumar <sumit_kumar@in.ibm.com>

PEL: Skip purging PEL if it has associated hw isolation entry

When PELs reaches to certain limits, either in total size or
total number of them, the code starts removing older pels
based on certain

PEL: Skip purging PEL if it has associated hw isolation entry

When PELs reaches to certain limits, either in total size or
total number of them, the code starts removing older pels
based on certain criteria. During this process make sure
no pel is removed that has an associated hardware isolation
entry record or error_log event record.

Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com>
Change-Id: Ia7c9af6911bcf2ac8f8ec046d4c7a7a12d9b2bbd

show more ...


# c6ee7c54 14-Jan-2022 Matt Spinler <spinler@us.ibm.com>

PEL: Trace when the send-to-host setting changes

Something in the journal will make it easier to remember this setting
may have been switched off when someone asks why PELs haven't been sent
to the

PEL: Trace when the send-to-host setting changes

Something in the journal will make it easier to remember this setting
may have been switched off when someone asks why PELs haven't been sent
to the host. It will also provide a timestamp of when the setting was
changed if someone wanted to know.

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

show more ...


# cc8b1116 15-Dec-2021 Matt Spinler <spinler@us.ibm.com>

PEL: Update location code D-Bus interface

The com.ibm.ipzvpd interface is being deprecated, so switch to the
replacement one.

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

PEL: Update location code D-Bus interface

The com.ibm.ipzvpd interface is being deprecated, so switch to the
replacement one.

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

show more ...


# 3e274432 14-Sep-2021 Sumit Kumar <sumit_kumar@in.ibm.com>

PEL: Write terminating SRC to the progress SRC

Check for incoming pels for severity type 0x51 - Critical error,
System termination. If found, fetch the SRC and add this SRC to
progre

PEL: Write terminating SRC to the progress SRC

Check for incoming pels for severity type 0x51 - Critical error,
System termination. If found, fetch the SRC and add this SRC to
progress SRC interface on dbus. In addition set the terminate bit
in BMC created pels only.

Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com>
Change-Id: I26194a26743263183dcb61e097c745c4705fa006

show more ...


# ecaa2fce 05-Nov-2021 Jayanth Othayoth <ojayanth@in.ibm.com>

PEL: Add guard record entry create function

Added D-Bus wrapper function to create guard record
entry D-Bus object.

hardware isolation API's used no no-reply mode to avoid
c

PEL: Add guard record entry create function

Added D-Bus wrapper function to create guard record
entry D-Bus object.

hardware isolation API's used no no-reply mode to avoid
cyclic dependency with log manager. PEL log already have
the details of guard records properties. For any failure
during record creation is hardware isolation application
is ignored by log manager. User will get details on this
failure by looking hardware isolation log information.

Tested: verified D-Bus create method.

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

show more ...


# 2c36fddc 21-Sep-2021 Sumit Kumar <sumit_kumar@in.ibm.com>

PEL: Store system boot state in user data section

For every incoming pel data interface watches the dbus property
that includes the latest boot progress/state value. This value would be

PEL: Store system boot state in user data section

For every incoming pel data interface watches the dbus property
that includes the latest boot progress/state value. This value would be
captured and stored in user data section of pel.

Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com>
Change-Id: Ie48e7ee9fdd965af672f4bd563f8c9fc3bfacc43

show more ...


123