blob: ea00bd221f2e1bce20246d9f857888948b1fcb47 [file] [log] [blame]
Ronak Kanabar1ae366f2023-06-07 01:21:56 +05301/** @file
2 IPMI 2.0 definitions from the IPMI Specification Version 2.0, Revision 1.1.
3
4 This file contains all NetFn Chassis commands, including:
5 Chassis Commands (Chapter 28)
6
7 See IPMI specification, Appendix G, Command Assignments
8 and Appendix H, Sub-function Assignments.
9
10 Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>
11 SPDX-License-Identifier: BSD-2-Clause-Patent
12**/
13
14#ifndef _IPMI_NET_FN_CHASSIS_H_
15#define _IPMI_NET_FN_CHASSIS_H_
16
17#pragma pack (1)
18//
19// Net function definition for Chassis command
20//
21#define IPMI_NETFN_CHASSIS 0x00
22
23//
24// Below is Definitions for Chassis commands (Chapter 28)
25//
26
27//
28// Definitions for Get Chassis Capabilities command
29//
30#define IPMI_CHASSIS_GET_CAPABILITIES 0x00
31
32//
33// Constants and Structure definitions for "Get Chassis Capabilities" command to follow here
34//
35typedef struct {
36 UINT8 CompletionCode;
37 UINT8 CapabilitiesFlags;
38 UINT8 ChassisFruInfoDeviceAddress;
39 UINT8 ChassisSDRDeviceAddress;
40 UINT8 ChassisSELDeviceAddress;
41 UINT8 ChassisSystemManagementDeviceAddress;
42 UINT8 ChassisBridgeDeviceAddress;
43} IPMI_GET_CHASSIS_CAPABILITIES_RESPONSE;
44
45//
46// Definitions for Get Chassis Status command
47//
48#define IPMI_CHASSIS_GET_STATUS 0x01
49
50//
51// Constants and Structure definitions for "Get Chassis Status" command to follow here
52//
53typedef struct {
54 UINT8 CompletionCode;
55 UINT8 CurrentPowerState;
56 UINT8 LastPowerEvent;
57 UINT8 MiscChassisState;
58 UINT8 FrontPanelButtonCapabilities;
59} IPMI_GET_CHASSIS_STATUS_RESPONSE;
60
61//
62// Definitions for Chassis Control command
63//
64#define IPMI_CHASSIS_CONTROL 0x02
65
66//
67// Constants and Structure definitions for "Chassis Control" command to follow here
68//
69typedef union {
70 struct {
71 UINT8 ChassisControl : 4;
72 UINT8 Reserved : 4;
73 } Bits;
74 UINT8 Uint8;
75} IPMI_CHASSIS_CONTROL_CHASSIS_CONTROL;
76
77typedef struct {
78 IPMI_CHASSIS_CONTROL_CHASSIS_CONTROL ChassisControl;
79} IPMI_CHASSIS_CONTROL_REQUEST;
80
81//
82// Definitions for Chassis Reset command
83//
84#define IPMI_CHASSIS_RESET 0x03
85
86//
87// Constants and Structure definitions for "Chassis Reset" command to follow here
88//
89
90//
91// Definitions for Chassis Identify command
92//
93#define IPMI_CHASSIS_IDENTIFY 0x04
94
95//
96// Constants and Structure definitions for "Chassis Identify" command to follow here
97//
98
99//
100// Definitions for Set Chassis Capabilities command
101//
102#define IPMI_CHASSIS_SET_CAPABILITIES 0x05
103
104//
105// Constants and Structure definitions for "Set Chassis Capabilities" command to follow here
106//
107
108//
109// Definitions for Set Power Restore Policy command
110//
111#define IPMI_CHASSIS_SET_POWER_RESTORE_POLICY 0x06
112
113//
114// Constants and Structure definitions for "Set Power Restore Policy" command to follow here
115//
116typedef union {
117 struct {
118 UINT8 PowerRestorePolicy : 3;
119 UINT8 Reserved : 5;
120 } Bits;
121 UINT8 Uint8;
122} IPMI_POWER_RESTORE_POLICY;
123
124typedef struct {
125 IPMI_POWER_RESTORE_POLICY PowerRestorePolicy;
126} IPMI_SET_POWER_RESTORE_POLICY_REQUEST;
127
128typedef struct {
129 UINT8 CompletionCode;
130 UINT8 PowerRestorePolicySupport;
131} IPMI_SET_POWER_RESTORE_POLICY_RESPONSE;
132
133//
134// Definitions for Get System Restart Cause command
135//
136#define IPMI_CHASSIS_GET_SYSTEM_RESTART_CAUSE 0x07
137
138//
139// Constants and Structure definitions for "Get System Restart Cause" command to follow here
140//
141#define IPMI_SYSTEM_RESTART_CAUSE_UNKNOWN 0x0
142#define IPMI_SYSTEM_RESTART_CAUSE_CHASSIS_CONTROL_COMMAND 0x1
143#define IPMI_SYSTEM_RESTART_CAUSE_PUSHBUTTON_RESET 0x2
144#define IPMI_SYSTEM_RESTART_CAUSE_PUSHBUTTON_POWERUP 0x3
145#define IPMI_SYSTEM_RESTART_CAUSE_WATCHDOG_EXPIRE 0x4
146#define IPMI_SYSTEM_RESTART_CAUSE_OEM 0x5
147#define IPMI_SYSTEM_RESTART_CAUSE_AUTO_POWER_ALWAYS_RESTORE 0x6
148#define IPMI_SYSTEM_RESTART_CAUSE_AUTO_POWER_RESTORE_PREV 0x7
149#define IPMI_SYSTEM_RESTART_CAUSE_PEF_RESET 0x8
150#define IPMI_SYSTEM_RESTART_CAUSE_PEF_POWERCYCLE 0x9
151#define IPMI_SYSTEM_RESTART_CAUSE_SOFT_RESET 0xA
152#define IPMI_SYSTEM_RESTART_CAUSE_RTC_POWERUP 0xB
153
154typedef union {
155 struct {
156 UINT8 Cause : 4;
157 UINT8 Reserved : 4;
158 } Bits;
159 UINT8 Uint8;
160} IPMI_SYSTEM_RESTART_CAUSE;
161
162typedef struct {
163 UINT8 CompletionCode;
164 IPMI_SYSTEM_RESTART_CAUSE RestartCause;
165 UINT8 ChannelNumber;
166} IPMI_GET_SYSTEM_RESTART_CAUSE_RESPONSE;
167
168//
169// Definitions for Set System BOOT options command
170//
171#define IPMI_CHASSIS_SET_SYSTEM_BOOT_OPTIONS 0x08
172
173//
174// Constants and Structure definitions for "Set System boot options" command to follow here
175//
176typedef union {
177 struct {
178 UINT8 ParameterSelector : 7;
179 UINT8 MarkParameterInvalid : 1;
180 } Bits;
181 UINT8 Uint8;
182} IPMI_SET_BOOT_OPTIONS_PARAMETER_VALID;
183
184typedef struct {
185 IPMI_SET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid;
Elyes Haouasce655f52023-07-30 12:53:47 +0200186 UINT8 ParameterData[];
Ronak Kanabar1ae366f2023-06-07 01:21:56 +0530187} IPMI_SET_BOOT_OPTIONS_REQUEST;
188
189typedef struct {
190 UINT8 CompletionCode : 8;
191} IPMI_SET_BOOT_OPTIONS_RESPONSE;
192
193//
194// Definitions for Get System Boot options command
195//
196#define IPMI_CHASSIS_GET_SYSTEM_BOOT_OPTIONS 0x09
197
198//
199// Constants and Structure definitions for "Get System boot options" command to follow here
200//
201typedef union {
202 struct {
203 UINT8 ParameterSelector : 7;
204 UINT8 Reserved : 1;
205 } Bits;
206 UINT8 Uint8;
207} IPMI_GET_BOOT_OPTIONS_PARAMETER_SELECTOR;
208
209typedef struct {
210 IPMI_GET_BOOT_OPTIONS_PARAMETER_SELECTOR ParameterSelector;
211 UINT8 SetSelector;
212 UINT8 BlockSelector;
213} IPMI_GET_BOOT_OPTIONS_REQUEST;
214
215typedef struct {
216 UINT8 Parameter;
217 UINT8 Valid;
218 UINT8 Data1;
219 UINT8 Data2;
220 UINT8 Data3;
221 UINT8 Data4;
222 UINT8 Data5;
223} IPMI_GET_THE_SYSTEM_BOOT_OPTIONS;
224
225typedef struct {
226 UINT8 ParameterVersion;
227 UINT8 ParameterValid;
228 UINT8 ChannelNumber;
229 UINT32 SessionId;
230 UINT32 TimeStamp;
231 UINT8 Reserved[3];
232} IPMI_BOOT_INITIATOR;
233
234//
235// Definitions for boot option parameter selector
236//
237#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SET_IN_PROGRESS 0x0
238#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SERVICE_PARTITION_SELECTOR 0x1
239#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SERVICE_PARTITION_SCAN 0x2
240#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_BMC_BOOT_FLAG 0x3
241#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INFO_ACK 0x4
242#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_FLAGS 0x5
243#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INITIATOR_INFO 0x6
244#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INITIATOR_MAILBOX 0x7
245#define IPMI_BOOT_OPTIONS_PARAMETER_OEM_BEGIN 0x60
246#define IPMI_BOOT_OPTIONS_PARAMETER_OEM_END 0x7F
247
248//
249// Response Parameters for IPMI Get Boot Options
250//
251typedef union {
252 struct {
253 UINT8 SetInProgress : 2;
254 UINT8 Reserved : 6;
255 } Bits;
256 UINT8 Uint8;
257} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_0;
258
259typedef struct {
260 UINT8 ServicePartitionSelector;
261} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_1;
262
263typedef union {
264 struct {
265 UINT8 ServicePartitionDiscovered : 1;
266 UINT8 ServicePartitionScanRequest : 1;
267 UINT8 Reserved : 6;
268 } Bits;
269 UINT8 Uint8;
270} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_2;
271
272typedef union {
273 struct {
274 UINT8 BmcBootFlagValid : 5;
275 UINT8 Reserved : 3;
276 } Bits;
277 UINT8 Uint8;
278} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_3;
279
280typedef struct {
281 UINT8 WriteMask;
282 UINT8 BootInitiatorAcknowledgeData;
283} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_4;
284
285//
286// Definitions for the 'Boot device selector' field of Boot Option Parameters #5
287//
288#define IPMI_BOOT_DEVICE_SELECTOR_NO_OVERRIDE 0x0
289#define IPMI_BOOT_DEVICE_SELECTOR_PXE 0x1
290#define IPMI_BOOT_DEVICE_SELECTOR_HARDDRIVE 0x2
291#define IPMI_BOOT_DEVICE_SELECTOR_HARDDRIVE_SAFE_MODE 0x3
292#define IPMI_BOOT_DEVICE_SELECTOR_DIAGNOSTIC_PARTITION 0x4
293#define IPMI_BOOT_DEVICE_SELECTOR_CD_DVD 0x5
294#define IPMI_BOOT_DEVICE_SELECTOR_BIOS_SETUP 0x6
295#define IPMI_BOOT_DEVICE_SELECTOR_REMOTE_FLOPPY 0x7
296#define IPMI_BOOT_DEVICE_SELECTOR_REMOTE_CD_DVD 0x8
297#define IPMI_BOOT_DEVICE_SELECTOR_PRIMARY_REMOTE_MEDIA 0x9
298#define IPMI_BOOT_DEVICE_SELECTOR_REMOTE_HARDDRIVE 0xB
299#define IPMI_BOOT_DEVICE_SELECTOR_FLOPPY 0xF
300
301#define BOOT_OPTION_HANDLED_BY_BIOS 0x01
302
303//
304// Constant definitions for the 'BIOS Mux Control Override' field of Boot Option Parameters #5
305//
306#define BIOS_MUX_CONTROL_OVERRIDE_RECOMMEND_SETTING 0x00
307#define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_BMC 0x01
308#define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_SYSTEM 0x02
309
310typedef union {
311 struct {
312 UINT8 Reserved : 5;
313 UINT8 BiosBootType : 1;
314 UINT8 PersistentOptions : 1;
315 UINT8 BootFlagValid : 1;
316 } Bits;
317 UINT8 Uint8;
318} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_1;
319
320typedef union {
321 struct {
322 UINT8 LockReset : 1;
323 UINT8 ScreenBlank : 1;
324 UINT8 BootDeviceSelector : 4;
325 UINT8 LockKeyboard : 1;
326 UINT8 CmosClear : 1;
327 } Bits;
328 UINT8 Uint8;
329} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_2;
330
331typedef union {
332 struct {
333 UINT8 ConsoleRedirection : 2;
334 UINT8 LockSleep : 1;
335 UINT8 UserPasswordBypass : 1;
336 UINT8 ForceProgressEventTrap : 1;
337 UINT8 BiosVerbosity : 2;
338 UINT8 LockPower : 1;
339 } Bits;
340 UINT8 Uint8;
341} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_3;
342
343typedef union {
344 struct {
345 UINT8 BiosMuxControlOverride : 3;
346 UINT8 BiosSharedModeOverride : 1;
347 UINT8 Reserved : 4;
348 } Bits;
349 UINT8 Uint8;
350} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_4;
351
352typedef union {
353 struct {
354 UINT8 DeviceInstanceSelector : 5;
355 UINT8 Reserved : 3;
356 } Bits;
357 UINT8 Uint8;
358} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_5;
359
360typedef struct {
361 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_1 Data1;
362 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_2 Data2;
363 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_3 Data3;
364 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_4 Data4;
365 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_5 Data5;
366} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5;
367
368typedef union {
369 struct {
370 UINT8 ChannelNumber : 4;
371 UINT8 Reserved : 4;
372 } Bits;
373 UINT8 Uint8;
374} IPMI_BOOT_OPTIONS_CHANNEL_NUMBER;
375
376typedef struct {
377 IPMI_BOOT_OPTIONS_CHANNEL_NUMBER ChannelNumber;
378 UINT8 SessionId[4];
379 UINT8 BootInfoTimeStamp[4];
380} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_6;
381
382typedef struct {
383 UINT8 SetSelector;
384 UINT8 BlockData[16];
385} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_7;
386
387typedef union {
388 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_0 Parm0;
389 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_1 Parm1;
390 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_2 Parm2;
391 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_3 Parm3;
392 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_4 Parm4;
393 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5 Parm5;
394 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_6 Parm6;
395 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_7 Parm7;
396} IPMI_BOOT_OPTIONS_PARAMETERS;
397
398typedef union {
399 struct {
400 UINT8 ParameterVersion : 4;
401 UINT8 Reserved : 4;
402 } Bits;
403 UINT8 Uint8;
404} IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION;
405
406typedef union {
407 struct {
408 UINT8 ParameterSelector : 7;
409 UINT8 ParameterValid : 1;
410 } Bits;
411 UINT8 Uint8;
412} IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID;
413
414typedef struct {
415 UINT8 CompletionCode;
416 IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION ParameterVersion;
417 IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid;
Elyes Haouasce655f52023-07-30 12:53:47 +0200418 UINT8 ParameterData[];
Ronak Kanabar1ae366f2023-06-07 01:21:56 +0530419} IPMI_GET_BOOT_OPTIONS_RESPONSE;
420
421//
422// Definitions for Set front panel button enables command
423//
424#define IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES 0x0A
425
426//
427// Constants and Structure definitions for "Set front panel button enables" command to follow here
428//
429typedef union {
430 struct {
431 UINT8 DisablePoweroffButton : 1;
432 UINT8 DisableResetButton : 1;
433 UINT8 DisableDiagnosticInterruptButton : 1;
434 UINT8 DisableStandbyButton : 1;
435 UINT8 Reserved : 4;
436 } Bits;
437 UINT8 Uint8;
438} IPMI_FRONT_PANEL_BUTTON_ENABLES;
439
440typedef struct {
441 IPMI_FRONT_PANEL_BUTTON_ENABLES FrontPanelButtonEnables;
442} IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES_REQUEST;
443
444//
445// Definitions for Set Power Cycle Interval command
446//
447#define IPMI_CHASSIS_SET_POWER_CYCLE_INTERVALS 0x0B
448
449//
450// Constants and Structure definitions for "Set Power Cycle Interval" command to follow here
451//
452
453//
454// Definitions for Get POH Counter command
455//
456#define IPMI_CHASSIS_GET_POH_COUNTER 0x0F
457
458//
459// Constants and Structure definitions for "Get POH Counter" command to follow here
460//
461#pragma pack()
462#endif