| 5a03ee48 | 05-Dec-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Initial commit
Added initial .clang-tidy configuration file with recommended C++ checks aligned with the OpenBMC-approved checklist. This setup enforces modern C++ best practices and hel
clang-tidy: Initial commit
Added initial .clang-tidy configuration file with recommended C++ checks aligned with the OpenBMC-approved checklist. This setup enforces modern C++ best practices and helps catch common issues early in development.
Tested: verified build.
Change-Id: I113567cc45ff9438290cd568e58aa546407f4e30 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
| 789dab8f | 17-Dec-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Replace NULL with nullptr
Replaced all instances of NULL with nullptr to improve type safety and clarity, as nullptr is the modern C++ standard for null pointers.
Tested: Build verified
clang-tidy: Replace NULL with nullptr
Replaced all instances of NULL with nullptr to improve type safety and clarity, as nullptr is the modern C++ standard for null pointers.
Tested: Build verified
Change-Id: I81f6b220f0f01ce1cdc631aeb333c0a26edf9f58 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
| 99396b64 | 28-May-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat with clang-20
Copy the latest format file from the docs repository and apply using clang-format-20.
See I1818407fdd8ab2ca11a939ffebd5f3e5445403c3 for c
clang-format: update latest spec and reformat with clang-20
Copy the latest format file from the docs repository and apply using clang-format-20.
See I1818407fdd8ab2ca11a939ffebd5f3e5445403c3 for clang-20 enablement.
Change-Id: Ibb1a593d259af85c45c337023f2614641a238d58 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 13d9ae33 | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I19b98dd511766ef0a8c08913436ac5fba22bf3ef Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
| 9acd8cd2 | 30-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled or not-disabled
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`)
build: use allowed over enabled or not-disabled
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`. Switch all uses of `not disabled` to `allowed`.
Change-Id: Ia2942bcca7a9d47ae5662ab5bc1978c993974482 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| d2d5a959 | 18-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: I7deef6122f57b0aed740e21ee861d2f642cbfffb Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| fe51495e | 04-Sep-2024 |
Cosmo Chou <cosmo.chou@quantatw.com> |
Change primary postcode interface to byte array
Change primary code to std::vector<uint8_t> to meet the changes in phosphor-dbus-interface.
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-in
Change primary postcode interface to byte array
Change primary code to std::vector<uint8_t> to meet the changes in phosphor-dbus-interface.
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/74633
Change-Id: Ib5822973a1dbc6aa8c52f4e81b56091dc33b5f08 Signed-off-by: Cosmo Chou <cosmo.chou@quantatw.com> Signed-off-by: Potin Lai <potin.lai@quantatw.com>
show more ...
|
| d62ef559 | 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: Ia5d22931711ae5704dfafa0a7786909087d488ee Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| dd3928b0 | 17-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: I611b83efacd76580d19d91acfb6c6e8a09f40f4a Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
| fad26601 | 24-Jun-2024 |
Willy Tu <wltu@google.com> |
test: Initialize slot in SdBusMock
In the default constructor for SdBusMock the slot was initialized and we override it in this test case which can lead to memory errors.
Change-Id: I522ee63505d988
test: Initialize slot in SdBusMock
In the default constructor for SdBusMock the slot was initialized and we override it in this test case which can lead to memory errors.
Change-Id: I522ee63505d98861a1d45abd01144d1eef7aa727 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
| 95aa4440 | 08-Apr-2024 |
Rajaganesh Rathinasabapathi <Rajaganesh.Rathinasabapathi@amd.com> |
Change Aspeed PCC device name validation
Latest Aspeed PCC driver adds dual node support. Aspeed PCC devices are named as "aspeed-lpc-pcc<ID>".
Change device name string check to substring check.
Change Aspeed PCC device name validation
Latest Aspeed PCC driver adds dual node support. Aspeed PCC devices are named as "aspeed-lpc-pcc<ID>".
Change device name string check to substring check.
Tested on AMD CRB system.
Change-Id: I486471bc28c2d6cd6fdcf5e7a115ba455f71003e Signed-off-by: Rajaganesh Rathinasabapathi <Rajaganesh.Rathinasabapathi@amd.com>
show more ...
|
| 72d55072 | 05-Dec-2023 |
cchoux <cosmo.chou@quantatw.com> |
Add Aspeed PCC driver support
Add support for Aspeed Post Code Capture driver.
In order to fetch post code from Aspeed PCC driver, please set `snoop-device` and `post-code-bytes` as below. - snoop-
Add Aspeed PCC driver support
Add support for Aspeed Post Code Capture driver.
In order to fetch post code from Aspeed PCC driver, please set `snoop-device` and `post-code-bytes` as below. - snoop-device = aspeed-lpc-pcc - post-code-bytes = 8
Tested on Harma system.
Change-Id: I5806362d2a54d1ed7b7f821d512f79cbc3effd38 Signed-off-by: Cosmo Chou <cosmo.chou@quantatw.com> Signed-off-by: Potin Lai <potin.lai@quantatw.com>
show more ...
|
| 676fd83d | 29-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: I1fb38a8715c8dbec883beaadd8519472de452e43 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| bebbda9b | 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: I9289bdced9919b505edbd70a0d1c41bc6abdee1e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| de7a6dd7 | 03-May-2023 |
Jonathan Doman <jonathan.doman@intel.com> |
Separate IPMI and legacy snoop code to different files
snoopd contains two implementations that have very little in common. Separate the IPMI code (functions and global objects) into its own file to
Separate IPMI and legacy snoop code to different files
snoopd contains two implementations that have very little in common. Separate the IPMI code (functions and global objects) into its own file to reduce #ifdefs and make it easier to understand. Better separate the cmdline options and help text to only be used in the applicable build configuration.
Tested: Built with -Dsnoop=enabled and verified only -h option is accepted. Built without -Dsnoop and verified -d/-r/-b options are accepted.
Change-Id: I7f14469fafd9f050f6b9f356882ce9e26fb7f206 Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
show more ...
|
| 0522592f | 15-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: If8cb9035eae5ef9008c0d13488817f2143920f02
show more ...
|
| 42c2b568 | 12-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: Iba60434850d3f636a3a1a
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: Iba60434850d3f636a3a1a500fda8252b3b54e3a6 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 0ea7357e | 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: I509c8567baedea7c86787f2e880900da13ebfc9f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| fd2430d8 | 03-May-2023 |
Jonathan Doman <jonathan.doman@intel.com> |
Put rate limiting options behind #ifdef
Fixes compile issue when ENABLE_IPMI_SNOOP is set (rateLimit var set but not used).
Also add usage help text for --rate-limit option.
Tested: Compiles with
Put rate limiting options behind #ifdef
Fixes compile issue when ENABLE_IPMI_SNOOP is set (rateLimit var set but not used).
Also add usage help text for --rate-limit option.
Tested: Compiles with IPMI snoop feature enabled and disabled.
Change-Id: I13a7f6c4633577d24124667a428f047b657c0da1 Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
show more ...
|
| 38b0946c | 26-Apr-2023 |
Jonathan Doman <jonathan.doman@intel.com> |
Add rate limiting
A host CPU can write POST codes much faster than the BMC can handle them, considering all the D-Bus/IPC work required. Ideally `dbus-broker` would apply backpressure when it gets f
Add rate limiting
A host CPU can write POST codes much faster than the BMC can handle them, considering all the D-Bus/IPC work required. Ideally `dbus-broker` would apply backpressure when it gets full of unhandled signals, but its quota mechanism uses a simple per-user accounting that doesn't differentiate between all the connections from OpenBMC daemons running as root. So there is no way to configure it to prevent just `snoopd` from sending too many messages - instead it will disconnect arbitrary services leading to mass chaos.
So without a D-Bus policy mechanism to prevent excess memory usage, there are 2 different failure cases during a POST code storm: 1. `snoopd` continues to send messages faster than `post-code-manager` can process them, leading to `dbus-broker` consuming all the system memory. 2. `snoopd` fills up the D-Bus socket buffer. Once sd-bus fails to send a message across the socket, it starts queuing messages internally leading to `snoopd` consuming all the system memory. This only happens because we get stuck in the `snoopd` read loop during a POST code storm, and we don't process other events that would allow the write queue to drain.
As a workaround, introduce configurable rate limiting to `snoopd`. A new meson option 'rate-limit' sets the corresponding '--rate-limit' command-line parameter. These options take an integer value representing the maximum number of POST codes to process per second. The default meson option value is 1000, and the value of 0 will disable rate limiting.
Tested: Ran the POST code stress on host for 30 minutes: ``` [root@sut ~]# stress-ng --ioport 2 ```
Watched BMC process memory usage and CPU usage in `top`, verified that `post-code-manager`, `dbus-broker`, and `snoopd` each used less than 10% CPU and 2% memory on AST2600 with 512 MiB of DRAM.
Change-Id: If03a01e0cd62366d188109bb4dff52958346e1db Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
show more ...
|
| 65d1753c | 12-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: I3f360e25af1da4b026e70cce65480641ebcac263 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 30751ec2 | 21-Nov-2022 |
William A. Kennington III <wak@google.com> |
main: Leverage sdeventplus common loop
This makes the memory leak workaround common as part of sdeventplus. Any changes to that functionality can now be shared.
Change-Id: Iad83a2a20599e07c5d937b33
main: Leverage sdeventplus common loop
This makes the memory leak workaround common as part of sdeventplus. Any changes to that functionality can now be shared.
Change-Id: Iad83a2a20599e07c5d937b334a765cc365b089c5 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
| b987663f | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
Change-Id: I5bb4ae5dd6d606bce6dbfe67efea1efcf6abda75 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 56127ef8 | 12-Oct-2022 |
Sunita Kumari <sunitax.kumari@intel.com> |
[Fix] lpcsnoop service exit unsuccessfully
[Issue] when BMC code reset, the lpcsnoop service exit unsuccessfully.
[Root Cause] return exit code 1 when caught SIGTERM signal.
https://github.com/ope
[Fix] lpcsnoop service exit unsuccessfully
[Issue] when BMC code reset, the lpcsnoop service exit unsuccessfully.
[Root Cause] return exit code 1 when caught SIGTERM signal.
https://github.com/openbmc/phosphor-host-postd/blob/master/main.cpp#L368 https://github.com/openbmc/sdeventplus/blob/master/src/sdeventplus/event.hpp#L115
Tested: Service exit successfully
Signed-off-by: Sunita Kumari <sunitax.kumari@intel.com> Change-Id: I47cc6d31742f1595231fe22e345ea955ad41c377
show more ...
|
| aee65401 | 09-Aug-2022 |
Kumar Thangavel <thangavel.k@hcl.com> |
Disable Debug card display for postcodes if no GPIO's.
Some platforms does not have GPIO pins for debug card display. It will throw error and will not proceed furthur process. In this case, postcode
Disable Debug card display for postcodes if no GPIO's.
Some platforms does not have GPIO pins for debug card display. It will throw error and will not proceed furthur process. In this case, postcode display and selector position related code can be skipped to disabled the 7seg debug card display alone for postcodes.
It will not affect other process like postcode display in dbus, etc.
TESTED : Verified multi host postcodes are displaying in the dbus for Facebook YosemiteV35 and YosemiteV2.
Signed-off-by: Kumar Thangavel <thangavel.k@hcl.com> Change-Id: Iaa0aeec394523e1d62037650439ac60dc2488a77
show more ...
|