blob: c20091fedcf2a07f64bcd2d3ae8f2e9df4e0d61b [file] [log] [blame]
Jonathan Zhang6d277782020-06-09 17:56:53 -07001/** @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;
186 UINT8 ParameterData[0];
187} IPMI_SET_BOOT_OPTIONS_REQUEST;
188
189//
190// Definitions for Get System Boot options command
191//
192#define IPMI_CHASSIS_GET_SYSTEM_BOOT_OPTIONS 0x09
193
194//
195// Constants and Structure definitions for "Get System boot options" command to follow here
196//
197typedef union {
198 struct {
199 UINT8 ParameterSelector:7;
200 UINT8 Reserved:1;
201 } Bits;
202 UINT8 Uint8;
203} IPMI_GET_BOOT_OPTIONS_PARAMETER_SELECTOR;
204
205typedef struct {
206 IPMI_GET_BOOT_OPTIONS_PARAMETER_SELECTOR ParameterSelector;
207 UINT8 SetSelector;
208 UINT8 BlockSelector;
209} IPMI_GET_BOOT_OPTIONS_REQUEST;
210
211typedef struct {
212 UINT8 Parameter;
213 UINT8 Valid;
214 UINT8 Data1;
215 UINT8 Data2;
216 UINT8 Data3;
217 UINT8 Data4;
218 UINT8 Data5;
219} IPMI_GET_THE_SYSTEM_BOOT_OPTIONS;
220
221typedef struct {
222 UINT8 ParameterVersion;
223 UINT8 ParameterValid;
224 UINT8 ChannelNumber;
225 UINT32 SessionId;
226 UINT32 TimeStamp;
227 UINT8 Reserved[3];
228} IPMI_BOOT_INITIATOR;
229
230//
231// Definitions for boot option parameter selector
232//
233#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SET_IN_PROGRESS 0x0
234#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SERVICE_PARTITION_SELECTOR 0x1
235#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SERVICE_PARTITION_SCAN 0x2
236#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_BMC_BOOT_FLAG 0x3
237#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INFO_ACK 0x4
238#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_FLAGS 0x5
239#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INITIATOR_INFO 0x6
240#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INITIATOR_MAILBOX 0x7
241#define IPMI_BOOT_OPTIONS_PARAMETER_OEM_BEGIN 0x60
242#define IPMI_BOOT_OPTIONS_PARAMETER_OEM_END 0x7F
243
244//
245// Response Parameters for IPMI Get Boot Options
246//
247typedef union {
248 struct {
249 UINT8 SetInProgress : 2;
250 UINT8 Reserved : 6;
251 } Bits;
252 UINT8 Uint8;
253} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_0;
254
255typedef struct {
256 UINT8 ServicePartitionSelector;
257} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_1;
258
259typedef union {
260 struct {
261 UINT8 ServicePartitionDiscovered : 1;
262 UINT8 ServicePartitionScanRequest : 1;
263 UINT8 Reserved: 6;
264 } Bits;
265 UINT8 Uint8;
266} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_2;
267
268typedef union {
269 struct {
270 UINT8 BmcBootFlagValid : 5;
271 UINT8 Reserved : 3;
272 } Bits;
273 UINT8 Uint8;
274} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_3;
275
276typedef struct {
277 UINT8 WriteMask;
278 UINT8 BootInitiatorAcknowledgeData;
279} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_4;
280
281//
282// Definitions for the 'Boot device selector' field of Boot Option Parameters #5
283//
284#define IPMI_BOOT_DEVICE_SELECTOR_NO_OVERRIDE 0x0
285#define IPMI_BOOT_DEVICE_SELECTOR_PXE 0x1
286#define IPMI_BOOT_DEVICE_SELECTOR_HARDDRIVE 0x2
287#define IPMI_BOOT_DEVICE_SELECTOR_HARDDRIVE_SAFE_MODE 0x3
288#define IPMI_BOOT_DEVICE_SELECTOR_DIAGNOSTIC_PARTITION 0x4
289#define IPMI_BOOT_DEVICE_SELECTOR_CD_DVD 0x5
290#define IPMI_BOOT_DEVICE_SELECTOR_BIOS_SETUP 0x6
291#define IPMI_BOOT_DEVICE_SELECTOR_REMOTE_FLOPPY 0x7
292#define IPMI_BOOT_DEVICE_SELECTOR_REMOTE_CD_DVD 0x8
293#define IPMI_BOOT_DEVICE_SELECTOR_PRIMARY_REMOTE_MEDIA 0x9
294#define IPMI_BOOT_DEVICE_SELECTOR_REMOTE_HARDDRIVE 0xB
295#define IPMI_BOOT_DEVICE_SELECTOR_FLOPPY 0xF
296
297#define BOOT_OPTION_HANDLED_BY_BIOS 0x01
298
299//
300// Constant definitions for the 'BIOS Mux Control Override' field of Boot Option Parameters #5
301//
302#define BIOS_MUX_CONTROL_OVERRIDE_RECOMMEND_SETTING 0x00
303#define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_BMC 0x01
304#define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_SYSTEM 0x02
305
306typedef union {
307 struct {
308 UINT8 Reserved:5;
309 UINT8 BiosBootType:1;
310 UINT8 PersistentOptions:1;
311 UINT8 BootFlagValid:1;
312 } Bits;
313 UINT8 Uint8;
314} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_1;
315
316typedef union {
317 struct {
318 UINT8 LockReset:1;
319 UINT8 ScreenBlank:1;
320 UINT8 BootDeviceSelector:4;
321 UINT8 LockKeyboard:1;
322 UINT8 CmosClear:1;
323 } Bits;
324 UINT8 Uint8;
325} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_2;
326
327typedef union {
328 struct {
329 UINT8 ConsoleRedirection:2;
330 UINT8 LockSleep:1;
331 UINT8 UserPasswordBypass:1;
332 UINT8 ForceProgressEventTrap:1;
333 UINT8 BiosVerbosity:2;
334 UINT8 LockPower:1;
335 } Bits;
336 UINT8 Uint8;
337} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_3;
338
339typedef union {
340 struct {
341 UINT8 BiosMuxControlOverride:3;
342 UINT8 BiosSharedModeOverride:1;
343 UINT8 Reserved:4;
344 } Bits;
345 UINT8 Uint8;
346} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_4;
347
348typedef union {
349 struct {
350 UINT8 DeviceInstanceSelector:5;
351 UINT8 Reserved:3;
352 } Bits;
353 UINT8 Uint8;
354} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_5;
355
356typedef struct {
357 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_1 Data1;
358 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_2 Data2;
359 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_3 Data3;
360 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_4 Data4;
361 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_5 Data5;
362} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5;
363
364typedef union {
365 struct {
366 UINT8 ChannelNumber:4;
367 UINT8 Reserved:4;
368 } Bits;
369 UINT8 Uint8;
370} IPMI_BOOT_OPTIONS_CHANNEL_NUMBER;
371
372typedef struct {
373 IPMI_BOOT_OPTIONS_CHANNEL_NUMBER ChannelNumber;
374 UINT8 SessionId[4];
375 UINT8 BootInfoTimeStamp[4];
376} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_6;
377
378typedef struct {
379 UINT8 SetSelector;
380 UINT8 BlockData[16];
381} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_7;
382
383typedef union {
384 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_0 Parm0;
385 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_1 Parm1;
386 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_2 Parm2;
387 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_3 Parm3;
388 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_4 Parm4;
389 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5 Parm5;
390 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_6 Parm6;
391 IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_7 Parm7;
392} IPMI_BOOT_OPTIONS_PARAMETERS;
393
394typedef union {
395 struct {
396 UINT8 ParameterVersion:4;
397 UINT8 Reserved:4;
398 } Bits;
399 UINT8 Uint8;
400} IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION;
401
402typedef union {
403 struct {
404 UINT8 ParameterSelector:7;
405 UINT8 ParameterValid:1;
406 } Bits;
407 UINT8 Uint8;
408} IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID;
409
410typedef struct {
411 UINT8 CompletionCode;
412 IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION ParameterVersion;
413 IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid;
414 UINT8 ParameterData[0];
415} IPMI_GET_BOOT_OPTIONS_RESPONSE;
416
417//
418// Definitions for Set front panel button enables command
419//
420#define IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES 0x0A
421
422//
423// Constants and Structure definitions for "Set front panel button enables" command to follow here
424//
425typedef union {
426 struct {
427 UINT8 DisablePoweroffButton:1;
428 UINT8 DisableResetButton:1;
429 UINT8 DisableDiagnosticInterruptButton:1;
430 UINT8 DisableStandbyButton:1;
431 UINT8 Reserved:4;
432 } Bits;
433 UINT8 Uint8;
434} IPMI_FRONT_PANEL_BUTTON_ENABLES;
435
436typedef struct {
437 IPMI_FRONT_PANEL_BUTTON_ENABLES FrontPanelButtonEnables;
438} IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES_REQUEST;
439
440//
441// Definitions for Set Power Cycle Interval command
442//
443#define IPMI_CHASSIS_SET_POWER_CYCLE_INTERVALS 0x0B
444
445//
446// Constants and Structure definitions for "Set Power Cycle Interval" command to follow here
447//
448
449//
450// Definitions for Get POH Counter command
451//
452#define IPMI_CHASSIS_GET_POH_COUNTER 0x0F
453
454//
455// Constants and Structure definitions for "Get POH Counter" command to follow here
456//
457#pragma pack()
458#endif