History log of /openbmc/pldm/platform-mc/numeric_sensor.cpp (Results 1 – 10 of 10)
Revision Date Author Comments
# 0469b568 06-Jan-2025 Ed Tanous <etanous@nvidia.com>

Replace all isnan calls with isfinite

In most of the numeric sensor code, the code uses isnan as an analog for
"Can be used sanely in a math equation" Unfortunately, isnan will
return false for thi

Replace all isnan calls with isfinite

In most of the numeric sensor code, the code uses isnan as an analog for
"Can be used sanely in a math equation" Unfortunately, isnan will
return false for things like infinity, negative infinity, large values,
etc that aren't usable in math, but are not nan.

This commit replaces all calls in the codebase from isnan to isfinite[1]

Testing: Need help here from maintainers to understand what they'd like
to see in terms of tests. This is a pretty isolated and mechanical
change.

[1] https://en.cppreference.com/w/cpp/numeric/math/isfinite

Change-Id: I4995ea319c058869c3f7d010ae8b5a08c68b10e5
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# a1871174 19-Dec-2024 Amithash Prasad <amithash@meta.com>

platform-mc: Refactor units and range field PDR decode

The conversion based on range_field_format and sensor_data_size
was duplicated across each of the fields. This change adds
helper functions and

platform-mc: Refactor units and range field PDR decode

The conversion based on range_field_format and sensor_data_size
was duplicated across each of the fields. This change adds
helper functions and thus helping with reducing some of the
duplicated code.

Change-Id: I70a5477d6743b250aea55249ccb27d2459f044e5
Signed-off-by: Amithash Prasad <amithash@meta.com>

show more ...


# 9825660e 19-Dec-2024 Amithash Prasad <amithash@meta.com>

platform-mc: Refactor unit conversion out of constructor

This is a mostly non-functional refactor which moves code
duplicated across the two constructors to a common private
method which can be used

platform-mc: Refactor unit conversion out of constructor

This is a mostly non-functional refactor which moves code
duplicated across the two constructors to a common private
method which can be used by the constructors.

A minor side-effect introduced here is adding a new
sensorUnit member which could be used in the future.

Change-Id: I62ad69f843f1283a0695ff2ace814e454851fcf7
Signed-off-by: Amithash Prasad <amithash@meta.com>

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 ...


# 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 ...


# 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 ...


# 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 ...


# 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 ...


# 3c5486d4 01-Aug-2024 Thu Nguyen <thu@os.amperecomputing.com>

platform-mc: Create Numeric sensor D-Bus object

Added numeric_sensor class. The NumericSensor class will create the
Numeric sensor D-Bus object. The class also handles sensor status and
exports its

platform-mc: Create Numeric sensor D-Bus object

Added numeric_sensor class. The NumericSensor class will create the
Numeric sensor D-Bus object. The class also handles sensor status and
exports its status to D-Bus interfaces.

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: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I1c7de2e74100ed787ed2119896d3c5b36098dd96

show more ...