#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
aebf87cc |
| 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: Ie85ba085aedffd41bcb6310ee57adb86cb68273d
show more ...
|
#
c869aef3 |
| 07-Jun-2022 |
Willy Tu <wltu@google.com> |
Add workaround for sdevent OOM error
Process all outstanding bus events before the loop to make sure we don't hit OOM errors.
Change-Id: I52e0a018d9c89dc0c5fdfba441d0ec3d5800fdcf Signed-off-by: Wil
Add workaround for sdevent OOM error
Process all outstanding bus events before the loop to make sure we don't hit OOM errors.
Change-Id: I52e0a018d9c89dc0c5fdfba441d0ec3d5800fdcf Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
4f26b3ee |
| 11-May-2022 |
Harvey.Wu <Harvey.Wu@quantatw.com> |
re-register LPC-Snoop into event loop
- According to commit 2a744b2d7, LPC-Snoop needs to be registered into event loop, so that it can record post code. But in commit 0269eaf36, the reporterSou
re-register LPC-Snoop into event loop
- According to commit 2a744b2d7, LPC-Snoop needs to be registered into event loop, so that it can record post code. But in commit 0269eaf36, the reporterSource was became a local variable in IF-ELSE which cause LPC-Snoop didn't be register into event loop.
refs: https://github.com/openbmc/phosphor-host-postd/commit/2a744b2d70ce9de8519a7c716da5009cb049db17 https://github.com/openbmc/phosphor-host-postd/commit/0269eaf36dcb486b6ac92326fa59f61c267ce7f8
TEST: root@gsz:/lib/systemd/system# journalctl -u lpcsnoop.service Jan 01 00:00:24 gsz systemd[1]: Started LPC Snoop Daemon. Jan 01 00:01:05 gsz snoopd[288]: Code: 0x1 Jan 01 00:01:05 gsz snoopd[288]: Code: 0x2 Jan 01 00:01:05 gsz snoopd[288]: Code: 0x2 Jan 01 00:01:05 gsz snoopd[288]: Code: 0x3 Jan 01 00:01:05 gsz snoopd[288]: Code: 0x3 Jan 01 00:01:05 gsz snoopd[288]: Code: 0x4 Jan 01 00:01:05 gsz snoopd[288]: Code: 0x4 Jan 01 00:01:07 gsz snoopd[288]: Code: 0x5 Jan 01 00:01:07 gsz snoopd[288]: Code: 0x6 Jan 01 00:01:08 gsz snoopd[288]: Code: 0x5 Jan 01 00:01:11 gsz snoopd[288]: Code: 0x0 Jan 01 00:01:11 gsz snoopd[288]: Code: 0x2 Jan 01 00:01:11 gsz snoopd[288]: Code: 0x7f Jan 01 00:01:17 gsz snoopd[288]: Code: 0x48 Jan 01 00:01:17 gsz snoopd[288]: Code: 0xe Jan 01 00:01:17 gsz snoopd[288]: Code: 0x49 Jan 01 00:01:17 gsz snoopd[288]: Code: 0x4a
Signed-off-by: Harvey.Wu <Harvey.Wu@quantatw.com> Change-Id: I15b50e4c5e84778c2d918ba34345dd15036157ac
show more ...
|
#
8f6c0ce3 |
| 03-May-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
main: avoid unused variables
min/maxPositionVal are only used behind ENABLE_IPMI_SNOOP, so add that check around their definition as well.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> C
main: avoid unused variables
min/maxPositionVal are only used behind ENABLE_IPMI_SNOOP, so add that check around their definition as well.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: Iaafb12e6ddacd04b8f2f8cfea295611faac89ee8
show more ...
|
#
0269eaf3 |
| 11-Aug-2021 |
Kumar Thangavel <thangavel.k@hcl.com> |
Add multi-host postcode support
These changes add the multiple host postcode implementation. In addition to the LPC snoop the postcode can be read via D-Bus interface.The same is displayed in seven
Add multi-host postcode support
These changes add the multiple host postcode implementation. In addition to the LPC snoop the postcode can be read via D-Bus interface.The same is displayed in seven segment display thorough GPIO lines.
The design can be refered at https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/35065
Tested:
Verified in Facebook Tiogapass & Yosemitev2 platforms.
1.The postcode displayed in the seven segment corresponding to the host position selected in the frontpanel of Facebook yosemitev2(4 host).
2.The postcode history is verified in the respective host directory "/var/lib/phosphor-post-code-manager/hostX(1,2,3,4)".
Signed-off-by: Kumar Thangavel <thangavel.k@hcl.com> Change-Id: Id79ad00652bfedd319d3b8ccf1aafbdc60b33d86
show more ...
|
#
d1ac1977 |
| 21-Mar-2022 |
Willy Tu <wltu@google.com> |
phosphor-host-postd: Convert to use bind_front for C++20
Using bind_front instead of bind for better readability and efficient function binding.
Change-Id: Ia247d00c4b085de96605a07176cd22fbfeac1d55
phosphor-host-postd: Convert to use bind_front for C++20
Using bind_front instead of bind for better readability and efficient function binding.
Change-Id: Ia247d00c4b085de96605a07176cd22fbfeac1d55 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
a396c85a |
| 10-Dec-2021 |
Willy Tu <wltu@google.com> |
phosphor-host-postd: Cleanup CodeChecker Errors
Removed the following error messages: bugprone-unused-raii - object destroyed immediately after creation; did you mean to name the object clang-di
phosphor-host-postd: Cleanup CodeChecker Errors
Removed the following error messages: bugprone-unused-raii - object destroyed immediately after creation; did you mean to name the object clang-diagnostic-defaulted-function-deleted - explicitly defaulted move assignment operator is implicitly deleted clang-diagnostic-unused-private-field - private field 'bus' is not used
Change-Id: I493da3433db50396354b6b9a43c452becba91790 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
6a5e0a1c |
| 19-Dec-2021 |
William A. Kennington III <wak@google.com> |
main: Terminate cleanly for TERM and INT This makes it possible to instrument the application for memory leaks and other required sanitization at termination. Change-Id: I94741c
main: Terminate cleanly for TERM and INT This makes it possible to instrument the application for memory leaks and other required sanitization at termination. Change-Id: I94741c4df746d5cc65ce77ad5cf86ef505b7576b Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
b3baa683 |
| 19-Dec-2021 |
William A. Kennington III <wak@google.com> |
main: Use optional instead of unique_ptr Change-Id: I3b9cbfd4483aeeea1e8adff8058a2737f2106de1 Signed-off-by: William A. Kennington III <wak@google.com>
|
#
2a744b2d |
| 01-Apr-2021 |
Troy Lee <troy_lee@aspeedtech.com> |
LPC-Snoop event isn't registered into event loop The `reporterSource` is constructs in the if-statement but destructed right after leaving the scope, so the event never be registered int
LPC-Snoop event isn't registered into event loop The `reporterSource` is constructs in the if-statement but destructed right after leaving the scope, so the event never be registered into event loop. Tested with verbose mode, without a snoop device is okay. ``` root@ast2600-emmc:/# /tmp/snoopd -b 1 -v ^C ``` With a snoop device is working correctly. ``` root@ast2600-emmc:/# /tmp/snoopd -b 1 -v -d /dev/aspeed-lpc-snoop0 Code: 0x1 Code: 0x3 Code: 0x4 Code: 0x2 Code: 0x3 Code: 0x4 Code: 0x5 Code: 0xc Code: 0xd Code: 0x15 Code: 0x19 Code: 0x0 Code: 0x2 Code: 0x7f Code: 0x0 Code: 0xf Code: 0x3 Code: 0x48 Code: 0x49 Code: 0x4a Code: 0x4d Code: 0x50 Code: 0x15 ``` Signed-off-by: Troy Lee <troy_lee@aspeedtech.com> Change-Id: I5b9c186eccaf1277f07c9d866dd875cde1ab385d
show more ...
|
#
ba5258f7 |
| 25-Feb-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix code to consume the secondary code - The snooping daemon was coded to fill the Raw Value dbus property with uint64_t signature. - The intent behind this commit is to work
Fix code to consume the secondary code - The snooping daemon was coded to fill the Raw Value dbus property with uint64_t signature. - The intent behind this commit is to work with the changed dbus backend from uint64_t to struct[uint64_t,array[byte]]. - The phosphor dbus interface change is documented in the below commit : https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/40903 Tested By: - As the ibm systems does not a snooping port, i have done the unittesting & all the unit tests are PASSED with a system that has the above mentioned dbus interface change. root@witherspoon:/tmp# ./post_reporter_test [==========] Running 5 tests from 1 test suite. [----------] Global test environment set-up. [----------] 5 tests from PostReporterTest [ RUN ] PostReporterTest.EmitsObjectsOnExpectedDbusPath [ OK ] PostReporterTest.EmitsObjectsOnExpectedDbusPath (17 ms) [ RUN ] PostReporterTest.AddsObjectWithExpectedName [ OK ] PostReporterTest.AddsObjectWithExpectedName (5 ms) [ RUN ] PostReporterTest.ValueReadsDefaultToZero [ OK ] PostReporterTest.ValueReadsDefaultToZero (1 ms) [ RUN ] PostReporterTest.SetValueToPositiveValueWorks [ OK ] PostReporterTest.SetValueToPositiveValueWorks (2 ms) [ RUN ] PostReporterTest.SetValueMultipleTimesWorks [ OK ] PostReporterTest.SetValueMultipleTimesWorks (2 ms) [----------] 5 tests from PostReporterTest (34 ms total) [----------] Global test environment tear-down [==========] 5 tests from 1 test suite ran. (40 ms total) [ PASSED ] 5 tests. Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Id0a79fcddc827d34f9d2a61ab14d8c9c4be522b5
show more ...
|
#
aade4adb |
| 18-Feb-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Make snoop port optional for the daemon - In the current state, the daemon only works on the bmc systems that has the snooping port enabled, but for IBM systems, we communicate t
Make snoop port optional for the daemon - In the current state, the daemon only works on the bmc systems that has the snooping port enabled, but for IBM systems, we communicate the progress codes aka post codes via pldm. - In addition to the host, we also have couple of bmc applications that can post these codes during the early boot sequence. - The intent behind this commit is to make the snooping port argument optional for the snooping service, so that the daemon can still host the raw interface & the Raw value property for pldm to write into, even when the snooping device is not present. - This commit would try to address the following mailing list proposal. https://lore.kernel.org/openbmc/4795347F-477D-45EF-A145-0C7B163FE01B@getmailspring.com/ TestedBy: - meson builddir - ninja -C builddir - copy the snoopd daemon into a witherspoon system and make sure it hosts the dbus interface. - meson builddir - ninja -C builddir -Dsnoop-device=/dev/aspeed-lpc-snoop0 - copy the snoopd daemon into witherspoon and it fails to start beacause it could not find the snoop port. root@witherspoon:/tmp# Unable to open: /dev/aspeed-lpc-snoop0 [1]+ Done(255) ./snoopd Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I941897a7aea795f418494087ac8aa1fbc6ecf633
show more ...
|
#
cce09623 |
| 06-Apr-2020 |
Kun Yi <kunyi731@gmail.com> |
Work around warnings building with -Wall. Mark several unused variables as such to avoid triggering build failures. Change-Id: Ie9b2b3a375afb7f7b48ccee926312a6fc640bd70 Sign
Work around warnings building with -Wall. Mark several unused variables as such to avoid triggering build failures. Change-Id: Ie9b2b3a375afb7f7b48ccee926312a6fc640bd70 Signed-off-by: Kun Yi <kunyi731@gmail.com>
show more ...
|