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 ...
|
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 ...
|
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 ...
|
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 ...
|
f8d0e0bf | 11-May-2022 |
wukaihua-fii-na <eason.kh.wu@fii-na.com> |
7seg: modify the file operation
Open the file descriptor in main() and close the file descriptor only when the program is about to terminate. Closing the file descriptor at DisplayDbusValue() in 7se
7seg: modify the file operation
Open the file descriptor in main() and close the file descriptor only when the program is about to terminate. Closing the file descriptor at DisplayDbusValue() in 7seg.cpp will make the program using poll() to receive POST codes always return the POLLHUP and the poll() is not actually blocked, which makes the program always preempt the CPU. This modification prevents the user space program recieving POST codes via poll() from preempting the CPU too much time.
Tested: using `top` to inspect whether the program receiving POST codes from 7seg.cpp does not preempt the CPU resources.
Signed-off-by: wukaihua-fii-na <eason.kh.wu@fii-na.com> Change-Id: I0824727d8cb207c1622da12ac833a089a676661e
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 ...
|
80be5d83 | 07-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping.
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping. It is time to remove this boolean to make it more observable which actions are being used in applications. Map all `true` occurrences to `action::defer_emit`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iead15c0b9b891c7e65e732c7e0af1985d812a39f
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 ...
|
5633a3fc | 19-Nov-2021 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove usage of deprecated alias
The alias `server::match` has been deprecated since 2016. Use the new alias under bus.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I0
sdbusplus: remove usage of deprecated alias
The alias `server::match` has been deprecated since 2016. Use the new alias under bus.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I04bef72cb239f7580f06c7d94f42b314d64cee4d
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 with the changed d
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 ...
|
60252eec | 21-Dec-2020 |
Jonathan Doman <jonathan.doman@intel.com> |
Fix D-Bus path for single-host POST code snoop
phosphor-post-code-manager was already updated to watch for POST code updates at Raw0, which broke POST code monitoring on single-host configurations.
Fix D-Bus path for single-host POST code snoop
phosphor-post-code-manager was already updated to watch for POST code updates at Raw0, which broke POST code monitoring on single-host configurations. While the full change for multi-host support is still in progress, this allows the single-host usage to continue working.
Tested: With changes phosphor-post-code-manager: I59ed514f28c2bb9b159f51367c38557bf55bf226 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: I89ab5f2eef7eab59823df3a063414f3ca3b2949f
show more ...
|
bf002b46 | 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: I10ffd8f063fb92a1b9a227b607d1ac439a8ed18e |
59c5d9ff | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove deprecated variant_ns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6b522b72d990a1e9a4195a3f7c86d89e41b9961e |
b5754fd4 | 10-Sep-2018 |
Patrick Venture <venture@google.com> |
Update .clang-format
Per sdbusplus's clang-format file.
Change-Id: Ib7868577dda1bc7ccb300a305e9a3c65efab136c Signed-off-by: Patrick Venture <venture@google.com> |
afff574e | 10-Jul-2018 |
Kun Yi <kunyi731@gmail.com> |
snoop_listen: Add constructors for SnoopListen
Provide two additional constructors for SnoopListen, one that takes any std::function that operates on sdbusplus message, and another one that takes st
snoop_listen: Add constructors for SnoopListen
Provide two additional constructors for SnoopListen, one that takes any std::function that operates on sdbusplus message, and another one that takes std::function that operates on the uint64_t postcode. This allows user to easily register a POST code handler without writing much of the boiler plate code.
example.cpp is also converted to use the new constructor.
Tested: 'snooper' program compiled from example.cpp behaves correctly.
Change-Id: I20dc4fa5067e836d3cfa8ebb616a131f38a93a30 Signed-off-by: Kun Yi <kunyi731@gmail.com>
show more ...
|
35b6c67c | 11-Jun-2018 |
Kun Yi <kunyi731@gmail.com> |
snoop.h/main.cpp: Add first tests for PostReporter class
Add unit tests for PostReporter DBus object path, reading, and updating. Move the class definition to the header file such that the tests can
snoop.h/main.cpp: Add first tests for PostReporter class
Add unit tests for PostReporter DBus object path, reading, and updating. Move the class definition to the header file such that the tests can access it.
Tested: unit tests pass.
Change-Id: I4d3571ccd5455297d6b02ed74ed789fe05e40979 Signed-off-by: Kun Yi <kunyi731@gmail.com>
show more ...
|
33569758 | 12-Mar-2018 |
Patrick Venture <venture@google.com> |
Initial check-in of LPC Snoop Broadcast Daemon
This is a simple daemon which reads a file interface from an lpc-snoop driver and broadcasts the values read.
It presently assumes there's /dev/aspeed
Initial check-in of LPC Snoop Broadcast Daemon
This is a simple daemon which reads a file interface from an lpc-snoop driver and broadcasts the values read.
It presently assumes there's /dev/aspeed-lpc-snoop0, however this could be made a command line parameter.
Change-Id: Ic8e7511de619d93bf1cffd9a096c92315f870946 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|