1 /*
2  * Copyright (C) 2003-2015 FreeIPMI Core Team
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  *
17  */
18 
19 #ifndef IPMI_CMD_SPEC_H
20 #define IPMI_CMD_SPEC_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 /* Notes:
27    Refer to IPMIv1_5_rev1_1.pdf Table G-1, Command Number Assignments
28    and Privilege Levels for complete description
29  */
30 
31 /* IPMI Device Global Commands */
32 #define IPMI_CMD_RESERVED                                         0x00
33 #define IPMI_CMD_GET_DEVICE_ID                                    0x01
34 #define IPMI_CMD_GET_DEVICE_ID_BCST                               IPMI_CMD_GET_DEVICE_ID
35 #define IPMI_CMD_COLD_RESET                                       0x02
36 #define IPMI_CMD_WARM_RESET                                       0x03
37 #define IPMI_CMD_GET_SELF_TEST_RESULTS                            0x04
38 #define IPMI_CMD_MANUFACTURING_TEST_ON                            0x05
39 #define IPMI_CMD_SET_ACPI_POWER_STATE                             0x06
40 #define IPMI_CMD_GET_ACPI_POWER_STATE                             0x07
41 #define IPMI_CMD_GET_DEVICE_GUID                                  0x08
42 #define IPMI_CMD_GET_NETFN_SUPPORT                                0x09
43 #define IPMI_CMD_GET_COMMAND_SUPPORT                              0x0A
44 #define IPMI_CMD_GET_COMMAND_SUB_FUNCTION_SUPPORT                 0x0B
45 #define IPMI_CMD_GET_CONFIGURABLE_COMMANDS                        0x0C
46 #define IPMI_CMD_GET_CONFIGURABLE_COMMAND_SUB_FUNCTIONS           0x0D
47 /* RESERVED                                                       0x0E to 0x0F */
48 #define IPMI_CMD_SET_COMMAND_ENABLES                              0x60
49 #define IPMI_CMD_GET_COMMAND_ENABLES                              0x61
50 #define IPMI_CMD_SET_COMMAND_SUB_FUNCTION_ENABLES                 0x62
51 #define IPMI_CMD_GET_COMMAND_SUB_FUNCTION_ENABLES                 0x63
52 #define IPMI_CMD_GET_OEM_NETFN_IANA_SUPPORT                       0x64
53 
54 /* BMC Watchdog Timer Commands */
55 #define IPMI_CMD_RESET_WATCHDOG_TIMER                             0x22
56 #define IPMI_CMD_SET_WATCHDOG_TIMER                               0x24
57 #define IPMI_CMD_GET_WATCHDOG_TIMER                               0x25
58 
59 /* BMC Device And Messaging Commands */
60 #define IPMI_CMD_SET_BMC_GLOBAL_ENABLES                           0x2E
61 #define IPMI_CMD_GET_BMC_GLOBAL_ENABLES                           0x2F
62 #define IPMI_CMD_CLEAR_MESSAGE_FLAGS                              0x30
63 #define IPMI_CMD_GET_MESSAGE_FLAGS                                0x31
64 #define IPMI_CMD_ENABLE_MESSAGE_CHANNEL_RECEIVE                   0x32
65 #define IPMI_CMD_GET_MESSAGE                                      0x33
66 #define IPMI_CMD_SEND_MESSAGE                                     0x34
67 #define IPMI_CMD_READ_EVENT_MESSAGE_BUFFER                        0x35
68 #define IPMI_CMD_GET_BT_INTERFACE_CAPABILITIES                    0x36
69 #define IPMI_CMD_GET_SYSTEM_GUID                                  0x37
70 #define IPMI_CMD_SET_SYSTEM_INFO_PARAMETERS                       0x58
71 #define IPMI_CMD_GET_SYSTEM_INFO_PARAMETERS                       0x59
72 #define IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES          0x38
73 #define IPMI_CMD_GET_SESSION_CHALLENGE                            0x39
74 #define IPMI_CMD_ACTIVATE_SESSION                                 0x3A
75 #define IPMI_CMD_SET_SESSION_PRIVILEGE_LEVEL                      0x3B
76 #define IPMI_CMD_CLOSE_SESSION                                    0x3C
77 #define IPMI_CMD_GET_SESSION_INFO                                 0x3D
78 /* UNASSIGNED                                                     0x3E */
79 #define IPMI_CMD_GET_AUTHCODE                                     0x3F
80 #define IPMI_CMD_SET_CHANNEL_ACCESS                               0x40
81 #define IPMI_CMD_GET_CHANNEL_ACCESS                               0x41
82 #define IPMI_CMD_GET_CHANNEL_INFO_COMMAND                         0x42
83 #define IPMI_CMD_SET_USER_ACCESS_COMMAND                          0x43
84 #define IPMI_CMD_GET_USER_ACCESS_COMMAND                          0x44
85 #define IPMI_CMD_SET_USER_NAME                                    0x45
86 #define IPMI_CMD_GET_USER_NAME_COMMAND                            0x46
87 #define IPMI_CMD_SET_USER_PASSWORD_COMMAND                        0x47
88 #define IPMI_CMD_ACTIVATE_PAYLOAD                                 0x48
89 #define IPMI_CMD_DEACTIVATE_PAYLOAD                               0x49
90 #define IPMI_CMD_GET_PAYLOAD_ACTIVATION_STATUS                    0x4A
91 #define IPMI_CMD_GET_PAYLOAD_INSTANCE_INFO                        0x4B
92 #define IPMI_CMD_SET_USER_PAYLOAD_ACCESS                          0x4C
93 #define IPMI_CMD_GET_USER_PAYLOAD_ACCESS                          0x4D
94 #define IPMI_CMD_GET_CHANNEL_PAYLOAD_SUPPORT                      0x4E
95 #define IPMI_CMD_GET_CHANNEL_PAYLOAD_VERSION                      0x4F
96 #define IPMI_CMD_GET_CHANNEL_OEM_PAYLOAD_INFO                     0x50
97 /* unassigned                                                     0x51 */
98 #define IPMI_CMD_MASTER_WRITE_READ                                0x52
99 /* unassigned                                                     0x53 */
100 #define IPMI_CMD_GET_CHANNEL_CIPHER_SUITES                        0x54
101 #define IPMI_CMD_SUSPEND_RESUME_PAYLOAD_ENCRYPTION                0x53
102 #define IPMI_CMD_SET_CHANNEL_SECURITY_KEYS                        0x56
103 #define IPMI_CMD_GET_SYSTEM_INTERFACE_CAPABILITIES                0x57
104 /* unassigned                                                     0x58 to 0x5F */
105 /* Firmware Firewall Configuration                                0x60 to 0x64 */
106 
107 /* Chassis Device Commands */
108 /* achu: Cmd is named "set front panel enables", but cmd in appendix G is
109  * named "set front panel button enables".  Go fig ...
110  */
111 #define IPMI_CMD_GET_CHASSIS_CAPABILITIES                         0x00
112 #define IPMI_CMD_GET_CHASSIS_STATUS                               0x01
113 #define IPMI_CMD_CHASSIS_CONTROL                                  0x02
114 #define IPMI_CMD_CHASSIS_RESET                                    0x03
115 #define IPMI_CMD_CHASSIS_IDENTIFY                                 0x04
116 #define IPMI_CMD_SET_CHASSIS_CAPABILITIES                         0x05
117 #define IPMI_CMD_SET_POWER_RESTORE_POLICY                         0x06
118 #define IPMI_CMD_GET_SYSTEM_RESTART_CAUSE                         0x07
119 #define IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS                          0x08
120 #define IPMI_CMD_GET_SYSTEM_BOOT_OPTIONS                          0x09
121 #define IPMI_CMD_SET_FRONT_PANEL_BUTTON_ENABLES                   0x0A
122 #define IPMI_CMD_SET_FRONT_PANEL_ENABLES                          IPMI_CMD_SET_FRONT_PANEL_BUTTON_ENABLES
123 #define IPMI_CMD_SET_POWER_CYCLE_INTERVAL                         0x0B
124 /* unassigned                                                     0x0C to 0x0E */
125 #define IPMI_CMD_GET_POWER_ON_HOURS_COUNTER                       0x0F
126 
127 
128 /* Event Commands */
129 #define IPMI_CMD_SET_EVENT_RECEIVER                               0x00
130 #define IPMI_CMD_GET_EVENT_RECEIVER                               0x01
131 #define IPMI_CMD_PLATFORM_EVENT                                   0x02 /* (a.k.a. Event Message) */
132 /* unassigned                                                     0x03h to 0x0F */
133 
134 /* PEF and Alerting Commands */
135 #define IPMI_CMD_GET_PEF_CAPABILITIES                             0x10
136 #define IPMI_CMD_ARM_PEF_POSTPONE_TIMER                           0x11
137 #define IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS                 0x12
138 #define IPMI_CMD_GET_PEF_CONFIGURATION_PARAMETERS                 0x13
139 #define IPMI_CMD_SET_LAST_PROCESSED_EVENT_ID                      0x14
140 #define IPMI_CMD_GET_LAST_PROCESSED_EVENT_ID                      0x15
141 #define IPMI_CMD_ALERT_IMMEDIATE                                  0x16
142 #define IPMI_CMD_PET_ACKNOWLEDGE                                  0x17
143 
144 /* Sensor Device Commands */
145 #define IPMI_CMD_GET_DEVICE_SDR_INFO                              0x20
146 #define IPMI_CMD_GET_DEVICE_SDR                                   0x21
147 #define IPMI_CMD_RESERVE_DEVICE_SDR_REPOSITORY                    0x22
148 #define IPMI_CMD_GET_SENSOR_READING_FACTORS                       0x23
149 #define IPMI_CMD_SET_SENSOR_HYSTERESIS                            0x24
150 #define IPMI_CMD_GET_SENSOR_HYSTERESIS                            0x25
151 #define IPMI_CMD_SET_SENSOR_THRESHOLDS                            0x26
152 #define IPMI_CMD_GET_SENSOR_THRESHOLDS                            0x27
153 #define IPMI_CMD_SET_SENSOR_EVENT_ENABLE                          0x28
154 #define IPMI_CMD_GET_SENSOR_EVENT_ENABLE                          0x29
155 #define IPMI_CMD_RE_ARM_SENSOR_EVENTS                             0x2A
156 #define IPMI_CMD_GET_SENSOR_EVENT_STATUS                          0x2B
157 #define IPMI_CMD_GET_SENSOR_READING                               0x2D
158 #define IPMI_CMD_SET_SENSOR_TYPE                                  0x2E
159 #define IPMI_CMD_GET_SENSOR_TYPE                                  0x2F
160 #define IPMI_CMD_SET_SENSOR_READING_AND_EVENT_STATUS              0x30
161 
162 /* FRU Device Commands */
163 #define IPMI_CMD_GET_FRU_INVENTORY_AREA_INFO                      0x10
164 #define IPMI_CMD_READ_FRU_DATA                                    0x11
165 #define IPMI_CMD_WRITE_FRU_DATA                                   0x12
166 
167 /* SDR Device Commands */
168 #define IPMI_CMD_GET_SDR_REPOSITORY_INFO                          0x20
169 #define IPMI_CMD_GET_SDR_REPOSITORY_ALLOCATION_INFO               0x21
170 #define IPMI_CMD_RESERVE_SDR_REPOSITORY                           0x22
171 #define IPMI_CMD_GET_SDR                                          0x23
172 #define IPMI_CMD_ADD_SDR                                          0x24
173 #define IPMI_CMD_PARTIAL_ADD_SDR                                  0x25
174 #define IPMI_CMD_DELETE_SDR                                       0x26
175 #define IPMI_CMD_CLEAR_SDR_REPOSITORY                             0x27
176 #define IPMI_CMD_GET_SDR_REPOSITORY_TIME                          0x28
177 #define IPMI_CMD_SET_SDR_REPOSITORY_TIME                          0x29
178 #define IPMI_CMD_ENTER_SDR_REPOSITORY_UPDATE_MODE                 0x2A
179 #define IPMI_CMD_EXIT_SDR_REPOSITORY_UPDATE_MODE                  0x2B
180 #define IPMI_CMD_RUN_INITIALIZATION_AGENT                         0x2C
181 
182 /* SEL Device Commands */
183 #define IPMI_CMD_GET_SEL_INFO                                     0x40
184 #define IPMI_CMD_GET_SEL_ALLOCATION_INFO                          0x41
185 #define IPMI_CMD_RESERVE_SEL                                      0x42
186 #define IPMI_CMD_GET_SEL_ENTRY                                    0x43
187 #define IPMI_CMD_ADD_SEL_ENTRY                                    0x44
188 #define IPMI_CMD_PARTIAL_ADD_SEL_ENTRY                            0x45
189 #define IPMI_CMD_DELETE_SEL_ENTRY                                 0x46
190 #define IPMI_CMD_CLEAR_SEL                                        0x47
191 #define IPMI_CMD_GET_SEL_TIME                                     0x48
192 #define IPMI_CMD_SET_SEL_TIME                                     0x49
193 #define IPMI_CMD_GET_AUXILIARY_LOG_STATUS                         0x5A
194 #define IPMI_CMD_SET_AUXILIARY_LOG_STATUS                         0x5B
195 #define IPMI_CMD_GET_SEL_TIME_UTC_OFFSET                          0x5C
196 #define IPMI_CMD_SET_SEL_TIME_UTC_OFFSET                          0x5D
197 
198 /* LAN Device Commands */
199 #define IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS                 0x01
200 #define IPMI_CMD_GET_LAN_CONFIGURATION_PARAMETERS                 0x02
201 #define IPMI_CMD_SUSPEND_BMC_ARPS                                 0x03
202 #define IPMI_CMD_GET_IP_UDP_RMCP_STATISTICS                       0x04
203 
204 /* Serial/Modem Device Commands */
205 #define IPMI_CMD_SET_SERIAL_MODEM_CONFIGURATION                   0x10
206 #define IPMI_CMD_GET_SERIAL_MODEM_CONFIGURATION                   0x11
207 #define IPMI_CMD_SET_SERIAL_MODEM_MUX                             0x12
208 #define IPMI_CMD_GET_TAP_RESPONSE_CODES                           0x13
209 #define IPMI_CMD_SET_PPP_UDP_PROXY_TRANSMIT_DATA                  0x14
210 #define IPMI_CMD_GET_PPP_UDP_PROXY_TRANSMIT_DATA                  0x15
211 #define IPMI_CMD_SEND_PPP_UDP_PROXY_PACKET                        0x16
212 #define IPMI_CMD_GET_PPP_UDP_PROXY_RECEIVE_DATA                   0x17
213 #define IPMI_CMD_SERIAL_MODEM_CONNECTION_ACTIVE                   0x18
214 #define IPMI_CMD_CALLBACK                                         0x19
215 #define IPMI_CMD_SET_USER_CALLBACK_OPTIONS                        0x1A
216 #define IPMI_CMD_GET_USER_CALLBACK_OPTIONS                        0x1B
217 #define IPMI_CMD_SET_SERIAL_ROUTING_MUX                           0x1C
218 #define IPMI_CMD_SOL_ACTIVATING                                   0x20
219 #define IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS                 0x21
220 #define IPMI_CMD_GET_SOL_CONFIGURATION_PARAMETERS                 0x22
221 
222 /* Command Forwarding Commands */
223 #define IPMI_CMD_FORWARDED_COMMAND                                0x30
224 #define IPMI_CMD_SET_FORWARDED_COMMANDS                           0x31
225 #define IPMI_CMD_GET_FORWARDED_COMMANDS                           0x32
226 #define IPMI_CMD_ENABLE_FORWARDED_COMMANDS                        0x33
227 
228 /* Bridge Management Commands (ICMB) */
229 #define IPMI_CMD_GET_BRIDGE_STATE                                 0x00
230 #define IPMI_CMD_SET_BRIDGE_STATE                                 0x01
231 #define IPMI_CMD_GET_ICMB_ADDRESS                                 0x02
232 #define IPMI_CMD_SET_ICMB_ADDRESS                                 0x03
233 #define IPMI_CMD_SET_BRIDGE_PROXY_ADDRESS                         0x04
234 #define IPMI_CMD_GET_BRIDGE_STATISTICS                            0x05
235 #define IPMI_CMD_GET_ICMB_CAPABILITIES                            0x06
236 #define IPMI_CMD_CLEAR_BRIDGE_STATISTICS                          0x08
237 #define IPMI_CMD_GET_BRIDGE_PROXY_ADDRESS                         0x09
238 #define IPMI_CMD_GET_ICMB_CONNECTOR_INFO                          0x0A
239 #define IPMI_CMD_GET_ICMB_CONNECTION_ID                           0x0B
240 #define IPMI_CMD_SEND_ICMB_CONNECTION_ID                          0x0C
241 
242 /* Discovery Commands (ICMB) */
243 #define IPMI_CMD_PREPARE_FOR_DISCOVERY                            0x10
244 #define IPMI_CMD_GET_ADDRESSES                                    0x11
245 #define IPMI_CMD_SET_DISCOVERED                                   0x12
246 #define IPMI_CMD_GET_CHASSIS_DEVICE_ID                            0x13
247 #define IPMI_CMD_SET_CHASSIS_DEVICE_ID                            0x14
248 
249 /* Bridging Commands (ICMB) */
250 #define IPMI_CMD_BRIDGE_REQUEST                                   0x20
251 #define IPMI_CMD_BRIDGE_MESSAGE                                   0x21
252 
253 /* Event Commands (ICMB) */
254 #define IPMI_CMD_GET_EVENT_COUNT                                  0x30
255 #define IPMI_CMD_SET_EVENT_DESTINATION                            0x31
256 #define IPMI_CMD_SET_EVENT_RECEPTION_STATE                        0x32
257 #define IPMI_CMD_SEND_ICMB_EVENT_MESSAGE                          0x33
258 #define IPMI_CMD_GET_EVENT_DESTINATION                            0x34
259 #define IPMI_CMD_GET_EVENT_RECEPTION_STATE                        0x35
260 
261 /* OEM Commands for Bridge NetFn */
262 /* OEM Commands                                                   0xC0 to 0xFE */
263 
264 /* Other Bridge Commands */
265 #define IPMI_CMD_ERROR_REPORT                                     0xFF
266 
267 #ifdef __cplusplus
268 }
269 #endif
270 
271 #endif /* IPMI_CMD_SPEC_H */
272