3c49693b | 06-Sep-2024 |
Brandon Kim <brandonkim@google.com> |
Remove all operational logs
Only error messages shall emit logs
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I54198f36531f3deb5f9ca57f8b7caece2fbcc065 |
41a58d4f | 06-Sep-2024 |
Brandon Kim <brandonkim@google.com> |
external_storer: Add a log entry limit
This is to ensure that we don't get uncapped log entries. Default is set to the first 20 logs being saved, and the next 980 being in a circualr queue (1000 ent
external_storer: Add a log entry limit
This is to ensure that we don't get uncapped log entries. Default is set to the first 20 logs being saved, and the next 980 being in a circualr queue (1000 entries in total).
Tested: Added unit test to ensure that the queue works as intended. Also verified by injecting 1000 entries to ensure that the buffer indeed saves the first 20, and caps it 1000.
``` //LogEntry1: Created: ...Entries/66a97808-1e22-4c1e-b0f6-4b9eb7c714e7/index.json ... //LogEntry20: Created: ...Entries/9c07937a-9524-40f1-acef-19db73b46678/index.json //LogEntry21: Created: ...Entries/0bfb7ede-8020-4613-bfcf-5815ca176c79/index.json ... //LogEntry1001: Removed: ...Entries/0bfb7ede-8020-4613-bfcf-5815ca176c79 Created: ...Entries/31bdf3be-1e87-4e77-922d-9bbac09ac824/index.json ```
We can see that starting on the 1001st log, log entry 21 is deleted to make room.
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: Ic2badd7f01741d788cad829c9e203b7c4962fc8e
show more ...
|
95174256 | 06-Sep-2024 |
Brandon Kim <brandonkim@google.com> |
notifier_dbus_handler: Remove the vector
This vector isn't needed, as we only use the D-Bus object to notify the phosphor-dump-manager.
Tested: Verified on a local machine that the dump manager sti
notifier_dbus_handler: Remove the vector
This vector isn't needed, as we only use the D-Bus object to notify the phosphor-dump-manager.
Tested: Verified on a local machine that the dump manager still detects the new D-Bus path.
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: If8fb12554f5015377c71c56e1f059c14c3865661
show more ...
|
3d0cd556 | 25-Aug-2022 |
kasunath <kasunath@google.com> |
Modify D-Bus to using asio server
DBus updates are now using the asio server way.
Tested: Tested with unit tests and locally on a machine.
Signed-off-by: Kasun Athukorala <kasunath@google.com> Cha
Modify D-Bus to using asio server
DBus updates are now using the asio server way.
Tested: Tested with unit tests and locally on a machine.
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: I77553bcc3baae70e5d684a62f2c19592ff844665 Signed-off-by: Brandon Kim <brandonkim@google.com>
show more ...
|
1a64356f | 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: I61c7e22e726dbab6c7f3da43270adbdb9b4927fb Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
5de90619 | 13-Feb-2024 |
Patrick Williams <patrick@stwcx.xyz> |
prefer std::format over fmt
Use std::format or stdplus::print and eliminate the fmt dependency.
Change-Id: Ide14b682949914f09f749141196cdb210fe1239e Signed-off-by: Patrick Williams <patrick@stwcx.x
prefer std::format over fmt
Use std::format or stdplus::print and eliminate the fmt dependency.
Change-Id: Ide14b682949914f09f749141196cdb210fe1239e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
79c584eb | 07-Feb-2024 |
Brandon Kim <brandonkim@google.com> |
external_storer_file: Add logging for created file
It's hard to debug exactly what error was passed in from the payload size. Add file creation path to the debug message for better debugging
Tested
external_storer_file: Add logging for created file
It's hard to debug exactly what error was passed in from the payload size. Add file creation path to the debug message for better debugging
Tested: root@iacpr4-nfd01:~# journalctl -b |grep bios-bmc bios-bmc-smm-error-logger[435]: Read an entry of '235' bytes bios-bmc-smm-error-logger[435]: Read an entry of '228' bytes bios-bmc-smm-error-logger[435]: Read an entry of '369' bytes bios-bmc-smm-error-logger[435]: Read an entry of '90' bytes bios-bmc-smm-error-logger[435]: Read an entry of '2454' bytes bios-bmc-smm-error-logger[435]: Read an entry of '307' bytes bios-bmc-smm-error-logger[435]: Created: /run/bmcweb/redfish/v1/ Systems/system/LogServices/Log1/index.json bios-bmc-smm-error-logger[435]: Created: /run/bmcweb/redfish/v1/ Systems/system/LogServices/Log1/Entries/index.json bios-bmc-smm-error-logger[435]: Read an entry of '178' bytes bios-bmc-smm-error-logger[435]: Created: /run/bmcweb/redfish/v1/ Systems/system/Memory/dimm6/MemoryMetrics/index.json bios-bmc-smm-error-logger[435]: Read an entry of '1046' bytes bios-bmc-smm-error-logger[435]: Created: /run/bmcweb/redfish/v1/ Systems/system/LogServices/Log1/Entries/ d311e785-8245-4cc5-8de1-cb103bd4c0a3/index.json
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I18e89eb1e46a507da425b83962f42f7e64a6adbb
show more ...
|
3b1226dd | 07-Dec-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: adjust nlohmann-json dependency
Simplify the nlohmann-json in the meson.build and align with the usage in other repositories.
Change-Id: I8daf46711bdfcec30bb38a32324046f6b717aa33 Signed-off-
meson: adjust nlohmann-json dependency
Simplify the nlohmann-json in the meson.build and align with the usage in other repositories.
Change-Id: I8daf46711bdfcec30bb38a32324046f6b717aa33 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
589c175b | 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: I2ff0bc6d39e0c53b1fc37cf790fa88ebcfdea680 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
82ab8320 | 16-Aug-2023 |
Brandon Kim <brandonkim@google.com> |
buffer: Update to follow the design doc
queueSize and ueRegionSize should not change at runtime. Make it so that it throws if these constants fail any time we try to use them as it means that the bu
buffer: Update to follow the design doc
queueSize and ueRegionSize should not change at runtime. Make it so that it throws if these constants fail any time we try to use them as it means that the buffer was overwritten (possibly by a bad actor).
Update the default queueSize and ueRegionSize to match our test variables.
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I2c906d26016ce6eb19e953ae432abd5482b6ccf8
show more ...
|
759ebaf3 | 16-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
Add nlohmann dependency
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I8b0a1c01d05b053fc0669f626a975f406d88549a |
b8125763 | 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: I8f5382f5868ca19781c2327a3e69f02118975a25 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
3cbb6ef6 | 15-Mar-2023 |
Edward Lee <edwarddl@google.com> |
Remove unused variables
Jenkins presubmit fails for all commits right now due to certain unused variables. This commit aims to pass presubmit without regressing functionality.
Tested: Presubmit pas
Remove unused variables
Jenkins presubmit fails for all commits right now due to certain unused variables. This commit aims to pass presubmit without regressing functionality.
Tested: Presubmit passes
Change-Id: Ifdc7081b1154ce3ac2f3ab0828429660db35360a Signed-off-by: Edward Lee <edwarddl@google.com>
show more ...
|
aedea9fc | 05-Dec-2022 |
kasunath <kasunath@google.com> |
Add missing RDE definitions
In the previous commit, some RDE definitions were moved to this repo from libbej repo but some definitions were missed. This CL adds the missing definitions.
Signed-off-
Add missing RDE definitions
In the previous commit, some RDE definitions were moved to this repo from libbej repo but some definitions were missed. This CL adds the missing definitions.
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: I00c63a5ccb02dc3dfe3018d343a633458ef23c14
show more ...
|
3def3c8e | 13-Sep-2022 |
Brandon Kim <brandonkim@google.com> |
buffer: Update the definition of QueueSize
There were confusion whether the QueueSize field represented just the queue for the normal log or if it represented the whole circular buffer. Settled on i
buffer: Update the definition of QueueSize
There were confusion whether the QueueSize field represented just the queue for the normal log or if it represented the whole circular buffer. Settled on it being the whole circular buffer.
Tested: Unit tested and verified this works on a downstream machine
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I867e997b72500c7bcd03047d8eb3e4db146a8add
show more ...
|
613ba537 | 12-Sep-2022 |
Brandon Kim <brandonkim@google.com> |
buffer: Fix a corner case with header wraparound
Update the unit test so that we cover this corner case + update the API so that we no longer pass in the offset manually.
Tested: Unit test coverage
buffer: Fix a corner case with header wraparound
Update the unit test so that we cover this corner case + update the API so that we no longer pass in the offset manually.
Tested: Unit test coverage + integration test with our downstream platform that found this issue
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I6b0a7974f902e0248bfb4932237176df20fdaf61
show more ...
|
271d2313 | 02-Sep-2022 |
Brandon Kim <brandonkim@google.com> |
buffer: Update queueSize and Read/Write Ptrs to 3B
This allows for bigger Queue size than 64KB.
Tested: Verified this with a new BIOS
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id:
buffer: Update queueSize and Read/Write Ptrs to 3B
This allows for bigger Queue size than 64KB.
Tested: Verified this with a new BIOS
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I558a24c3b2500754424bdad6459244279592238b
show more ...
|
bea36e22 | 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: I17807e986cefa6a3d9e757c533ac373035438aed
show more ...
|
a3b64fb6 | 15-Jun-2022 |
kasunath <kasunath@google.com> |
Create a DBus notification for each LogEntry
For each log entry, a new FilePath DBus object will be created where the FilePath.path value is the location of the JSON LogEntry file.
Tested: Tested w
Create a DBus notification for each LogEntry
For each log entry, a new FilePath DBus object will be created where the FilePath.path value is the location of the JSON LogEntry file.
Tested: Tested with unit tests and locally on a machine.
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: I5999826f7b4447bfca88b83c487d7c03a1c84a08
show more ...
|
7cea1b96 | 14-Jun-2022 |
kasunath <kasunath@google.com> |
Add a class to create FilePath DBus objects
bios-bmc-smm-error-logger creates JSON entries for CPER logs received from BIOS. When a new CPER log is created, fault log service has to be notified.
Th
Add a class to create FilePath DBus objects
bios-bmc-smm-error-logger creates JSON entries for CPER logs received from BIOS. When a new CPER log is created, fault log service has to be notified.
This adds the necessary classes for publishing file paths of the newly created CPER logs to DBus.
Tested: Tested this on a real machine.
Eg DBus objects:
`-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/external_storer `-/xyz/openbmc_project/external_storer/bios_bmc_smm_error_logger `-/xyz/openbmc_project/external_storer/bios_bmc_smm_error_logger/CPER |-/xyz/openbmc_project/external_storer/bios_bmc_smm_error_logger/CPER/entry0 |-/xyz/openbmc_project/external_storer/bios_bmc_smm_error_logger/CPER/entry1
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: I8c35243c949dfdc1254a758136d7a8e204f58bf5
show more ...
|
1a3dc60d | 17-Jun-2022 |
Brandon Kim <brandonkim@google.com> |
main: Integrating the buffer and rde handler
This will loop upon start up of the system and decode any incoming payloads.
Tested: Tested on a real hardware with a real BIOS
Change-Id: Iddbdafbf9a6
main: Integrating the buffer and rde handler
This will loop upon start up of the system and decode any incoming payloads.
Tested: Tested on a real hardware with a real BIOS
Change-Id: Iddbdafbf9a6e94d7a3556335ea59b935e1931c83 Signed-off-by: Brandon Kim <brandonkim@google.com> Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
c49284b6 | 17-Jun-2022 |
Brandon Kim <brandonkim@google.com> |
buffer: Implement "updateBmcFlags"
This function will be used to update the "bmcFlags" member of the buffer header.
Also reinforced the updateReadPtr unit tests to check that the header buffer was
buffer: Implement "updateBmcFlags"
This function will be used to update the "bmcFlags" member of the buffer header.
Also reinforced the updateReadPtr unit tests to check that the header buffer was actually updated by checking the result after.
Tested: Unit tested
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: Iff7a1eea6824b84347e1a6aaed872ed6caa55788
show more ...
|
bac958d4 | 07-Jun-2022 |
kasunath <kasunath@google.com> |
Add a class to handle RDE commands
This class is used to process RDE packets received from BIOS-BMC circular buffer. RdeCommandHandler will manage dictionary data, decode RDE BEJ encoded payloads an
Add a class to handle RDE commands
This class is used to process RDE packets received from BIOS-BMC circular buffer. RdeCommandHandler will manage dictionary data, decode RDE BEJ encoded payloads and push them to the ExternalStorer.
Tested: Tested this with unit tests.
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: Ic66e4e4e2afa523906835713d36015457f324fcc
show more ...
|
4662b1bd | 16-Jun-2022 |
Brandon Kim <brandonkim@google.com> |
buffer: Implement "readErrorLogs"
This is the API that will be called by the main to read all of the error logs. Found a cornercase in wraparoundRead, so added a unit test to guard it as well.
Test
buffer: Implement "readErrorLogs"
This is the API that will be called by the main to read all of the error logs. Found a cornercase in wraparoundRead, so added a unit test to guard it as well.
Tested: Unit tested and tested on a real HW (with the following changes)
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I94cd3a2f53ee7da2c145b751c1c3b5989f4c5b23
show more ...
|
f0e4adc9 | 17-Jun-2022 |
Brandon Kim <brandonkim@google.com> |
buffer: bugfix (v3) fix the checksum
The BIOS is expected to use the XOR checksum which behaves ever so slightly different compared to summing up the bytes (even though bitwise XOR is the same as ad
buffer: bugfix (v3) fix the checksum
The BIOS is expected to use the XOR checksum which behaves ever so slightly different compared to summing up the bytes (even though bitwise XOR is the same as addition).
Fixed the unit test accordingly
Tested: Unit test + tested on a BIOS with real / valid checksummed payload
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I326f814eb66892971ec32f0572618a34825d88b0
show more ...
|