commit | 90eb7876b46a361af3b36c09df574178ecc9c39a | [log] [tgz] |
---|---|---|
author | Alex Schendel <alex.schendel@intel.com> | Thu Sep 01 11:56:52 2022 -0700 |
committer | Alex Schendel <alex.schendel@intel.com> | Thu Sep 29 18:13:41 2022 -0700 |
tree | a3317ce30699cb2307b5c40158b85e971f3142b7 | |
parent | 9d2894d9b74965f5da02b7784f270bc6ae67e3f2 [diff] |
Fix Get and Set SM Signal Fan PWM Command The Get SM Signal and Set SM Signal IPMI commands function under the assumption that there is a 1:1 relationship between the fan Pulse Width Modulator (PWM), and the fan tachometer. Not all hardware follows this model. The code changes in this commit updates these IPMI commands to handle the introduction of HW that uses one PWM output to control two fans. For systems that have a 1:1 PWM/Tachometer relationship, this code improves upon the original "signal instance" lookup. The "signal instance" now specifies a "fan number". Systems may not have a linear relationship between "fan header numbers" and the PWM that controls the fan on that header. Prior to this commit the "signal instance" had to be the PWM number. Now the Get/Set commands associate a linear fan number to the respective PWM. Systems that use one PWM to control multiple fans, and by extension multiple tachometers use a secondary lookup to determine the fan to modify/read. The JSON file describing the fan PWM/tachometer is updated to add a "PWMName" record. The instance number is combined with the PWMName entry to identify the correct HW to read/modify. The PWMName entry in the JSON file nomenclature defines two fans (i.e. "PWMName:" "Pwm_3_4"), which are associated to a PWM, (i.e. "Pwm": 1). Tested: On system with default PWM name: IPMI command: ipmitool raw 0x30 0x14 0x0d 6 0x00 # read fan 7 pwm 32 ipmitool raw 0x30 0x15 0x05 6 0x1 0x48 # set fan 7 pwm (72%) ipmitool raw 0x30 0x14 0x0d 6 0x00 # read fan 7 pwm 48 root@intel-obmc:~# busctl get-property xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/chassis/Fan_7 xyz.openbmc_project.Configuration.AspeedFan.Connector Pwm t 12 (In this system, Fan 7 is connected to PWM 12) Dbus tree showing default name: busctl tree xyz.openbmc_project.FanSensor `-/xyz/openbmc_project/sensors |-/xyz/openbmc_project/sensors/fan_pwm | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_1 | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_13 | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_14 | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_15 | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_16 | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_2 | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_3 | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_4 | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_5 | `-/xyz/openbmc_project/sensors/fan_pwm/Pwm_6 On system with non-default PWM name: IPMI command: ipmitool raw 0x30 0x14 0x0d 1 0x00 # read fan 2 pwm 64 ipmitool raw 0x30 0x15 0x05 0 0x1 0x48 # set fan 2 pwm ipmitool raw 0x30 0x14 0x0d 0 0x00 # read fan 1 pwm 48 # shared with fan 2 Dbus tree showing non-default PWM name: busctl tree xyz.openbmc_project.FanSensor `-/xyz/openbmc_project/sensors |-/xyz/openbmc_project/sensors/fan_pwm | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_11_12 | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_1_2 | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_3_4 | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_5_6 | |-/xyz/openbmc_project/sensors/fan_pwm/Pwm_7_8 | `-/xyz/openbmc_project/sensors/fan_pwm/Pwm_9_10 Change-Id: I9a40256ed892170f8ba88a3a617b5a2e11693c9f Signed-off-by: Alex Schendel <alex.schendel@intel.com>
This component is intended to provide Intel-specific IPMI[3]
command handlers for OpenBMC. These handlers are intended to integrate BMC with servers based on Intel architecture.
intel-ipmi-oem
serves as an extension[1]
to OpenBMC IPMI daemon[2]
. It is compiled as a shared library and intended to both:
Related features provided by the library are grouped in separate source files. Main extensions to vanilla OpenBMC IPMI stack are the following:
[4]