Skip to content

pldm: Enable polling sensors individually#67

Open
spargaon wants to merge 1 commit intointeg_sp8from
fwdevel-185095-review
Open

pldm: Enable polling sensors individually#67
spargaon wants to merge 1 commit intointeg_sp8from
fwdevel-185095-review

Conversation

@spargaon
Copy link
Copy Markdown
Collaborator

Sensors are polling as part of the polling loop in sensor manager. There is no provision to read a sensor individually. Add the provision to read a sensor
using D-Bus infrastructure.

@spargaon
Copy link
Copy Markdown
Collaborator Author

Can poll sensors individually, especially sensor ReadBIOSBoostFMax (sensor id 8) that is not part of polling loop run by sensor manager whereas sensor ReadMaxPackagePowerLimit (sensor id 4) is.

Please refer to:
Section 3.3 of https://amd.atlassian.net/wiki/spaces/ES/pages/982097049/Venice+-+PLDM+Verification

root@congo-0555:/tmp# busctl get-property xyz.openbmc_project.PLDM /xyz/openbmc_project/sensors/frequency/Processor0_ReadBIOSBoostFMax xyz.openbmc_project.Sensor.Value Value
d 0

root@congo-0555:/tmp# busctl get-property xyz.openbmc_project.PLDM /xyz/openbmc_project/sensors/frequency/Processor0_ReadBIOSBoostFMax xyz.openbmc_project.Sensor.Value Value
d 4e+09

root@congo-0555:/tmp# busctl get-property xyz.openbmc_project.PLDM /xyz/openbmc_project/sensors/power/Processor0_ReadMaxPackagePowerLimit xyz.openbmc_project.Sensor.Value Value
d 500

Copy link
Copy Markdown
Collaborator

@mahkurap mahkurap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making the Sensor Reading Value forced everytime - is changing the OpenBMC sensor interface which works on periodic polling, and returning the sensor Value from the cached value.

Instead, I think we should have a different interface/method called "ReadNow". This method will update the cache value.
Pros: Existing OpenBMC sensor cache implementation will not have any impact.
Cons: One additional dbus call to make to update the cache value.

Another alternative:
have the Sync reading only for the sensors that have a corresponding effecter, and do it only in AMD specific compile time flag.

May be we need to take Sreedhar/Supreeth's opinion.

@spargaon
Copy link
Copy Markdown
Collaborator Author

Users will have to distinguish between sensors that are polled and that are not polled, listed on
https://amd.atlassian.net/wiki/spaces/ES/pages/982097049/Venice+-+PLDM+Verification
3.3.1 Sensors that are polled periodically (every 5 seconds)
and
3.3.2 Sensors that are not polled

The new interface should only be used for sensors that are not polled, so uses will have to be aware of the
nature of a sensor, pollable versus non-pollable.

Sensors are polling as part of the polling loop in
sensor manager. There is no provision to read a sensor
individually. Add the provision to read a sensor
using D-Bus infrastructure.

Signed-off-by: Shirish Pargaonkar <Shirish.Pargaonkar@amd.com>
@spargaon spargaon force-pushed the fwdevel-185095-review branch from d482bfd to ed63403 Compare April 27, 2026 22:33
@spargaon
Copy link
Copy Markdown
Collaborator Author

root@congo-0555:~# busctl get-property xyz.openbmc_project.PLDM /xyz/openbmc_project/sensors/power/Processor0_ReadMaxPackagePowerLimit xyz.openbmc_project.Sensor.Value Value
d 500

root@congo-0555:~# busctl get-property xyz.openbmc_project.PLDM /xyz/openbmc_project/sensors/frequency/Processor0_ReadBIOSBoostFMax xyz.openbmc_project.Sensor.Value Value
d 0

root@congo-0555:# busctl get-property xyz.openbmc_project.PLDM /xyz/openbmc_project/sensors/frequency/Processor0_ReadBIOSBoostFMax xyz.openbmc_project.Sensor.Value Value
d 4e+09
root@congo-0555:
#

getSensorReading is invoked only for sensor ReadBIOSBoostFMax (id 8) which is not polled but, the value returned is the fetched from PMFW and cached.
getSensorReading is not invoked for sensor ReadMaxPackagePowerLimit (id 4) is polled, the value returned is the cache value.

<6> Match found: Sensor 256 has corresponding Effecter. Disabling polling.
<6> Get reading for sensor Id: 8
<6> Get reading for sensor Id: 8

@spargaon spargaon requested a review from mahkurap April 27, 2026 22:35
@spargaon
Copy link
Copy Markdown
Collaborator Author

root@congo-0555:~# pldmtool mctpRaw -m 17 -e 1 -d 0x1 0x80 0x2 0x11 0x04 0x00 0x00 0x00
pldmtool: Tx: 01 80 02 11 04 00 00 00
pldmtool: Rx: 00 02 11 00 04 00 00 01 01 01 20 a1 07 00

root@congo-0555:~# pldmtool mctpRaw -m 17 -e 1 -d 0x1 0x80 0x2 0x11 0x08 0x00 0x00 0x00
pldmtool: Tx: 01 80 02 11 08 00 00 00
pldmtool: Rx: 00 02 11 00 04 00 00 01 01 01 a0 0f 00 00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants