History log of /openbmc/phosphor-post-code-manager/ (Results 1 – 25 of 57)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
20297dfb07-Aug-2025 Manojkiran Eda <manojkiran.eda@gmail.com>

Add PostCodeDataVersion to the persisted data

Commit `06b1dbe9c768adf8921e4c1cb915538486b5a7ca` changed the
serialized format of `PostCodeData` without providing backward or
forward compatibility.

Add PostCodeDataVersion to the persisted data

Commit `06b1dbe9c768adf8921e4c1cb915538486b5a7ca` changed the
serialized format of `PostCodeData` without providing backward or
forward compatibility.

Previously, persisted data was stored as a `uint64_t`, whereas the
updated code now expects a `vector<uint8_t>`. When the new code
attempts to deserialize old data, Cereal interprets the `uint64_t`
value as the vector size, resulting in excessively large allocations
and out-of-memory errors during BMC initialization.

This commit introduces a `PostCodeDataVersion` field in the serialized
file. On startup, `post-code-manager` checks this version before
deserialization and discards outdated data if the version does not
match, ensuring a clean start without triggering memory issues.

Tested:
Verified that legacy persisted data is detected and discarded, allowing
`post-code-manager` to initialize with fresh data. No out-of-memory
conditions observed.

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

show more ...

7103f03909-Jul-2025 Amithash Prasad <amithash@meta.com>

Switch to hex string for post code representation in handler config

As title, using list of integers only make parsing the JSON easier
but would be really hard for developers to interpret or confirm

Switch to hex string for post code representation in handler config

As title, using list of integers only make parsing the JSON easier
but would be really hard for developers to interpret or confirm
if the correct post code is being used (Especially since most CPU
vendors tend to document post codes as HEX strings).

This also adds a name and description field to each handler
configuration to allow for ease of documentation.

Change-Id: I0215e98483aa6c5c3bae4f20d918118fdda9fa90
Signed-off-by: Amithash Prasad <amithash@meta.com>

show more ...

0cbdb6e727-Jun-2025 Manojkiran Eda <manojkiran.eda@gmail.com>

OWNERS: Add Manoj as reviewer

Would like to help out on the reviews.

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

202761f109-Jul-2025 Patrick Williams <patrick@stwcx.xyz>

meson: use non-deprecated systemd packageconfig

Systemd's packageconfig file has both `systemdsystemunitdir` and
`systemd_system_unit_dir` defined. The non-underscore one appears
to be a deprecated

meson: use non-deprecated systemd packageconfig

Systemd's packageconfig file has both `systemdsystemunitdir` and
`systemd_system_unit_dir` defined. The non-underscore one appears
to be a deprecated alias[1]. Move to the non-deprecated /
underscore-separated variant.

[1]: https://github.com/systemd/systemd/commit/4908de44b0a0409f84a7cdc5641b114d6ce8ba03

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

show more ...

b6616cdd29-May-2025 Amithash Prasad <amithash@meta.com>

Add support for post code handling/eventing

Add support to consume a JSON configuration which
will let a platform configuration to dictate if
we need to do special handling or logging based
on speci

Add support for post code handling/eventing

Add support to consume a JSON configuration which
will let a platform configuration to dictate if
we need to do special handling or logging based
on specific post codes received.

Tested:

1. Created the following config and after restarting
`xyz.openbmc_project.State.Boot.PostCode@0.service`:
```
[
{
"primary": [1,2,5],
"event": {
"name": "xyz.openbmc_project.State.SMC.SMCFailed",
"arguments": {
"IDENTIFIER": "test",
"FAILURE_TYPE": "world"
}
}
}
]
```

Created the primary post code:
```
root@bmc:~# busctl set-property xyz.openbmc_project.State.Boot.Raw /xyz/openbmc_project/state/boot/raw0 xyz.openbmc_project.State.Boot.Raw Value '(ayay)' 3 0x1 0x2 0x5 0x0
```
Check that the log is created:
```
root@bmc:~# busctl introspect -l xyz.openbmc_project.Logging /xyz/openbmc_project/logging/entry/2 xyz.openbmc_project.Logging.Entry | grep "AdditionalData\|Message"
.AdditionalData property a{ss} 6 "FAILURE_TYPE" "world" "IDENTIFIER" "test" <snip>
.Message property s "xyz.openbmc_project.State.SMC.SMCFailed"
```
2. Replace the config with:
```
[
{
"primary": [1,2,6],
"targets": ["testservice.service"]
}
]
```
Create a test unit file:
testservice.service:
```
[Unit]
Description=A simple oneshot service

[Service]
Type=oneshot
ExecStart=/bin/bash -c "echo Hello world > /tmp/test.txt"
```
Issue a new post code with the new config.
```
systemctl daemon-reload
systemctl restart xyz.openbmc_project.State.Boot.PostCode@0.service
root@bmc:/usr/lib/systemd/system# busctl set-property xyz.openbmc_project.State.Boot.Raw /xyz/openbmc_project/state/boot/raw0 xyz.openbmc_project.State.Boot.Raw Value '(ayay)' 3 0x1 0x2 0x5 0x0
root@bmc:/usr/lib/systemd/system# cat /tmp/test.txt
Hello world
```

Change-Id: Ibaa09fb88190a344fd7c4fadd24dda4aa4ae0633
Signed-off-by: Amithash Prasad <amithash@meta.com>

show more ...

4e1910bb01-Feb-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: Iac0e4028f0f9b69046acdd35a4f531680793fe3d
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: Iac0e4028f0f9b69046acdd35a4f531680793fe3d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

d443027801-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

meson: reformat with meson formatter

Apply the `meson format` results.

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

fb97336718-Dec-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-19

clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have b

clang-format: re-format for clang-19

clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have been deprecated, so adjust the style file
accordingly.

See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style.
See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.

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

show more ...

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

4653cd4917-Jun-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://githu

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://github.com/codespell-project/codespell

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

show more ...

f2da78de02-Apr-2024 Konstantin Aladyshev <aladyshev22@gmail.com>

meson: Fix local cereal build

Currently local build is failing with a message:
"""
cereal| Exception: Failed to configure the CMake subproject: Could NOT
find Boost (missing: Boost_INCLUDE_DIR seria

meson: Fix local cereal build

Currently local build is failing with a message:
"""
cereal| Exception: Failed to configure the CMake subproject: Could NOT
find Boost (missing: Boost_INCLUDE_DIR serialization)
Subproject subprojects/cereal is buildable: NO (disabling)
"""
Since cereal requires boost only for the sandbox build and this
functionality is not needed, add option to skip building performance
sandbox comparison to solve the issue.

Tested:
"meson setup build" no longer fails with the cereal error.

Change-Id: I84a1015177510dbc23097d4f68a0ac6a85051d95
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>

show more ...

611de48628-Feb-2024 Patrick Williams <patrick@stwcx.xyz>

systemd: Add host identifier to service description

On a multi-host system, there is no identifier for the post code manager
service, so you end up with console messages such as:

```
Start

systemd: Add host identifier to service description

On a multi-host system, there is no identifier for the post code manager
service, so you end up with console messages such as:

```
Starting Post code manager...
Starting Post code manager...
Starting Post code manager...
Starting Post code manager...
Starting Post code manager...
Starting Post code manager...
Starting Post code manager...
Starting Post code manager...
```

Add an identifier to the templated service file so that these instances
are differentiated.

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

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

8eb4d58b29-Nov-2023 Patrick Williams <patrick@stwcx.xyz>

build: use allowed over enabled

Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer retur

build: use allowed over enabled

Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer return true for auto features. Instead, the
expectation is to use `allowed()` which is true for both enabled and auto.

Switch all uses of `enabled` to `allowed`.

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

show more ...

608a392120-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: I23b5aa5ca608bf502224f036b3e217eefcab1d10
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

99a87b6f15-Aug-2023 George Liu <liuxiwei@inspur.com>

meson_options.txt: Support for reading options from meson.options

Support has been added for reading options from meson.options instead
of meson_options.txt[1]. These are equivalent, but not using t

meson_options.txt: Support for reading options from meson.options

Support has been added for reading options from meson.options instead
of meson_options.txt[1]. These are equivalent, but not using the .txt
extension for a build file has a few advantages, chief among them
many tools and text editors expect a file with the .txt extension to
be plain text files, not build scripts.

[1] https://mesonbuild.com/Release-notes-for-1-1-0.html#support-for-reading-options-from-mesonoptions

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

show more ...

5c75dd5612-Jul-2023 Patrick Williams <patrick@stwcx.xyz>

build: upgrade to C++23

Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of
the standard has been implemented. Upgrade the build to leverage it.

Change-Id: Ic6ef0ad86b97a49792b40

build: upgrade to C++23

Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of
the standard has been implemented. Upgrade the build to leverage it.

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

show more ...

e7e197b310-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: Ia0b293ab6c60f99ee6695deb755b1195d3a68faf
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 ...

65a6654312-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

meson: remove deprecated get_pkgconfig_variable

Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In
meson 0.58 the `get_variable` was enhanced to no longer require the
`pkgconfig

meson: remove deprecated get_pkgconfig_variable

Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In
meson 0.58 the `get_variable` was enhanced to no longer require the
`pkgconfig` keyword argument. Ensure meson 0.58 is required and update
the usage of all `get_pkgconfig_variable` and `get_variable` to be the
modern variant.

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

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

123