6e615622 | 21-Jun-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
platform-mc: Support GetPLDMVersion
`GetPLDMCommands` in DSP0240 v1.1.0 requires the PLDM supported type version. In the current implementation, when detecting new MCTP endpoint, `pldmd` always send
platform-mc: Support GetPLDMVersion
`GetPLDMCommands` in DSP0240 v1.1.0 requires the PLDM supported type version. In the current implementation, when detecting new MCTP endpoint, `pldmd` always send `0xff 0xff 0xff 0xff` version to `GetPLDMCommand` in discovery steps with the assumption that the terminus will response for the request with any version of PLDM type.
Some termini don't accept `0xff 0xff 0xff 0xff` as input version to `GetPLDMCommands` command because value `0xff` only has meaning `A value of 0xFF in the "update" field indicates that the field to be ignored.` in the `Section 12.6.1 Version field encoding` in `MCTP Base spec` DSP0236 v1.3.1 but not in `PLDM base spec` DSP0240 v1.1.0 where `GetPLDMCommand` is detailed.
Support sending `GetPLDMVersion` from the supported PLDM types of one terminus in the `discovery step` to get the PLDM version. And use that version as input for `GetPLDMCommands` of that PLDM types to get the supported PLDM commands.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: Ia33c6722603801431e411eaf0647b74d8a1639d8
show more ...
|
6894e90f | 22-Oct-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
platform-mc: Support register OEM CPER Event class(0xFA)
The CPER Event class (0x07) is only introduced in DMTF DSP0248 V1.3.0. Before that spec version, Ampere SoC uses Ampere OEM CPER Event class(
platform-mc: Support register OEM CPER Event class(0xFA)
The CPER Event class (0x07) is only introduced in DMTF DSP0248 V1.3.0. Before that spec version, Ampere SoC uses Ampere OEM CPER Event class(0xFA) to report the CPER event to BMC. Update `platform-mc` code to support registers the OEM CPER Event class.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: Iab2f1e1f7e711ce6072c180ac133a68cb20e40ba
show more ...
|
d197f09e | 06-Nov-2023 |
Chau Ly <chaul@amperecomputing.com> |
platform-mc: Add pldm entity inventory path
This commit exposes inventory path of each sensor to under the entity's inventory path that it belongs to. In each path, the xyz.openbmc_project.Inventory
platform-mc: Add pldm entity inventory path
This commit exposes inventory path of each sensor to under the entity's inventory path that it belongs to. In each path, the xyz.openbmc_project.Inventory.Source.PLDM.Entity interface is implemented with ContainerID, EntityInstanceNumber and EntityType properties.
Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: Icf10349b7d272c6b050259151d71f21efedb0162
show more ...
|
1be20729 | 28-Oct-2024 |
Eric Yang <eric.yang.wiwynn@gmail.com> |
platform-mc: Unmap TID on get PLDM Type failure
Ensure the TID is unmapped when retrieving the PLDM Type and creating a terminus manager for TID failure, preventing the corresponding terminus from f
platform-mc: Unmap TID on get PLDM Type failure
Ensure the TID is unmapped when retrieving the PLDM Type and creating a terminus manager for TID failure, preventing the corresponding terminus from failing to reinitialize.
Change-Id: I15c5981d6813899039d35d9d05b6b873b6118e34 Signed-off-by: Eric Yang <eric.yang.wiwynn@gmail.com>
show more ...
|
f00fd432 | 26-Oct-2024 |
Eric Yang <eric.yang.wiwynn@gmail.com> |
platform-mc: Set initialized true post-init
Ensures TID is only marked initialized after successful getPDRs init, preventing premature initialization flagging even if PLDM_ERROR occurs.
According t
platform-mc: Set initialized true post-init
Ensures TID is only marked initialized after successful getPDRs init, preventing premature initialization flagging even if PLDM_ERROR occurs.
According to DSP0248 V1.3.0, lines 1555 and 1538 The Init Agent will response for Get PRDs and Set Event Receiver so the initialized should be set after those steps.
Change-Id: Ide8d691ae312bcd2dbf061e945f673ef755a5b2b Signed-off-by: Eric Yang <eric.yang.wiwynn@gmail.com>
show more ...
|
dd6f36cb | 22-Oct-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
platform-mc: Correct the discovered terminus condition
When the terminus is discovered, the terminus shared pointer will be added to `termini` list. So `termini[tid]` will not be `nullptr`. Correct
platform-mc: Correct the discovered terminus condition
When the terminus is discovered, the terminus shared pointer will be added to `termini` list. So `termini[tid]` will not be `nullptr`. Correct the discovered terminus condition.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I070e927d34a49d0fdbc02fcd9dbbcd4be2f897a7
show more ...
|
f48015b3 | 20-Nov-2023 |
Dung Cao <dung@os.amperecomputing.com> |
platform-mc: Support pollForPlatFormEventMessage
Supports polling all events synchronously when the terminus sends `pldmMessagePollEvent` with the event id. BMC will use the received event id as inp
platform-mc: Support pollForPlatFormEventMessage
Supports polling all events synchronously when the terminus sends `pldmMessagePollEvent` with the event id. BMC will use the received event id as input for `pollForPlatformEventMessage` command to retrieve the event data.
Change-Id: If01f63f30d3f57f8423c863ec776e83dda8e3042 Signed-off-by: Dung Cao <dung@os.amperecomputing.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
show more ...
|
bd0277e4 | 11-Oct-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
event-manager: Fix handling the event of undiscovered terminus
Currently, there are two event handlers, one from IBM `oem/ibm` and one from `platform-mc` code. The event-manager in `platform-mc` sho
event-manager: Fix handling the event of undiscovered terminus
Currently, there are two event handlers, one from IBM `oem/ibm` and one from `platform-mc` code. The event-manager in `platform-mc` should only handles the event from the discovered termini by `platform-mc` code. Add the valid TID checking before start handling the received events from termini.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: Idcbd33424a82c0cf7c9aebbd132435747534b2f8
show more ...
|
2027ff58 | 03-Oct-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
platform-mc: Init `hysteresis` value for compact numeric sensors
The Compact numeric sensor PDRs do not include `hysteresis` field in the PDRs `Table 103 - Compact Numeric Sensor PDR format` in DSP0
platform-mc: Init `hysteresis` value for compact numeric sensors
The Compact numeric sensor PDRs do not include `hysteresis` field in the PDRs `Table 103 - Compact Numeric Sensor PDR format` in DSP0248 V1.3.0. The `hysteresis` is used for checking the sensor threshold so it should be initialized when constructing the sensors object for compact numeric sensor PDRs.
Tested: 1. Disable `sensorEvent` event handling. 2. Change sensor thresholds use PLDM `SetSensorThresholds` command. 3. Restart `pldmd` service to apply new threshold in sensor D-Bus. 3. When the sensor reading value reaches the threshold condition check the Ipmitool/Redfish SEL log.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I1187c44fc6b9b4b38ef953e72db7d9f96eb7e0bd
show more ...
|
e188b91c | 07-Oct-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Revert "Fix invalid read by adjusting request size"
This reverts commit 35f25949fe4d982f389db6de13c86d5838147399.
The related libpldm commit [1] has also been reverted, as it poses the risk of affe
Revert "Fix invalid read by adjusting request size"
This reverts commit 35f25949fe4d982f389db6de13c86d5838147399.
The related libpldm commit [1] has also been reverted, as it poses the risk of affecting other users of libpldm beyond just pldm. Addressing the issue solely within pldm would only provide a limited fix.
Therefore, we have decided to revert the changes in order to explore a more comprehensive solution within libpldm, ensuring compatibility for all users.
[1] https://gerrit.openbmc.org/c/openbmc/libpldm/+/75123
Change-Id: If4b0f91195f9defe7f015f9e3fb686f33931fa01 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
6d615f1b | 24-Apr-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
platform-mc: sensor: Support none-telemetry base unit
As [1], The sensor D-Bus object path `/xyz/openbmc_project/sensors/` and `xyz.openbmc_project.Sensor.Value` interface are only used for the tele
platform-mc: sensor: Support none-telemetry base unit
As [1], The sensor D-Bus object path `/xyz/openbmc_project/sensors/` and `xyz.openbmc_project.Sensor.Value` interface are only used for the telemetry sensor types which are listed. The non-telemetry PLDM sensor with the `baseUnit` type `count`, `corrected_errors`, `uncorrected_errors` and `oemunit` are none-telemetry types and are not belong to that list. Those unit types are metric types which are count of somethings so the metric D-Bus object path `/xyz/openbmc_project/metric/` and D-Bus `xyz.openbmc_project.Metric.Value` should be used as [2]. Support creating D-Bus object path and polling sensor values for the numeric sensor/compact numeric sensor PDRs with the BaseUnit type is none-telemetry.
[1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/90cfce16584253a5f524c718ce5a6ae7c33f7b8c/yaml/xyz/openbmc_project/Sensor/Value.interface.yaml#L1 [2] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Sensor/Value.interface.yaml
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: Iaf8d842e6ec0cb082b139d15da1a1bd10a701acf
show more ...
|
35f25949 | 04-Oct-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix invalid read by adjusting request size
The recent changes in `libpldm`[1] introduced a modification in the size definitions for PLDM requests. Specifically, the size for `PLDM_SET_EVENT_RECEIVER
Fix invalid read by adjusting request size
The recent changes in `libpldm`[1] introduced a modification in the size definitions for PLDM requests. Specifically, the size for `PLDM_SET_EVENT_RECEIVER_REQ_BYTES` was changed from 5 bytes to 3 bytes, with the addition of a new definition `PLDM_SET_EVENT_RECEIVER_REQ_HEARTBEAT_BYTES` (2 bytes).
Previously, the event manager code used the `PLDM_SET_EVENT_RECEIVER_REQ_BYTES` definition directly, which accounted for 5 bytes. However, after the update in `libpldm`, the test cases began failing when run under Valgrind due to invalid reads, as the total request size was no longer correctly accounted for.
This commit resolves the issue by adjusting the size of the request in the `setEventReceiver` method, using both the `PLDM_SET_EVENT_RECEIVER_REQ_BYTES` and `PLDM_SET_EVENT_RECEIVER_REQ_HEARTBEAT_BYTES` definitions to ensure the proper size is used.
Tested by: ```bash meson test -t 10 -C build --print-errorlogs --wrapper "valgrind --error-exitcode=1" ```
[1]: https://github.com/openbmc/libpldm/commit/8c43abb70aeadde39d99af2c1b6b5d4a1416fc47
Change-Id: Ieb86d764b0c60a79d0a7f0f92f60ddf8812e6e84 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
c3ad6c62 | 07-Nov-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
platform-mc: Set synchrony mode to enableAsyncKeepAlive as default
BMC uses PLDM `EventMessageSupported` command to get `synchronyConfigurationSupported` by terminus as `16.8 EventMessageSupported C
platform-mc: Set synchrony mode to enableAsyncKeepAlive as default
BMC uses PLDM `EventMessageSupported` command to get `synchronyConfigurationSupported` by terminus as `16.8 EventMessageSupported Command` in DSP0248 V1.3.0. When the PLDM terminus does not support this command, BMC will not know the supported `synchronyConfiguration` type.
Change default `synchronyConfigurationSupported` of termini from `disabled` to `enableAsyncKeepAlive`. This allows BMC still logs the events from the terminus whenever it is willing to send the event to BMC.
With this changing, BMC will call PLDM `SetEventReceiver` command to set `synchronyConfiguration` mode of terminus to `enableAsyncKeepAlive` (Asynchronous messaging with heartbeat). The default heartbeat is 120 and can be configured thru `heartbeat-timeout-seconds` option. This allows BMC still logs the events from the terminus whenever it is willing to send the event to BMC.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I0c76e2867800da50ca2b795b022bde223db29f2d
show more ...
|
9fc79128 | 10-Sep-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
platform-mc: Support CPER Event handler
Handle CPER event(0x07) which is defined in `Table 11 - PLDM Event Type` and section `16.17 eventData format for CPEREvent` in DSP0248 v1.3.0.
The code suppo
platform-mc: Support CPER Event handler
Handle CPER event(0x07) which is defined in `Table 11 - PLDM Event Type` and section `16.17 eventData format for CPEREvent` in DSP0248 v1.3.0.
The code supports: 1. Handle the PLDM event which has eventClass as CPEREvent (0x07). 2. Store the CPER data in PLDM CPER event to file at `/var/cper/`. 3. Call `CreateDump` method of `xyz.openbmc_project.Dump.Manager` D-Bus service to create dump fault log. 4. The user can find the dump fault logs in Redfish FaultLog entries thru URL `/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries`. Each CPER entry includes the URL to download the created CPER data file `/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries/<id>/attachment`. 5. The user can use `cper-parser` in `libcper` to parse the CPER data in the attached file.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I85c53933183178c6b5acdfc12c805e8a4cf1ca2a
show more ...
|
22aed8fb | 13-Sep-2024 |
Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com> |
platform-mc: correct the PLDM sensor operational state handling
As we discussed in gerrit 51489 before, we reached consensus for the pldm sensor state as following states:
PLDM_SENSOR_ENABLED
platform-mc: correct the PLDM sensor operational state handling
As we discussed in gerrit 51489 before, we reached consensus for the pldm sensor state as following states:
PLDM_SENSOR_ENABLED : Functional True, Available True PLDM_SENSOR_DISABLED : Functional True, Available False PLDM_SENSOR_UNAVAILABLE : Functional False, Available False PLDM_SENSOR_FAILED : Functional False, Available True PLDM_SENSOR_INITIALIZING : Functional False, Available False
Correct the states handling for PLDM_SENSOR_DISABLED and PLDM_SENSOR_FAILED.
Change-Id: I0cab9ab59a1e9c0f5c6d841c529a64cc4bb8caee Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>
show more ...
|
39a0e71a | 19-Sep-2024 |
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
Change-Id: I10cbc1d55e259c972eac765b28b8c73281b1b42c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
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 ...
|
04ac9971 | 06-Sep-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: Ia7dbb04ead7565d63437a5878fd8a543029d9a93 Signed-off-by: Manojkiran Eda <manojkiran.eda@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 ...
|
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 ...
|
57632095 | 21-Aug-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
platform-mc: Fix `sensorPollingTest` unit-test error
Even the `doSensorPolling` task is scheduled to run after each `SENSOR_POLLING_TIME` milliseconds, it does not mean that the kernel will trigger
platform-mc: Fix `sensorPollingTest` unit-test error
Even the `doSensorPolling` task is scheduled to run after each `SENSOR_POLLING_TIME` milliseconds, it does not mean that the kernel will trigger `doSensorPolling` task at time `t0`, `t0 + SENSOR_POLLING_TIME`, `t0 + 2*SENSOR_POLLING_TIME`, .., `t0 + n*SENSOR_POLLING_TIME` because the kernel can busy so it may trigger the schedule task late. This causes the number of the triggered `doSensorPolling` tasks after `n*SENSOR_POLLING_TIME` milliseconds can be less than `n`. That why the current `sensorPollingTest` unit-test sometime is failed with below errors especially when run the unit-test in slow local machine. ``` Actual function call count doesn't match EXPECT_CALL(sensorManager, doSensorPolling(tid))... Expected: to be called at least 100 times Actual: called 40 times - unsatisfied and active ```
Update the `sensorPollingTest` to check the interval between two triggered times of the `doSensorPolling` tasks instead of number called times. This interval should greater than SENSOR_POLLING_TIME ms.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Signed-off-by: Khang Nguyen <khangng@amperecomputing.com> Change-Id: I33c31ceba76476ae7f9396f2bbf84093fe3f2519
show more ...
|
e2b83747 | 20-Aug-2024 |
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
Change-Id: I39c3e6e2952a119f5179e841084fc31648da3422 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
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 ...
|
f1e32c17 | 12-Aug-2024 |
tal-yac <talycb8@gmail.com> |
platform-mc: Fix sensor aux name pdr parsing
This fixes an issue with counting the null terminator twice: both on the name length and on the pdr pointer increment. This caused to_bytes to throw an e
platform-mc: Fix sensor aux name pdr parsing
This fixes an issue with counting the null terminator twice: both on the name length and on the pdr pointer increment. This caused to_bytes to throw an exception on sensors with composite sensor count larger than 1.
Change-Id: I85c2c12854698402b213fe2dd66a42ac8c299902 Signed-off-by: tal-yac <talycb8@gmail.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
show more ...
|