06b1dbe9 | 16-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 ...
|
9c2e871d | 16-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 ...
|
2d74ceb6 | 05-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 ...
|
608a3921 | 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: I23b5aa5ca608bf502224f036b3e217eefcab1d10 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
e7e197b3 | 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: Ia0b293ab6c60f99ee6695deb755b1195d3a68faf Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
13cb8537 | 15-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 ...
|
8290e0f3 | 23-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 ...
|
c7fed5ca | 23-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 ...
|
2018964a | 09-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 ...
|
eddf960a | 23-Nov-2022 |
Jonathan Doman <jonathan.doman@intel.com> |
Update .clang-format and reformat
Update the local .clang-format to the example configuration and reformat all the source code, as well as line wrap the README text.
Signed-off-by: Jonathan Doman <
Update .clang-format and reformat
Update the local .clang-format to the example configuration and reformat all the source code, as well as line wrap the README text.
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com> Change-Id: I996d96a14a271612e03113013e29f4613b782c35
show more ...
|
e9feb957 | 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: Id93b8dfb6c81f62647dd56f1ce04c1a4fda4f7f4
show more ...
|
bd706d79 | 20-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 ...
|
de8d3a53 | 05-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 ...
|
84855abe | 04-Dec-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
build: Switch to meson & c++20 & remove cmake
This commit would add the meson build system support for the phosphor-post-code-manager repository and also switch's the compiler standard to c++20 (so
build: Switch to meson & c++20 & remove cmake
This commit would add the meson build system support for the phosphor-post-code-manager repository and also switch's the compiler standard to c++20 (so that we can leverage the latest C++ constructs).
This commit also add's the cereal dependency. There are source files that assume cereal header files will be present without the meson build explicitly finding that dependency. This leads to compile failure when running in subproject mode.
Tested By: 1. Compile post-code-manager using meson builddir ninja -C builddir 2. copy that executable on to bmc 3. was able to run it and make sure it hosts the dbus interfaces like it used to.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I342108ea3843c3990385a432c4c540e20b9db4cc
show more ...
|
c4440ebe | 04-Dec-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix unused variables error
Enforcing werror=true in meson would by default convert all the warnings into error, there by fixing unused variables is necessary.
Signed-off-by: Manojkiran Eda <manojki
Fix unused variables error
Enforcing werror=true in meson would by default convert all the warnings into error, there by fixing unused variables is necessary.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I3ffd7b3a5e876ff306dd4f05343360c30fd7e6d3
show more ...
|
410ba29d | 04-Dec-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Drop experimental::filesystem
From c++17 onwards, we have std::filesystem use this instead.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I18dfce63020fd8683abc5c9afd4af898e20e
Drop experimental::filesystem
From c++17 onwards, we have std::filesystem use this instead.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I18dfce63020fd8683abc5c9afd4af898e20ebe62
show more ...
|
aed7b3de | 18-Jun-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Make MaxBootCycleCount Configurable
MaxBootCycleCount is a dbus property that is used to indicate the maximum number of boot cycles that the post-code-manager daemon can store the progress codes for
Make MaxBootCycleCount Configurable
MaxBootCycleCount is a dbus property that is used to indicate the maximum number of boot cycles that the post-code-manager daemon can store the progress codes for, before it starts wrapping.
Right now the MaxBootCycleCount is hardcoded to 100 in the code. It should ideally be a configurable variable per platform so that vendors can choose how may progress codes that we want to store.
Tested By: 1. Default configuration should set the value to 100 - PASSED. 2. Override the value to any number out of 1-100 and the cmake configuration step should throw an error - PASSED 3. Override the value to any number in between 1-100, and patch the daemon ,and make sure that MaxBootCycleCount value is set to the configured value.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Ic07087a9d6696412e1e6c54fb9945b91f3c560dc
show more ...
|
84a4c19c | 25-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 ...
|
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 ...
|
9d91a39a | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: replace message::variant with std::variant
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic20750595d8dd63b9b9c8a5d8012f6166796a64c |
23e3bf0e | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove deprecated variant_ns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ideff9c2a6d5be16fd123a40a0878cf09f8b3daa8 |
993d4dd9 | 29-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 ...
|
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 ...
|