History log of /openbmc/phosphor-post-code-manager/src/ (Results 1 – 22 of 22)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
06b1dbe916-Sep-2024 Potin Lai <potin.lai@quantatw.com>

Change primary postcode interface to byte array

Test results:
```
root@bmc:~# busctl call xyz.openbmc_project.State.Boot.PostCode0 /xyz/openbmc_project/State/Boot/PostCode0 xyz.openbmc_project.State

Change primary postcode interface to byte array

Test results:
```
root@bmc:~# busctl call xyz.openbmc_project.State.Boot.PostCode0 /xyz/openbmc_project/State/Boot/PostCode0 xyz.openbmc_project.State.Boot.PostCode GetPostCodes q 1 -j
{
"type" : "a(ayay)",
"data" : [
[
[
[
1,
2,
3,
4,
5,
6,
7,
8,
9
],
[]
],
[
[
17,
18,
19,
20,
21,
22,
23,
24,
25
],
[]
],
[
[
33,
34,
35,
36,
37,
38,
39,
40,
41
],
[]
]
]
]
}
```

Change-Id: I81387df590c2c6781451c6dbcc030d48ca011eb6
Signed-off-by: Potin Lai <potin.lai@quantatw.com>

show more ...

9c2e871d16-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: I23c72085a3819d1036e1b926ed47ef80dfde924c
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

2d74ceb605-Dec-2023 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: avoid deprecated phosphor::Timer

sdbusplus had an older type named `phosphor::Timer` which was
recently renamed to `sdbusplus::Timer`. Update the code to use
the new type alias.

Change-

sdbusplus: avoid deprecated phosphor::Timer

sdbusplus had an older type named `phosphor::Timer` which was
recently renamed to `sdbusplus::Timer`. Update the code to use
the new type alias.

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

show more ...

a4c19b0028-Feb-2023 Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>

Support OCP debug card postcode display

Description:
- Meson option postcode display path is supported
- Support OCP debug card postcode display

Example of test process:
1. Set postcode-displa

Support OCP debug card postcode display

Description:
- Meson option postcode display path is supported
- Support OCP debug card postcode display

Example of test process:
1. Set postcode-display-path as /sys/bus/i2c/devices/12-
000f/postcode-display-slot in project layer
2. Press OCP debug card uart button to the host to check
3. Host power on
4. The postcode should start displaying on the OCP debug card screen
with user-readable string representation for those codes
Note:
- The postcode-display-path was setting by CLD driver, which
will though CPLD setting ocp-debug card
(link: https://lore.kernel.org/lkml/20230117094425.19004-1-Delphine_CC_Chiu@Wiwynn.com/)

Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Change-Id: I915c0ec29d763b8933835a9fdc8881648ca95d24

show more ...

13cb853715-Dec-2022 Bonnie Lo <Bonnie_Lo@wiwynn.com>

Add one second timer to save POST codes to file

A lot of POST codes are sent to BMC from BIC
in a short time.

In BMC, there is an ipmi handler to get POST codes
and upload to dbus property.

The xy

Add one second timer to save POST codes to file

A lot of POST codes are sent to BMC from BIC
in a short time.

In BMC, there is an ipmi handler to get POST codes
and upload to dbus property.

The xyz.openbmc_project.State.Boot@.PostCode service
listens the PropertiesChanged signal and saves to POST
codes history file.

The xyz.openbmc_project.State.Boot@.PostCode service
is hanged if there are too many POST codes in a short time.

At this time, the memory usage of dbus-broker increases,
and the out-of-memory(OOM) issue happens.

The processes are killed when OOM happens,
and BMC may reset unexpected.

Test Case:
Check the frequency for post code file getting larger

Signed-off-by: Bonnie Lo <Bonnie_Lo@wiwynn.com>
Change-Id: Ic5a397cfa7f053e196cc3d0eeae3e2b2fa5089b7

show more ...

8290e0f323-Nov-2022 Jonathan Doman <jonathan.doman@intel.com>

Use binary serialization instead of JSON

The binary format is much more efficient than JSON in terms of
computational speed and disk space consumption. The former is important
in case the host is se

Use binary serialization instead of JSON

The binary format is much more efficient than JSON in terms of
computational speed and disk space consumption. The former is important
in case the host is sending a constant stream of POST codes.
post-code-manager can fall behind because it takes too long to store
each new POST code on disk, causing D-Bus messages to pile up and
increase memory consumption inside dbus-broker.

Tested:
Rebooted the host a few times and observed that POST code history is
populated normally in Redfish. After upgrading to this change, old POST
code history stored in JSON format is lost, but remains on disk until it
gets overwritten during subsequent host boots.

Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Change-Id: Id55909a55d950e6e62b78b3333df687b4c582c42

show more ...

c7fed5ca23-Nov-2022 Jonathan Doman <jonathan.doman@intel.com>

Refactor singleton and filesystem path handling

- Remove singleton PostCodeDataHolder. It only contained a single int
which could easily be held inside the main PostCode class instead.
- Simplify

Refactor singleton and filesystem path handling

- Remove singleton PostCodeDataHolder. It only contained a single int
which could easily be held inside the main PostCode class instead.
- Simplify D-Bus match construction by using predefined
PropertiesChanged rule.
- Remove unnecessary PostCode members which were just copies of const
strings.
- Refactor some filesystem path construction/handling to simplify code.

Tested:
Rebooted host a few times and observed that correct POST code history is
still populated in Redfish.

Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Change-Id: Ifd61751807da704eaf2a64dac34ca708fd28c872

show more ...

4e08156b01-Dec-2022 Kumar Thangavel <thangavel.k@hcl.com>

Fix postcode dbus object path

Postcode dbus object path name is corrected as like postcode
manager dbus service with host id for single and multi host
postcode manager services

TESTED : Verified al

Fix postcode dbus object path

Postcode dbus object path name is corrected as like postcode
manager dbus service with host id for single and multi host
postcode manager services

TESTED : Verified all host postcode dbus objects are displayed
correctly and tested in Facebook YosemiteV2 platform

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

show more ...

2018964a09-Nov-2022 Bonnie Lo <Bonnie_Lo@wiwynn.com>

Fix singleton issue for not passing correct argument

Use reference to create instance instead of an object

Note:
1. User must revise the OBMC_HOST_INSTANCES in project
configuration file to corr

Fix singleton issue for not passing correct argument

Use reference to create instance instead of an object

Note:
1. User must revise the OBMC_HOST_INSTANCES in project
configuration file to correctly execute sled cycle.
2. The reason to revise is that OBMC_HOST_INSTANCES and
OBMC_CHASSIS_INSTANCES are 1 to 1 relationship defined in
phosphor-state-manager-systemd-links.inc
3. After revision, BMC creats a object path which is not used called
/xyz/openbmc_project/state/boot/raw0 under xyz.openbmc_project.State.Boot.Raw

Test Case:
Check the correcponding Dbus match path is created

Signed-off-by: Bonnie Lo <Bonnie_Lo@wiwynn.com>
Change-Id: I84e5658c1919dc758efade4bd13122610997c067

show more ...

c181937927-Oct-2022 Bonnie Lo <Bonnie_Lo@wiwynn.com>

Max post code file size per cycle setting

Let user could set POST code file size per cycle

The default size is 512 counts

Reason:
BMC may crash caused by nonstop saving POST code when BIOS has
som

Max post code file size per cycle setting

Let user could set POST code file size per cycle

The default size is 512 counts

Reason:
BMC may crash caused by nonstop saving POST code when BIOS has
some unusual behavior like PXE loop
Thus, BMC should set a limit size to prevent this risk

Test Case:
Manually send POST code to check the POST code file rotation

Signed-off-by: Bonnie Lo <Bonnie_Lo@wiwynn.com>
Change-Id: Ic7fbafe532a79123e6ae880a8a3506f9c397d933

show more ...

e9feb95722-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: Id93b8dfb6c81f62647dd56f1ce04c1a4fda4f7f4

show more ...

bd706d7920-Dec-2021 Manojkiran Eda <manojkiran.eda@gmail.com>

Switch to a thread safe single ton

In the current state the single ton pattern used in the
repository is not thread safe.

Switching the pattern to Meyer's single ton over the trusty
leaky single to

Switch to a thread safe single ton

In the current state the single ton pattern used in the
repository is not thread safe.

Switching the pattern to Meyer's single ton over the trusty
leaky single ton.

Ref : https://jinyu.li/notes/meyers-singleton/

Tested By :
1. Patched post-code-manager deamon & was able to get the post
codes with the GetPostCodesWithTimeStamp method.

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I0ee5c21f15fc93e1d8c5e62a0fed33622a33c894

show more ...

f5e52db722-Dec-2021 Alan Kuo <Alan_Kuo@quantatw.com>

Fix 'usTimeOffset' was not declared error

When enable 'bios-post-code-log' feature will cause 'usTimeOffset'
was not declared error, therefore changing the scope of 'usTimeOffset'
variable.

Tested:

Fix 'usTimeOffset' was not declared error

When enable 'bios-post-code-log' feature will cause 'usTimeOffset'
was not declared error, therefore changing the scope of 'usTimeOffset'
variable.

Tested:
- Tested build OK.
- Check /var/log/redfish OK.
1970-01-01T00:02:38.626333+00:00 OpenBMC.0.1.BIOSPOSTCode,2,0.0000,0x01
1970-01-01T00:02:38.656143+00:00 OpenBMC.0.1.BIOSPOSTCode,2,0.0183,0x02
1970-01-01T00:02:38.664210+00:00 OpenBMC.0.1.BIOSPOSTCode,2,0.0420,0x02

Signed-off-by: Alan Kuo <Alan_Kuo@quantatw.com>
Change-Id: I1d35777e47d507c2bba5b6b6afa72ca70cb23155

show more ...

de8d3a5305-Dec-2021 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix static analysis & cppcheck issues

This commit fixes:
1. warning: Value stored to 'event' is never read [deadcode.DeadStores]
2. style: Consider using std::transform algorithm instead of a raw lo

Fix static analysis & cppcheck issues

This commit fixes:
1. warning: Value stored to 'event' is never read [deadcode.DeadStores]
2. style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
3. style: Variable 'usTimeOffset' is assigned a value that is never used. [unreadVariable]

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: Ia0c8235195aa7eceda8bd8f36cd11fcb72781d1b

show more ...

7cc8ea6306-Oct-2021 Patrick Williams <patrick@stwcx.xyz>

catch exceptions as const

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

b84fea4e03-Jun-2021 Ravi Teja <raviteja28031990@gmail.com>

Fix DeleteAll to set boot count 0

Currently DeleteAll sets boot count 1 after
DeleteAll next boot shows as boot count 2
and GetPostCodesWithTimeStamp does not show
progress codes for boot count 2 an

Fix DeleteAll to set boot count 0

Currently DeleteAll sets boot count 1 after
DeleteAll next boot shows as boot count 2
and GetPostCodesWithTimeStamp does not show
progress codes for boot count 2 and it continues

This commit fixes this issue.

Tested results:

After DeleteAll:
busctl call xyz.openbmc_project.State.Boot.PostCode0 /xyz/openbmc_project/State/Boot/PostCode0 org.freedesktop.DBus.Properties Get ss xyz.openbmc_project.State.Boot.PostCode CurrentBootCycleCount
v q 0

First Boot after DeleteAll:
busctl call xyz.openbmc_project.State.Boot.PostCode0 /xyz/openbmc_project/State/Boot/PostCode0 org.freedesktop.DBus.Properties Get ss xyz.openbmc_project.State.Boot.PostCode CurrentBootCycleCount
v q 1

busctl call xyz.openbmc_project.State.Boot.PostCode0 /xyz/openbmc_project/State/Boot/PostCode0 xyz.openbmc_project.State.Boot.PostCode GetPostCodesWithTimeStamp q 1
a{t(tay)} 41 1622776305892427 3472328313407551299 72 2 0 0 9 0 0 0 72 0 0 0 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 251 30 215 0 0 0 0 0 0 0 0 67 55 48 48 52 48 48 48 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 1622776307055818 3472328313407551299 72 2 0 0 9 0 0 0 72 0 0 0 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 251 14 215 0 0 0 0 0 0 0 0 67 55 48 48 52 48 48 48 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32

Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
Change-Id: Icc4d40fe6fb110f25e1883557acb2d6dfa4b804b

show more ...

0171dd6b14-Apr-2021 Alan Kuo <Alan_Kuo@quantatw.com>

Add the BIOSPostCode events into the BMCWeb EventService

- Add BIOSPostCode events to the bmcweb redfish event log, so that
users can collect BIOSPOSTCode events through redfish EventService.
Re

Add the BIOSPostCode events into the BMCWeb EventService

- Add BIOSPostCode events to the bmcweb redfish event log, so that
users can collect BIOSPOSTCode events through redfish EventService.
Refer to:
https://github.com/openbmc/docs/blob/master/architecture/redfish-logging-in-bmcweb.md
- Add CMake option to trun on/off the log of post code.
The default setting is off.

Tested:
- Tested build OK.
- Check /var/log/redfish OK.
1970-01-01T00:05:06.042545+00:00 OpenBMC.0.1.BIOSPOSTCode,1,267.5030,0x15
1970-01-01T00:05:06.182087+00:00 OpenBMC.0.1.BIOSPOSTCode,1,267.5813,0x7f
1970-01-01T00:05:06.276475+00:00 OpenBMC.0.1.BIOSPOSTCode,1,267.7245,0x00

Signed-off-by: Alan Kuo <Alan_Kuo@quantatw.com>
Change-Id: Ieff2acd81ee6fbd74ad8005680499e6753860037

show more ...

84a4c19c25-Feb-2021 Manojkiran Eda <manojkiran.eda@gmail.com>

Add logic for supporting the secondary post codes

- The intent behind this commit to fix up the post code manager
to support the secondary post codes as well.

- This commit needs the PDI Change f

Add logic for supporting the secondary post codes

- The intent behind this commit to fix up the post code manager
to support the secondary post codes as well.

- This commit needs the PDI Change from:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/40927
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/40903

Tested By :
===========
1. Patched the library generated by the PDI change.
2. Compile the post code manager with this commit.
3. PATCH it on a live system to check if the post codes stored
in the file system has both the primary & secondary codes

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I8b36cc3a908bb94467b12a5b41ffb156789795a8

show more ...

08125ca707-Jan-2021 Jonathan Doman <jonathan.doman@intel.com>

Update D-Bus names per design

- Single-host service and object are named PostCode0. Multi-host service
name does not comply with design but presumably it will be fixed in
the future.

Tested: Wi

Update D-Bus names per design

- Single-host service and object are named PostCode0. Multi-host service
name does not comply with design but presumably it will be fixed in
the future.

Tested: With
phosphor-host-postd: I89ab5f2eef7eab59823df3a063414f3ca3b2949f
bmcweb: I2fdf97b7aaf8d6471d162f8ed1b72143491ac23f
Power cycled host and verified that new POST codes are added under
/redfish/v1/Systems/system/LogServices/PostCodes/Entries.

Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Change-Id: I59ed514f28c2bb9b159f51367c38557bf55bf226

show more ...

fd45f78801-Sep-2020 Kumar Thangavel <thangavel.k@hcl.com>

phosphor-post-code-manager: Add post code support for multi host

Added implementation to handle post codes from multiple host to BMC with
multi process approach. Each process handles post codes for

phosphor-post-code-manager: Add post code support for multi host

Added implementation to handle post codes from multiple host to BMC with
multi process approach. Each process handles post codes for corresponding host.

TESTED : Built the openbmc image targetting Facebook YosemiteV2 hardware.
Verified all the host's postcodes stored in corresponding host directories.

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

show more ...

993d4dd929-Jan-2020 ZhikuiRen <zhikui.ren@intel.com>

Add timestamp to BIOS POST Codes log and DeleteAll interface

Added GetPostCodesWithTimeStamp methods to PostCode interface.
GetPostCodesWithTimeStamp logs timestamp in microseconds since epoch
toget

Add timestamp to BIOS POST Codes log and DeleteAll interface

Added GetPostCodesWithTimeStamp methods to PostCode interface.
GetPostCodesWithTimeStamp logs timestamp in microseconds since epoch
together with each post code.

Added DeleteAll method to remove existing logs and
reset currentBootCycleIndex to 1.

Tested:
Build with changes in phosphor-dbus-interfaces.
Invoked GetPostCodesWithTimeStamp with busctl and observed expected format:
("US since Epoch":, Post Code)
"1580923291420015": 1,
"1580923291428076": 2,

Invoke DeleteAll and verify GetPostCodes returns no code afterwards,
and CurrentBootiCycleCount is reset to 1.

Cycled host power more than 100 times and observed that CurrentBootCycleCount
increments until it reached MaxBootCycleNum.

Verified GetPostCodes and GetPostCodesWithTimeStamp respond correctly with
index 1 being the most recent boot cycle, CurrentBootCycleCount being
the oldest boot cycle.

Change-Id: I4f222fce0eba38c65f468d8bd186079e0883da6e
Signed-off-by: ZhikuiRen <zhikui.ren@intel.com>

show more ...

3a04440019-Feb-2019 Kuiying Wang <kuiying.wang@intel.com>

Implement post code manager

This depends on interfaces definition:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/20474

Implement method and properties defined in PostCode.

Implement post code manager

This depends on interfaces definition:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/20474

Implement method and properties defined in PostCode.interface.yaml
under phosphor-dbus-interfaces/xyz/openbmc_project/State/Boot
1. Method: std::vector<uint64_t> PostCode::getPostCodes(uint16_t index)
2. Properties: CurrentBootCycleIndex/MaxBootCycleNum

Test-By:
Every cycle post codes is saved in "/var/lib/phosphor-post-code-manager"
"1" file is saved all post codes for cycle 1
"2" file is saved all post codes for cycle 2
"CurrentBootCycleIndex" file is saved the current boot cycle number.
root@wolfpass:/var/lib/phosphor-post-code-manager# ls
1 2 CurrentBootCycleIndex

Change-Id: Ia89b9121983261fef5573092d890beb84626ceeb
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>

show more ...