#
b9a39863 |
| 15-Jul-2024 |
George Liu <liuxiwei@ieisystem.com> |
dbus-sdr: Remove unused IPMINetfnSensorCmds
Since IPMINetfnSensorCmds is never used after the declaration, and ipmi::sensor_event in ipmid/api-types.hpp is used uniformly, this commit removes IPMINe
dbus-sdr: Remove unused IPMINetfnSensorCmds
Since IPMINetfnSensorCmds is never used after the declaration, and ipmi::sensor_event in ipmid/api-types.hpp is used uniformly, this commit removes IPMINetfnSensorCmds.
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I59d5c4ef437e47e78371d8606f3399b678e77415
show more ...
|
#
777cfaf2 |
| 13-Jun-2024 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Enable OEM creation of non-Type1 SDRs
Enabling the dbus-sdrs feature is useful for managing Type 1 SDR's using D-Bus. What doesn't work quite as well in the model is creating non-Type 1 records. The
Enable OEM creation of non-Type1 SDRs
Enabling the dbus-sdrs feature is useful for managing Type 1 SDR's using D-Bus. What doesn't work quite as well in the model is creating non-Type 1 records. The current method works alright for Type 11 FRU records. Any other SDR's beyond the FRU are problematic because the code depends on manually defining custom 'if' clauses to compare the incoming SDR ID, and determining what kind of SDR to create. It is a fixed process that is inflexible, and assumes every BMC vendor wants the same SDR arrangement.
This commit creates a model that allows the each OEM to customize creating each SDR using their own algorithm. The OEM creates a sensorcommands_oem.cpp/hpp file containing code for handling the creation of custom SDRs. The code here is compiled and linked based on enabling a Meson build switch.
The code follows the model that was already present in dbus-sdr/sensorcommands.cpp. There are two functions that maintain the original inflexible code, which is now expected to be primarily used as a template for the OEM cpp/hpp contents.
Tested: Created sensorcommands_oem.cpp/hpp files with OEM functionality Enabled the original code, and compiled Used ipmitool sdr dump sdrs.bin in the BMC Console Confirmed the SDRs matched the values prior to this commit. Enabled the OEM code and compiled Used ipmitool sdr dump sdrs.bin in the BMC console Confirmed the contents of the BIN file contained the SDRs generated by the sensorcommands_oem.cpp source.
Change-Id: I100e747b52677be53b499713d51c6c1126411570 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
#
b1416efa |
| 02-Aug-2023 |
Thang Tran <thuutran@amperecomputing.com> |
dbus-sdr: check instance start value in getSensorInfo function
Issue: When users request to read DCMI sensor information via "ipmitool raw 0x2c 0x07 0xdc 0x01 0x07 0x00 <Instance_start>", the return
dbus-sdr: check instance start value in getSensorInfo function
Issue: When users request to read DCMI sensor information via "ipmitool raw 0x2c 0x07 0xdc 0x01 0x07 0x00 <Instance_start>", the return values always are 8 first sensors even the "Instance_start" is not 0.
Root cause: In the getSensorInfo function, it does not check the instance start parameter. It always returns 8 first sensors.
Solution: Update the getSensorInfo function as below: - Get the list of Sensors based on the Entity ID. - Sort the list of Sensors. - Compare Sensor's Entity Instance with Instance start parameter
Tested: 1. Get the list of DCMI sensors information with Instance start is not 0 "ipmitool raw 0x2c 0x07 0xdc 0x01 0x07 0x00 <Ins_Start>" 2. BMC returns sensor Record ID which have the Entity Instance are greater than Instance start.
Change-Id: I10f7cf4e87cb5eb8fe1da81561263e1604418c45 Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
show more ...
|
#
fbc6c9d7 |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I44441096113929ce96eb1439e2932e6ff3c87f27 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
6619ae46 |
| 06-Aug-2021 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Improve SDR sensor number mapping for sensor nums above 510
The recent submission to support SDR records defining Type 01 records for sensors did not work when the system had more than 510 sensors.
Improve SDR sensor number mapping for sensor nums above 510
The recent submission to support SDR records defining Type 01 records for sensors did not work when the system had more than 510 sensors. A recent change supplied a system that enumerated more sensors then IPMI can support. The change highlighted an error in how the Type 01 records were built.
This commit handles systems with a larger set of sensors. The code for handling SDR # 511 correctly creates sensor number 768. It then fills sensors to the limit of LUN 3.
Tested: A SUT that supplied 1946 sensors was used to implement and test the code. Test cases: "ipmitool sdr elist" returns 765 sensors "ipmitool sensor list" returns 765 sensors "ipmitool -l <lun> raw 4 0x2d <sn>" performed the correct behavior for luns 0-3, sensor numbers 0, 254, 255.
Ported From: https://gerrit.openbmc-project.xyz/c/openbmc/intel-ipmi-oem/+/45744
Change-Id: I8e5160c93e79a366b897554efdd60e2edcd3594a Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com> Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
e39d4d84 |
| 16-Apr-2021 |
Hao Jiang <jianghao@google.com> |
dbus-sdr: Make GetSDR more robust against dbus failure.
SDR list should be persistent while occasional SDR reading error due to underlayer dbus failure. The improvement consists of the following asp
dbus-sdr: Make GetSDR more robust against dbus failure.
SDR list should be persistent while occasional SDR reading error due to underlayer dbus failure. The improvement consists of the following aspects: 1. SDR type is merely determined by sensorTree(from ObjectMapper), whose mechanism is the same as SDR index. 2. Alway return next sdr id even when failure. 3. Avoid unnecessary dbus call when IPMI host doesn't requires the SDR body.
Signed-off-by: Hao Jiang <jianghao@google.com> Change-Id: If7d7bbb6db587c727f6ea5bcb7a7984f1ed47a80 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
a8b5b26d |
| 06-Feb-2021 |
Kuiying Wang <kuiying.wang@intel.com> |
dbus-sdr: Fix sensor missing issue.
There is issue for "BMC randomly unable to get sensor readings". When invoking "ipmitool sdr" from Linux OS (host), it only returns three sensors like following p
dbus-sdr: Fix sensor missing issue.
There is issue for "BMC randomly unable to get sensor readings". When invoking "ipmitool sdr" from Linux OS (host), it only returns three sensors like following partial records: [root@localhost ~]# ipmitool sdr CPU Power | 0 Watts | ok Memory Power | 0 Watts | ok Total Power | 0 Watts | ok [root@localhost ~]#
There 2 caches sensorTree and sensorDataRecords. When sensorDataRecords cache and sensorTree cache is not sync, which causes this issue, like sensorTree cache has 10 sensors but there are just 5 sensors in sensorDataRecords cache. Most important sensorDataRecords cache is not necessary, ipmiStorageGetSDR could get data from dbus directly and no any performance impact.
Using sensorMapUpdatePeriod(10s) but not sensorMapSdrUpdatePeriod(60s), 60 seconds are too long to answer user with some SDR content at the first time of BMC bootup.
Tested: All sensors could be listed even at booting phase. Could print correct sensor set along with the boot progress.
root@intel-obmc:~# ipmitool sdr CPU Power | 202 Watts | ok Memory Power | 0 Watts | ok Total Power | 312 Watts | ok root@intel-obmc:~# ipmitool sdr System Airflow | 14 unspecified | ok PSU1 In Current | 1.18 Amps | ok PSU1 Out Current | 20.80 Amps | ok PSU2 In Current | 0 Amps | ok PSU2 Out Current | no reading | ns Pwm 1 | 29.79 unspecifi | ok Pwm 2 | 29.79 unspecifi | ok Pwm 3 | 29.79 unspecifi | ok Pwm 4 | 29.79 unspecifi | ok Pwm 5 | 29.79 unspecifi | ok Pwm 6 | 29.79 unspecifi | ok Pwm 13 | 29.79 unspecifi | ok Pwm 14 | 29.79 unspecifi | ok Pwm 15 | 29.79 unspecifi | ok Pwm 16 | 29.79 unspecifi | ok Pwm PSU1 Fan 1 | 39.98 unspecifi | ok Pwm PSU1 Fan 2 | 39.98 unspecifi | ok ............. PVCCD HV CPU1 | 1.18 Volts | ok PVCCFA EHV FIVRA | 1.16 Volts | ok PVCCINFAON CPU1 | 1.11 Volts | ok PVCCIN CPU1 | 1.68 Volts | ok PVNN PCH AUX | 1.03 Volts | ok root@intel-obmc:~#
Ported from: https://gerrit.openbmc-project.xyz/c/openbmc/intel-ipmi-oem/+/40362
Changes made: - Removed intel specific changes like nmDiscoveryIndex or ipmi::storage::nmDiscoverySDRCount
Change-Id: I729d9bcbf91f0e96c62fb5f5ebe0240a0eaa47df Signed-off-by: Kuiying Wang <kuiying.wang@intel.com> Signed-off-by: Helen Huang <he.huang@linux.intel.com> Signed-off-by: Kuiying Wang <kuiying.wang@intel.com> Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
de54f486 |
| 26-Jan-2021 |
Willy Tu <wltu@google.com> |
dbus-sdr: Initial Dynamic Sensor Stack
Migrate intel-ipmi-oem dynamic sensor stack into phosphor-host-ipmid for more general use.
The files are copied from https://gerrit.openbmc-project.xyz/c/open
dbus-sdr: Initial Dynamic Sensor Stack
Migrate intel-ipmi-oem dynamic sensor stack into phosphor-host-ipmid for more general use.
The files are copied from https://gerrit.openbmc-project.xyz/c/openbmc/intel-ipmi-oem/+/39743
https://gerrit.openbmc-project.xyz/plugins/gitiles/openbmc/intel-ipmi-oem/+/b910987a7d832e38e9342f0946aeb555a48f9cb0
Created `libdynamiccmds` to enable dynamic sensor stack.
Minor changes in the migration include:
1, Removing the use of `commandutils.hpp` in all files since it is only used for ``` static constexpr bool debug = false; ``` It is added to `sdrutils.hpp` instead.
2, Update lastWriteAddr to size_t to match the vector.size() type during comparison.
3, Renamed the sensorcommand unit test to sensorcommands_unitest.cpp
4, Removed unused variables. - sensorcommands ``` constexpr uint8_t thresholdMask = 0xFF; ``` - sensorcommands_unitest ``` double yError = std::abs(y - yRoundtrip); ``` 5, Removed Intel Specific Changes - Redfish logs - node manager/ME - BIOS to SEL event 6, Removed externing a global variable for sensorTree. - Replaced it with a method that returns a singleton - auto& sensorTree = getSensorTree(); for access 7, Replaced intel_oem namespace with dynamic_sensors
8, Removed types.hpp and use `ipmid/types.hpp` directly - Updated the types to match ipmid/types - Added Association and std::vector<Association>> under Value.
9, Add cpp files for sdrutils and sensorutils.
10, link libipmid as it is required for getManagedObjects needed by sensorcommands.cpp
Signed-off-by: Willy Tu <wltu@google.com> Change-Id: If944620c895ecf4c9f4c3efe72479f4de276f4fb Signed-off-by: Vijay Khemka <vijaykhemkalinux@gmail.com>
show more ...
|