Revision Date Author Comments
# b6616cdd 29-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 ...


# 611de486 28-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 ...


# fd45f788 01-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 ...