commit | 2ca8674346aba04c41c752bc39cd2c431042ad52 | [log] [tgz] |
---|---|---|
author | David Tang <davtang@google.com> | Mon Jul 14 08:47:00 2025 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Jul 14 08:47:55 2025 -0700 |
tree | 58aaf577afde45d43dbc9de8edac9ea230bbd782 | |
parent | 90ac5828fcf9278b9bc0c5eb6bddc659118d330e [diff] |
Add sensor offset and scale parsing and fix sensor reading formula Dbus sensors allows for customizable offset and scale which needs to be supported in tlBMC (https://github.com/openbmc/dbus-sensors/blob/af1724b84b7558037c665d2106ec44d7362aca6b/src/psu/PSUSensorMain.cpp#L695). To support this, the formula for calculating sensor reading for PSUSensors is also corrected to support a custom Scale defined in EM config. This CL accomplishes the following: 1. Add logic to parse Scale and Offset from EM config for PSUSensors 2. Add Scale and Offset (as proto ReadingTransformConfg) to SensorStaticAttributes for debuggability. Adding here allows us to populate these values for sensors in Store query output 3. Correct sensor reading formula from `(value + offset) * scale` to `(value / scale) + offset` for PSUSensor as seen [here](https://github.com/openbmc/dbus-sensors/blob/master/src/psu/PSUSensor.cpp#L238C33-L238C45) 4. Update all unit tests and e2e tests to reflect new changes (note most e2e test reading values change in double precision due to new formula, `hotswap_in` sensor for platform11 had a customized Scale that was previously ignored, this value is now properly calculated) It is noted that other sensors (I2CFan, HwmonTemp, SharedMem) do not currently support a way to customize scale and factor in EM config based on dbus-sensor implementation, so this is not implemented in this change. #tlbmc Tested: see unit tests, on real machine: https://paste.googleplex.com/5482389937324032 PiperOrigin-RevId: 782921389 Change-Id: I166f9c2c1279267e3ab356ebe08ae72a16ac24b8
This project is Google's version of BMCWeb.
See Readme Google for Google added features. The following is the original README of OpenBMC/BMCWeb.
==============================================================================
This component attempts to be a “do everything” embedded webserver for OpenBMC.
The webserver implements a few distinct interfaces:
bmcweb at a protocol level supports http and https. TLS is supported through OpenSSL.
Bmcweb supports multiple authentication protocols:
Each of these types of authentication is able to be enabled or disabled both via runtime policy changes (through the relevant Redfish APIs) or via configure time options. All authentication mechanisms supporting username/password are routed to libpam, to allow for customization in authentication implementations.
All authorization in bmcweb is determined at routing time, and per route, and conform to the Redfish PrivilegeRegistry.
*Note: Non-Redfish functions are mapped to the closest equivalent Redfish privilege level.
bmcweb is configured per the meson build files. Available options are documented in meson_options.txt
meson builddir ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson will automatically download them via its wrap dependencies mentioned in bmcweb/subprojects
.
bmcweb relies on some on-system data for storage of persistent data that is internal to the process. Details on the exact data stored and when it is read/written can seen from the persistent_data
namespace.
When SSL support is enabled and a usable certificate is not found, bmcweb will generate a self-signed a certificate before launching the server. Please see the bmcweb source code for details on the parameters this certificate is built with.
bmcweb is capable of aggregating resources from satellite BMCs. Refer to AGGREGATION.md for more information on how to enable and use this feature.