77e6fe7a | 06-Aug-2024 |
Gilbert Chen <gilbertc@nvidia.com> |
platform-mc: Added EventManager
Added eventManager to handle sensor event class(00h) which is defined in table 11 of DSP0248 v1.3.0. In this commit, the eventManager supports to receive event asynch
platform-mc: Added EventManager
Added eventManager to handle sensor event class(00h) which is defined in table 11 of DSP0248 v1.3.0. In this commit, the eventManager supports to receive event asynchronously. The commit will also log the Ipmitool SEL log and Redfish log for PLDM sensor event messages.
Change-Id: I1b337ccae454067841ffbbd8754631216a995542 Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Signed-off-by: Gilbert Chen <gilbertc@nvidia.com>
show more ...
|
a31ceb91 | 21-Jul-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
oem_ibm: Add Slot enable infrastructure in BMC
With this commit PDRs are created for each of these PCIe slots and adapters which have a corresponding entry in the entity associate map. The sensor/ef
oem_ibm: Add Slot enable infrastructure in BMC
With this commit PDRs are created for each of these PCIe slots and adapters which have a corresponding entry in the entity associate map. The sensor/effector states are monitored and accordingly D-Bus calls are sent for enabling a slot, process property change of a PCIe slot, etc.
Tested By: SIMICS power on/off and reset reload.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I51b79b75c909ddf2cc29872fec6aa01c2d56b418
show more ...
|
b3b84b49 | 23-Aug-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable modernize-deprecated-headers check
Some headers from C library were deprecated in C++ and are no longer welcome in C++ codebases. Some have no effect in C++ [1].
[1]: https://rel
clang-tidy: Enable modernize-deprecated-headers check
Some headers from C library were deprecated in C++ and are no longer welcome in C++ codebases. Some have no effect in C++ [1].
[1]: https://releases.llvm.org/13.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-deprecated-headers.html
Change-Id: Ia3b1df10175e2e661c8fffb82e357c9db81b2e9c Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
51d66b59 | 06-Aug-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
platform-mc: Set the local terminus as event receiver
Send `SetEventReceiver` to the discoveried terminus with the configurable local EID to set the local terminus as event receiver. Before send `Se
platform-mc: Set the local terminus as event receiver
Send `SetEventReceiver` to the discoveried terminus with the configurable local EID to set the local terminus as event receiver. Before send `SetEventReceiver` the local terminus also send `EventMessageSupported` to get the `synchronyConfigurationSupported`. The `eventMessageGlobalEnable` and `heartbeatTimer` options in the `SetEventReceiver` command will depend on the responded `synchronyConfigurationSupported`.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Signed-off-by: Gilbert Chen <gilbertc@nvidia.com> Change-Id: Ia798c1cd5d946ac519933bca60620e970fe10b0a
show more ...
|
5d86cdfb | 20-Aug-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable bugprone-string-literal-with-embedded-nul check
This check finds occurrences of string literal with embedded NUL character and validates their usage. The check is ignored on the l
clang-tidy: Enable bugprone-string-literal-with-embedded-nul check
This check finds occurrences of string literal with embedded NUL character and validates their usage. The check is ignored on the line because the test case has a requirement to verify if the NUL terminator is removed or not by the method.
Change-Id: I919bfed7d9c0b3a43933621bda32cd31c876ff02 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
a34a64bb | 30-Mar-2022 |
Thu Nguyen <thu@os.amperecomputing.com> |
Support numeric effecters in dbus-to-host-effecter
Adds support of the numeric effecter PDR (section `28.11 Numeric Effecter PDR` DSP0248 V1.3.0) type in dbus-to-host-effecter handler. This handler
Support numeric effecters in dbus-to-host-effecter
Adds support of the numeric effecter PDR (section `28.11 Numeric Effecter PDR` DSP0248 V1.3.0) type in dbus-to-host-effecter handler. This handler will be applied for all PLDM termini but not only host. The setting for one numeric effecter of one device can be: { "mctp_eid": 20, "effecter_info": { "effecterPdrType": 9, "effecterID": 2, "entityType": 32903, "entityInstance": 2, "containerID": 2, "compositeEffecterCount": 1, "checkHostState": false }, "effecters": [ { "dbus_info": { "object_path": "/xyz/openbmc_project/sensors/power/A", "interface": "xyz.openbmc_project.Sensor.Value", "property_name": "Value", "property_type": "double" }, "effecterDataSize": 5, "resolution": 1, "offset": 0, "unitModifier": 0 } ] }
Where: + effecterPdrType to difference state/numeric effecter type. Default is state effecter. + effecterID should be effecter ID and should not empty. + checkHostState can be set to false to bypass checking host state. + effecterDataSize, resolution, offset, unitModifier are from numeric effecter PDR (section `28.11 Numeric Effecter PDR` DSP0248 V1.3.0)
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I438d7f204643edd4066e8a6ba28d53a97503fc4b
show more ...
|
3012b632 | 22-Aug-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Format meson files with meson.format
Meson 1.5.0 introduced a new feature to format all the meson files. Formatting all the meson files is now as simple as running `meson format -i -r` command in th
Format meson files with meson.format
Meson 1.5.0 introduced a new feature to format all the meson files. Formatting all the meson files is now as simple as running `meson format -i -r` command in the repository root folder.
more details : https://mesonbuild.com/Commands.html#format
Change-Id: I9c5468cc502ae78b7a055e2de2a10296930cb9ec Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
eac61a4b | 23-Feb-2022 |
Gilbert Chen <gilbert.chen@arm.com> |
platform-mc: Add sensor manager
Added sensor_manager class. The sensor_manager class manages the timing of sensor polling.
tested: Verified on ast2600 EVB which is connected to a PLDM device over I
platform-mc: Add sensor manager
Added sensor_manager class. The sensor_manager class manages the timing of sensor polling.
tested: Verified on ast2600 EVB which is connected to a PLDM device over I2C. bmcweb can display the state of numeric sensor.
Signed-off-by: Gilbert Chen <gilbert.chen@arm.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I4257f823ea26d7fdb322cc82d847e94db056258c
show more ...
|
16c2a0a0 | 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: I8c84201cb2343a8c8a5507a49de0721a1bee7063 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
5a945bd1 | 01-Aug-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
pldm: Move off pldm_pdr_add_check()
Generated with:
``` $ CLANG_VERSION=18 ./subprojects/libpldm/scripts/apply-renames ./subprojects/libpldm/evolutions/current/pldm_pdr_add_check.yaml ```
Change-I
pldm: Move off pldm_pdr_add_check()
Generated with:
``` $ CLANG_VERSION=18 ./subprojects/libpldm/scripts/apply-renames ./subprojects/libpldm/evolutions/current/pldm_pdr_add_check.yaml ```
Change-Id: I4982195e97c25567b35f77ee7dcf795629d259b4 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
b8cf46b8 | 14-Jun-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
platform-mc: Terminus name handling
`PLDM-stack: Adding sensor monitoring section` design spec details that the `Terminus name` is required to create the terminus's sensors, states, effecters... D-B
platform-mc: Terminus name handling
`PLDM-stack: Adding sensor monitoring section` design spec details that the `Terminus name` is required to create the terminus's sensors, states, effecters... D-Bus interfaces and `Terminus Name` can be encoded in the Terminus's `Entity Auxiliary Names PDR` or in the MCTP Entity-manager endpoint EID configuration file. [1] https://gerrit.openbmc.org/c/openbmc/docs/+/47252/34/designs/pldm-stack.md#433
Section `28.18 Entity Auxiliary Names PDR` in DSP0248 V1.2.2 details about the PDRs response for the name of one PLDM entity. When the containerID is `0x0000` this entity is `Overall system` or `top most containing entity`. The name of this entity will can be used as `Terminus name`.
Support parsing `Entity Auxiliary Names PDR` and find the `Terminus name` if it is reponsed in the terminus' PDRs. `Terminus Name` string will be assigned to local variable and can be used as prefix for sensors, state, effecters... names.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I701537c48651b9de86de77941b752e30de112916
show more ...
|
de2a132a | 24-May-2022 |
Gilbert Chen <gilbert.chen@arm.com> |
platform-mc: PDR handling
Get PDRs of new terminus if it supports GetPDR PLDM command. It doesn't handle the event receiver related initialization steps, and either doesn't support primary PDR repos
platform-mc: PDR handling
Get PDRs of new terminus if it supports GetPDR PLDM command. It doesn't handle the event receiver related initialization steps, and either doesn't support primary PDR repository to maintain terminus locator PDR information yet. Added parse PDR member functions to terminus class for parsing Numeric sensor PDR and sensor auxiliary names PDR. Added sensor auxiliary names PDR and numeric sensor PDR struct in libpldm/platform.h
Signed-off-by: Gilbert Chen <gilbert.chen@arm.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I30a0cc594a3c08fc17f2dad861b5c5d41c80ebdd
show more ...
|
079e7769 | 21-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: I16082f7e664541e98fa1cae2b2bcce59dd9cb250 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
3d3e8184 | 19-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
common: test: Add gmock dependency to generated targets
Fixes the following error when building with gmock supplied by subproject:
``` FAILED: common/test/pldm_utils_test.p/pldm_utils_test.cpp.o cc
common: test: Add gmock dependency to generated targets
Fixes the following error when building with gmock supplied by subproject:
``` FAILED: common/test/pldm_utils_test.p/pldm_utils_test.cpp.o ccache c++ -Icommon/test/pldm_utils_test.p -I../subprojects/googletest/googletest/include -I../subprojects/googletest/googletest -Isubprojects/googletest/__CMake_build -I../subprojects/googletest/__CMake_build -Isubprojects/googletest -I../subprojects/googletest -Isubprojects/phosphor-dbus-interfaces/gen -I../subprojects/phosphor-dbus-interfaces/gen -I../subprojects/sdbusplus/include -Isubprojects/phosphor-logging/lib/include -I../subprojects/phosphor-logging/lib/include -I. -I.. -I/usr/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c++23 -O2 -g -Wno-psabi -DLIBPLDMRESPONDER -DOEM_IBM -include /home/andrew/src/openbmc.org/openbmc/pldm/build/config.h -DBOOST_ASIO_DISABLE_THREADS -DBOOST_ALL_NO_LIB -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_COROUTINES_NO_DEPRECATION_WARNING -pthread -isystem../subprojects/nlohmann_json/single_include -isystem../subprojects/libpldm/include -isystemsubprojects/libpldm/include -isystem../subprojects/googletest/googletest -isystem../subprojects/googletest/googletest/include -MD -MQ common/test/pldm_utils_test.p/pldm_utils_test.cpp.o -MF common/test/pldm_utils_test.p/pldm_utils_test.cpp.o.d -o common/test/pldm_utils_test.p/pldm_utils_test.cpp.o -c ../common/test/pldm_utils_test.cpp In file included from ../common/test/pldm_utils_test.cpp:2: ../common/test/mocked_utils.hpp:3:10: fatal error: gmock/gmock.h: No such file or directory 3 | #include <gmock/gmock.h> | ^~~~~~~~~~~~~~~ compilation terminated. ```
Change-Id: I56cedd3df2d07f850fc0d13599ed52f99981e35b Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
6c7fed4c | 22-Feb-2022 |
Gilbert Chen <gilbert.chen@arm.com> |
platform-mc: Added Terminus/TerminusManager class
Added requester::sendRecvPldmMsg awaiter type to be able to send and receive PLDM message by coroutine. Added TerminusManager to discover terminus f
platform-mc: Added Terminus/TerminusManager class
Added requester::sendRecvPldmMsg awaiter type to be able to send and receive PLDM message by coroutine. Added TerminusManager to discover terminus from EID list updated by MCTPDiscovery class. The TerminusManager will initialize TID.
Signed-off-by: Gilbert Chen <gilbert.chen@arm.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: Ifa5bdfff50648f1d7fba8710e160de662e8f9e06
show more ...
|
7d427f16 | 16-May-2024 |
Kamalkumar Patel <kamalkumar.patel@ibm.com> |
pldm: Rearranging datatype declaration
This commit adds support to eliminating duplication of datatypes which enhancing clarity and manageability throughout the pldm repository. This is rearrangemen
pldm: Rearranging datatype declaration
This commit adds support to eliminating duplication of datatypes which enhancing clarity and manageability throughout the pldm repository. This is rearrangement of declaration of data types so it can be used host-bmc and oem layer both the places.
Change-Id: Ieb1232884b8e2128e8bf97dafd01e4ad5524ede0 Signed-off-by: Kamalkumar Patel <kamalkumar.patel@ibm.com>
show more ...
|
2576aecd | 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: I539a0c5baa63be240fc1c76367c0af338dd89c7b Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
516122e0 | 07-May-2024 |
Kamalkumar Patel <kamalkumar.patel@ibm.com> |
Add Json Config support for entity to DBus string
The entity map comprises both entity types and their corresponding names, essential for generating unique D-Bus paths for each entity. However, chal
Add Json Config support for entity to DBus string
The entity map comprises both entity types and their corresponding names, essential for generating unique D-Bus paths for each entity. However, challenges arise due to variations in path generation across companies, often dictated by differing entity types. To address this, enabling configurability of EntityID becomes imperative, empowering communities to tailor configurations to their specific use cases.
Testing: Unit tests passed
Change-Id: I3981fde64bd00940caa5067a9472fd948e74cbf0 Signed-off-by: Kamalkumar Patel <kamalkumar.patel@ibm.com>
show more ...
|
4e69d252 | 10-May-2024 |
Kamalkumar Patel <kamalkumar.patel@ibm.com> |
host-bmc: refine remote terminus functionality
This commit introduces support for migrating remote terminus-related functionalities into the host-bmc directory, a move aimed at optimizing remote ter
host-bmc: refine remote terminus functionality
This commit introduces support for migrating remote terminus-related functionalities into the host-bmc directory, a move aimed at optimizing remote terminus operations for future endeavors. By consolidating these functionalities, tracking and implementing future enhancements become more streamlined and manageable.
Change-Id: I52b6ced7acacb004b6055ae710193a959d986659 Signed-off-by: Kamalkumar Patel <kamalkumar.patel@ibm.com>
show more ...
|
76f2c60a | 28-Mar-2024 |
Riya Dixit <riyadixitagra@gmail.com> |
common & fw-update: Improving Logs (lg2)
This commit corrects the severity level of logs and also formats the message string, fixing the ill-defined message string of the logs as mentioned in the an
common & fw-update: Improving Logs (lg2)
This commit corrects the severity level of logs and also formats the message string, fixing the ill-defined message string of the logs as mentioned in the anti-pattern document [1]. Additionally, based on the requirement this commit adds more debug information to logs.
[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#ill-defined-data-structuring-in-lg2-message-strings
Change-Id: I1481c025b6dc6a9200a13de38a4fe55b81bb25ea Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>
show more ...
|
2ec8269f | 29-Apr-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
Add getSubtreePaths utility functions
Added a getSubTreePaths utility function that can return the subtree dbus paths that implement the particular dbus interface.
Change-Id: Ifb8f6d571bcb2291ca3a4
Add getSubtreePaths utility functions
Added a getSubTreePaths utility function that can return the subtree dbus paths that implement the particular dbus interface.
Change-Id: Ifb8f6d571bcb2291ca3a47f285ebf46261646496 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
44524a5f | 14-Feb-2022 |
Gilbert Chen <gilbert.chen@arm.com> |
requester: Modified MctpDiscovery class
Modified MctpDiscovery class to take list of managers instead of single fwManager. The change is for adding platform-mc manager. Added loadStaticEndpoints API
requester: Modified MctpDiscovery class
Modified MctpDiscovery class to take list of managers instead of single fwManager. The change is for adding platform-mc manager. Added loadStaticEndpoints API for MCTP layer which doesn't implement /xyz/openbmc_project/MCTP/Endpoint.Interface
The patch is part of implementation of design document below. https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/47252
Signed-off-by: Gilbert Chen <gilbert.chen@arm.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I1e1673504583a87f2a9bc3adf76fb49c2dc30254
show more ...
|
09a89821 | 24-Apr-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
common: modernize getCurrentSystemTime() API
Leverage `std::format` from c++20, which provides a more concise and readable way to format strings compared to `std::stringstream`. Also use zoned time
common: modernize getCurrentSystemTime() API
Leverage `std::format` from c++20, which provides a more concise and readable way to format strings compared to `std::stringstream`. Also use zoned time from c++20 chrono, which makes the API to handle different time zones if needed & is more accurate.
Tested : Before the fix the API returns: 2024-04-24 UTC 05:19:00.533100 With this patch the API returns: 2024-04-24 UTC 05:19:00.533266342
Change-Id: Ida3ae3bdd8901422303a1812a30346d19f6bb5cb Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
ace4e14d | 24-Apr-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Deprecate the support for x86 sdk
OpenBMC as a project has moved away from using yocto x86 sdks for unit testing. Instead now the preferred way to build and test code is by two ways:
1. Leveraging
Deprecate the support for x86 sdk
OpenBMC as a project has moved away from using yocto x86 sdks for unit testing. Instead now the preferred way to build and test code is by two ways:
1. Leveraging the meson subproject support 2. Using openbmc docker container
Since x86 sdks needed some weird hacks in the code base like figuring out the linker arguments ourselves & running custom bash commands from the meson build files. Also with changing yocto code base, its a large maintainer burden to make sure this support works.
Tested: Code builds & unit tests are passed with both the approaches mentioned above.
Change-Id: Iaf55e2c003ffd9ee1a295de5bdfd14d81222e94b Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
cd4cd457 | 22-Apr-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
common: Improve printBuffer() & added unit tests
This patchset is improved version of the existing code for several reasons:
1.The code is more concise and easier to read. It uses modern C++ featur
common: Improve printBuffer() & added unit tests
This patchset is improved version of the existing code for several reasons:
1.The code is more concise and easier to read. It uses modern C++ features such as `std::ranges::for_each` and `std::format`, which express the intent of the code more clearly compared to the nested if-else statements and manual formatting.
2.The code now has fewer lines of code and avoids the need for creating and managing an `std::ostringstream` object manually, which simplifies the function and reduces the risk of errors.
3.This patch uses type-safe range-based for loop and `uint8_t` type directly, whereas the existing code uses `int` for iterating over the buffer elements, which may lead to unintentional type conversions or loss of precision.
4.While the performance impact may not be significant for this patch, using `std::ranges::for_each` with lambdas might allow for more optimization opportunities by the compiler compared to the traditional loop used in existing code.
Overall, this patchset leverages modern C++ features to achieve the same functionality in a more concise, readable, and type-safe manner, making it preferable.
Change-Id: I7be547ade053638cb4ca459ee795195f6f0883bf Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|