TianoCore EDK2 master
Loading...
Searching...
No Matches
IpmiNetFnChassis.h
Go to the documentation of this file.
1
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;
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;
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;
76
77typedef struct {
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;
123
124typedef struct {
125 IPMI_POWER_RESTORE_POLICY PowerRestorePolicy;
127
128typedef struct {
129 UINT8 CompletionCode;
130 UINT8 PowerRestorePolicySupport;
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;
161
162typedef struct {
163 UINT8 CompletionCode;
164 IPMI_SYSTEM_RESTART_CAUSE RestartCause;
165 UINT8 ChannelNumber;
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;
183
184typedef struct {
186 UINT8 ParameterData[0];
188
189typedef struct {
190 UINT8 CompletionCode : 8;
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;
208
209typedef struct {
211 UINT8 SetSelector;
212 UINT8 BlockSelector;
214
215typedef struct {
216 UINT8 Parameter;
217 UINT8 Valid;
218 UINT8 Data1;
219 UINT8 Data2;
220 UINT8 Data3;
221 UINT8 Data4;
222 UINT8 Data5;
224
225typedef struct {
226 UINT8 ParameterVersion;
227 UINT8 ParameterValid;
228 UINT8 ChannelNumber;
229 UINT32 SessionId;
230 UINT32 TimeStamp;
231 UINT8 Reserved[3];
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;
258
259typedef struct {
260 UINT8 ServicePartitionSelector;
262
263typedef union {
264 struct {
265 UINT8 ServicePartitionDiscovered : 1;
266 UINT8 ServicePartitionScanRequest : 1;
267 UINT8 Reserved : 6;
268 } Bits;
269 UINT8 Uint8;
271
272typedef union {
273 struct {
274 UINT8 BmcBootFlagValid : 5;
275 UINT8 Reserved : 3;
276 } Bits;
277 UINT8 Uint8;
279
280typedef struct {
281 UINT8 WriteMask;
282 UINT8 BootInitiatorAcknowledgeData;
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;
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;
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;
342
343typedef union {
344 struct {
345 UINT8 BiosMuxControlOverride : 3;
346 UINT8 BiosSharedModeOverride : 1;
347 UINT8 Reserved : 4;
348 } Bits;
349 UINT8 Uint8;
351
352typedef union {
353 struct {
354 UINT8 DeviceInstanceSelector : 5;
355 UINT8 Reserved : 3;
356 } Bits;
357 UINT8 Uint8;
359
360typedef struct {
367
368typedef union {
369 struct {
370 UINT8 ChannelNumber : 4;
371 UINT8 Reserved : 4;
372 } Bits;
373 UINT8 Uint8;
375
376typedef struct {
378 UINT8 SessionId[4];
379 UINT8 BootInfoTimeStamp[4];
381
382typedef struct {
383 UINT8 SetSelector;
384 UINT8 BlockData[16];
386
387typedef union {
397
398typedef union {
399 struct {
400 UINT8 ParameterVersion : 4;
401 UINT8 Reserved : 4;
402 } Bits;
403 UINT8 Uint8;
405
406typedef union {
407 struct {
408 UINT8 ParameterSelector : 7;
409 UINT8 ParameterValid : 1;
410 } Bits;
411 UINT8 Uint8;
413
414typedef struct {
415 UINT8 CompletionCode;
418 UINT8 ParameterData[0];
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;
439
440typedef struct {
441 IPMI_FRONT_PANEL_BUTTON_ENABLES FrontPanelButtonEnables;
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