#
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 ...
|
#
08125ca7
|
| 07-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 ...
|
#
65583797
|
| 16-Dec-2019 |
Kuiying Wang <kuiying.wang@intel.com> |
Change obmc-standby to multi-user
Change obmc-standby.target to multi-user.target for post code manager service.
Tested: Post code could be catured correctly.
Change-Id: I3686104f67aad13fa4d5f5d38
Change obmc-standby to multi-user
Change obmc-standby.target to multi-user.target for post code manager service.
Tested: Post code could be catured correctly.
Change-Id: I3686104f67aad13fa4d5f5d382d3eb7dd8b9a74f Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
show more ...
|
#
3a044400
|
| 19-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 ...
|