xref: /openbmc/phosphor-pid-control/ipmi.md (revision 323f1d9c)
1# OEM-IPMI Commands to talk to Phosphor-pid-control
2
3## IPMI Command Specification
4
5The host needs the ability to send to the BMC, the margin information on the
6devices that it knows how to read that the BMC cannot. There is no command in
7IPMI that currently supports this use-case, therefore it will be added as an OEM
8command.
9
10The state of the BMC readable temperature sensors can be read through normal
11IPMI commands and is already supported.
12
13### OEM Set Control
14
15A host tool needs to be able to set the control of the thermal system to either
16automatic or manual. When manual, the daemon will effectively wait to be told to
17be put back in automatic mode. It is expected in this manual mode that something
18will be controlling the fans via the other commands.
19
20Manual mode is controlled by zone through the following OEM command:
21
22#### Request
23
24Byte | Purpose      | Value
25---- | ------------ | -----------------------------------------------------
26`00` | `netfn`      | `0x2e`
27`01` | `command`    | `0x04 (also using manual command)`
28`02` | `oem1`       | `0xcf`
29`03` | `oem2`       | `0xc2`
30`04` | `padding`    | `0x00`
31`05` | `SubCommand` | `Get or Set. Get == 0, Set == 1`
32`06` | `ZoneId`     |
33`07` | `Mode`       | `If Set, Value 1 == Manual Mode, 0 == Automatic Mode`
34
35#### Response
36
37Byte | Purpose   | Value
38---- | --------- | -----------------------------------------------------
39`02` | `oem1`    | `0xcf`
40`03` | `oem2`    | `0xc2`
41`04` | `padding` | `0x00`
42`07` | `Mode`    | `If Set, Value 1 == Manual Mode, 0 == Automatic Mode`
43
44### OEM Get Failsafe Mode
45
46A host tool needs to be able to read back whether a zone is in failsafe mode.
47This setting is read-only because it's dynamically determined within Swampd per
48zone.
49
50Byte | Purpose      | Value
51---- | ------------ | ----------------------------------
52`00` | `netfn`      | `0x2e`
53`01` | `command`    | `0x04 (also using manual command)`
54`02` | `oem1`       | `0xcf`
55`03` | `oem2`       | `0xc2`
56`04` | `padding`    | `0x00`
57`05` | `SubCommand` | `Get == 2`
58`06` | `ZoneId`     |
59
60#### Response
61
62Byte | Purpose    | Value
63---- | ---------- | -----------------------------------------------
64`02` | `oem1`     | `0xcf`
65`03` | `oem2`     | `0xc2`
66`04` | `padding`  | `0x00`
67`07` | `failsafe` | `1 == in Failsafe Mode, 0 not in failsafe mode`
68