#
fdf61cc3 |
| 22-Jan-2025 |
Chaul Ly <chaul@amperecomputing.com> |
platform-mc: Defer adding sensor objects from PDRs
After all PDRs retrieved from the other terminus are parsed into pdr structs. They will be processed further to create sensor objects (e.g via `add
platform-mc: Defer adding sensor objects from PDRs
After all PDRs retrieved from the other terminus are parsed into pdr structs. They will be processed further to create sensor objects (e.g via `addNumericSensor` function for Numeric Sensors).
During this phase for one sensor, sensor name is achieved (may enlist Sensor Aux Name PDRs), and NumericSensor object is constructed. Sensor object construction involves parsing pdr struct elements into sensor class variables, D-Bus interface initialization and many calls to set D-Bus object properties.
They are actually not blocking actions, but as it continuously loops through sensor PDRs in `parseTerminusPDRs` to add sensors, they take too much time and prevent BMC from processing events coming from other termini. Not to mention the adding of new sensor types in the future and the increase in sensor numbers, the total time will be large, while this is not a primary task in the initialization phase of a terminus.
This commit defers `addNumericSensor` and `addCompactNumericSensor` calls using sdeventplus::source::Defer event source, instead of continuously calling them while looping through the sensor PDRs, to let events coming from other termini break in and be processed by BMC.
Tested:
While BMC is getting, parsing sensor PDRs and creating sensor objects from those PDRs, events can still be received from the other termini.
Change-Id: I4a3bacd4139b51c302e36614757fa1b5e5105f21 Signed-off-by: Chau Ly <chaul@amperecomputing.com>
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 ...
|
#
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 ...
|