]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/IndustryStandard/IpmiNetFnApp.h
MdePkg: TpmPtp: Add CapCRBIdleBypass definition
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / IpmiNetFnApp.h
1 /** @file
2 IPMI 2.0 definitions from the IPMI Specification Version 2.0, Revision 1.1.
3
4 This file contains all NetFn App commands, including:
5 IPM Device "Global" Commands (Chapter 20)
6 Firmware Firewall & Command Discovery Commands (Chapter 21)
7 BMC Watchdog Timer Commands (Chapter 27)
8 IPMI Messaging Support Commands (Chapter 22)
9 RMCP+ Support and Payload Commands (Chapter 24)
10
11 See IPMI specification, Appendix G, Command Assignments
12 and Appendix H, Sub-function Assignments.
13
14 Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>
15 This program and the accompanying materials
16 are licensed and made available under the terms and conditions of the BSD License
17 which accompanies this distribution. The full text of the license may be found at
18 http://opensource.org/licenses/bsd-license.php
19
20 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
21 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 **/
23
24 #ifndef _IPMI_NET_FN_APP_H_
25 #define _IPMI_NET_FN_APP_H_
26
27 #pragma pack(1)
28 //
29 // Net function definition for App command
30 //
31 #define IPMI_NETFN_APP 0x06
32
33 //
34 // Below is Definitions for IPM Device "Global" Commands (Chapter 20)
35 //
36
37 //
38 // Definitions for Get Device ID command
39 //
40 #define IPMI_APP_GET_DEVICE_ID 0x1
41
42 //
43 // Constants and Structure definitions for "Get Device ID" command to follow here
44 //
45 typedef union {
46 struct {
47 UINT8 DeviceRevision : 4;
48 UINT8 Reserved : 3;
49 UINT8 DeviceSdr : 1;
50 } Bits;
51 UINT8 Uint8;
52 } IPMI_GET_DEVICE_ID_DEVICE_REV;
53
54 typedef union {
55 struct {
56 UINT8 MajorFirmwareRev : 7;
57 UINT8 UpdateMode : 1;
58 } Bits;
59 UINT8 Uint8;
60 } IPMI_GET_DEVICE_ID_FIRMWARE_REV_1;
61
62 typedef union {
63 struct {
64 UINT8 SensorDeviceSupport : 1;
65 UINT8 SdrRepositorySupport : 1;
66 UINT8 SelDeviceSupport : 1;
67 UINT8 FruInventorySupport : 1;
68 UINT8 IpmbMessageReceiver : 1;
69 UINT8 IpmbMessageGenerator : 1;
70 UINT8 BridgeSupport : 1;
71 UINT8 ChassisSupport : 1;
72 } Bits;
73 UINT8 Uint8;
74 } IPMI_GET_DEVICE_ID_DEVICE_SUPPORT;
75
76 typedef struct {
77 UINT8 CompletionCode;
78 UINT8 DeviceId;
79 IPMI_GET_DEVICE_ID_DEVICE_REV DeviceRevision;
80 IPMI_GET_DEVICE_ID_FIRMWARE_REV_1 FirmwareRev1;
81 UINT8 MinorFirmwareRev;
82 UINT8 SpecificationVersion;
83 IPMI_GET_DEVICE_ID_DEVICE_SUPPORT DeviceSupport;
84 UINT8 ManufacturerId[3];
85 UINT16 ProductId;
86 UINT32 AuxFirmwareRevInfo;
87 } IPMI_GET_DEVICE_ID_RESPONSE;
88
89
90 //
91 // Definitions for Cold Reset command
92 //
93 #define IPMI_APP_COLD_RESET 0x2
94
95 //
96 // Constants and Structure definitions for "Cold Reset" command to follow here
97 //
98
99 //
100 // Definitions for Warm Reset command
101 //
102 #define IPMI_APP_WARM_RESET 0x3
103
104 //
105 // Constants and Structure definitions for "Warm Reset" command to follow here
106 //
107
108 //
109 // Definitions for Get Self Results command
110 //
111 #define IPMI_APP_GET_SELFTEST_RESULTS 0x4
112
113 //
114 // Constants and Structure definitions for "Get Self Test Results" command to follow here
115 //
116 typedef struct {
117 UINT8 CompletionCode;
118 UINT8 Result;
119 UINT8 Param;
120 } IPMI_SELF_TEST_RESULT_RESPONSE;
121
122 #define IPMI_APP_SELFTEST_NO_ERROR 0x55
123 #define IPMI_APP_SELFTEST_NOT_IMPLEMENTED 0x56
124 #define IPMI_APP_SELFTEST_ERROR 0x57
125 #define IPMI_APP_SELFTEST_FATAL_HW_ERROR 0x58
126 #define IPMI_APP_SELFTEST_INACCESSIBLE_SEL 0x80
127 #define IPMI_APP_SELFTEST_INACCESSIBLE_SDR 0x40
128 #define IPMI_APP_SELFTEST_INACCESSIBLE_FRU 0x20
129 #define IPMI_APP_SELFTEST_IPMB_SIGNAL_FAIL 0x10
130 #define IPMI_APP_SELFTEST_SDR_REPOSITORY_EMPTY 0x08
131 #define IPMI_APP_SELFTEST_FRU_CORRUPT 0x04
132 #define IPMI_APP_SELFTEST_FW_BOOTBLOCK_CORRUPT 0x02
133 #define IPMI_APP_SELFTEST_FW_CORRUPT 0x01
134
135 //
136 // Definitions for Manufacturing Test ON command
137 //
138 #define IPMI_APP_MANUFACTURING_TEST_ON 0x5
139
140 //
141 // Constants and Structure definitions for "Manufacturing Test ON" command to follow here
142 //
143
144 //
145 // Definitions for Set ACPI Power State command
146 //
147 #define IPMI_APP_SET_ACPI_POWERSTATE 0x6
148
149 //
150 // Constants and Structure definitions for "Set ACPI Power State" command to follow here
151 //
152
153 //
154 // Definitions for System Power State
155 //
156 // Working
157 #define IPMI_SYSTEM_POWER_STATE_S0_G0 0x0
158 #define IPMI_SYSTEM_POWER_STATE_S1 0x1
159 #define IPMI_SYSTEM_POWER_STATE_S2 0x2
160 #define IPMI_SYSTEM_POWER_STATE_S3 0x3
161 #define IPMI_SYSTEM_POWER_STATE_S4 0x4
162 // Soft off
163 #define IPMI_SYSTEM_POWER_STATE_S5_G2 0x5
164 // Sent when message source cannot differentiate between S4 and S5
165 #define IPMI_SYSTEM_POWER_STATE_S4_S5 0x6
166 // Mechanical off
167 #define IPMI_SYSTEM_POWER_STATE_G3 0x7
168 // Sleeping - cannot differentiate between S1-S3
169 #define IPMI_SYSTEM_POWER_STATE_SLEEPING 0x8
170 // Sleeping - cannot differentiate between S1-S4
171 #define IPMI_SYSTEM_POWER_STATE_G1_SLEEPING 0x9
172 // S5 entered by override
173 #define IPMI_SYSTEM_POWER_STATE_OVERRIDE 0xA
174 #define IPMI_SYSTEM_POWER_STATE_LEGACY_ON 0x20
175 #define IPMI_SYSTEM_POWER_STATE_LEGACY_OFF 0x21
176 #define IPMI_SYSTEM_POWER_STATE_UNKNOWN 0x2A
177 #define IPMI_SYSTEM_POWER_STATE_NO_CHANGE 0x7F
178
179 //
180 // Definitions for Device Power State
181 //
182 #define IPMI_DEVICE_POWER_STATE_D0 0x0
183 #define IPMI_DEVICE_POWER_STATE_D1 0x1
184 #define IPMI_DEVICE_POWER_STATE_D2 0x2
185 #define IPMI_DEVICE_POWER_STATE_D3 0x3
186 #define IPMI_DEVICE_POWER_STATE_UNKNOWN 0x2A
187 #define IPMI_DEVICE_POWER_STATE_NO_CHANGE 0x7F
188
189 typedef union {
190 struct {
191 UINT8 PowerState : 7;
192 UINT8 StateChange : 1;
193 } Bits;
194 UINT8 Uint8;
195 } IPMI_ACPI_POWER_STATE;
196
197 typedef struct {
198 IPMI_ACPI_POWER_STATE SystemPowerState;
199 IPMI_ACPI_POWER_STATE DevicePowerState;
200 } IPMI_SET_ACPI_POWER_STATE_REQUEST;
201
202 //
203 // Definitions for Get ACPI Power State command
204 //
205 #define IPMI_APP_GET_ACPI_POWERSTATE 0x7
206
207 //
208 // Constants and Structure definitions for "Get ACPI Power State" command to follow here
209 //
210
211 //
212 // Definitions for Get Device GUID command
213 //
214 #define IPMI_APP_GET_DEVICE_GUID 0x8
215
216 //
217 // Constants and Structure definitions for "Get Device GUID" command to follow here
218 //
219 //
220 // Message structure definition for "Get Device Guid" IPMI command
221 //
222 typedef struct {
223 UINT8 CompletionCode;
224 UINT8 Guid[16];
225 } IPMI_GET_DEVICE_GUID_RESPONSE;
226
227 //
228 // Below is Definitions for BMC Watchdog Timer Commands (Chapter 27)
229 //
230
231 //
232 // Definitions for Reset WatchDog Timer command
233 //
234 #define IPMI_APP_RESET_WATCHDOG_TIMER 0x22
235
236 //
237 // Definitions for Set WatchDog Timer command
238 //
239 #define IPMI_APP_SET_WATCHDOG_TIMER 0x24
240
241 //
242 // Constants and Structure definitions for "Set WatchDog Timer" command to follow here
243 //
244
245 //
246 // Definitions for watchdog timer use
247 //
248 #define IPMI_WATCHDOG_TIMER_BIOS_FRB2 0x1
249 #define IPMI_WATCHDOG_TIMER_BIOS_POST 0x2
250 #define IPMI_WATCHDOG_TIMER_OS_LOADER 0x3
251 #define IPMI_WATCHDOG_TIMER_SMS 0x4
252 #define IPMI_WATCHDOG_TIMER_OEM 0x5
253
254 //
255 // Structure definition for timer Use
256 //
257 typedef union {
258 struct {
259 UINT8 TimerUse : 3;
260 UINT8 Reserved : 3;
261 UINT8 TimerRunning : 1;
262 UINT8 TimerUseExpirationFlagLog : 1;
263 } Bits;
264 UINT8 Uint8;
265 } IPMI_WATCHDOG_TIMER_USE;
266
267 //
268 // Definitions for watchdog timeout action
269 //
270 #define IPMI_WATCHDOG_TIMER_ACTION_NO_ACTION 0x0
271 #define IPMI_WATCHDOG_TIMER_ACTION_HARD_RESET 0x1
272 #define IPMI_WATCHDOG_TIMER_ACTION_POWER_DONW 0x2
273 #define IPMI_WATCHDOG_TIMER_ACTION_POWER_CYCLE 0x3
274
275 //
276 // Definitions for watchdog pre-timeout interrupt
277 //
278 #define IPMI_WATCHDOG_PRE_TIMEOUT_INTERRUPT_NONE 0x0
279 #define IPMI_WATCHDOG_PRE_TIMEOUT_INTERRUPT_SMI 0x1
280 #define IPMI_WATCHDOG_PRE_TIMEOUT_INTERRUPT_NMI 0x2
281 #define IPMI_WATCHDOG_PRE_TIMEOUT_INTERRUPT_MESSAGING 0x3
282
283 //
284 // Structure definitions for Timer Actions
285 //
286 typedef union {
287 struct {
288 UINT8 TimeoutAction : 3;
289 UINT8 Reserved1 : 1;
290 UINT8 PreTimeoutInterrupt : 3;
291 UINT8 Reserved2 : 1;
292 } Bits;
293 UINT8 Uint8;
294 } IPMI_WATCHDOG_TIMER_ACTIONS;
295
296 //
297 // Bit definitions for Timer use expiration flags
298 //
299 #define IPMI_WATCHDOG_TIMER_EXPIRATION_FLAG_BIOS_FRB2 BIT1
300 #define IPMI_WATCHDOG_TIMER_EXPIRATION_FLAG_BIOS_POST BIT2
301 #define IPMI_WATCHDOG_TIMER_EXPIRATION_FLAG_OS_LOAD BIT3
302 #define IPMI_WATCHDOG_TIMER_EXPIRATION_FLAG_SMS_OS BIT4
303 #define IPMI_WATCHDOG_TIMER_EXPIRATION_FLAG_OEM BIT5
304
305 typedef struct {
306 IPMI_WATCHDOG_TIMER_USE TimerUse;
307 IPMI_WATCHDOG_TIMER_ACTIONS TimerActions;
308 UINT8 PretimeoutInterval;
309 UINT8 TimerUseExpirationFlagsClear;
310 UINT16 InitialCountdownValue;
311 } IPMI_SET_WATCHDOG_TIMER_REQUEST;
312
313 //
314 // Definitions for Get WatchDog Timer command
315 //
316 #define IPMI_APP_GET_WATCHDOG_TIMER 0x25
317
318 //
319 // Constants and Structure definitions for "Get WatchDog Timer" command to follow here
320 //
321 typedef struct {
322 UINT8 CompletionCode;
323 IPMI_WATCHDOG_TIMER_USE TimerUse;
324 IPMI_WATCHDOG_TIMER_ACTIONS TimerActions;
325 UINT8 PretimeoutInterval;
326 UINT8 TimerUseExpirationFlagsClear;
327 UINT16 InitialCountdownValue;
328 UINT16 PresentCountdownValue;
329 } IPMI_GET_WATCHDOG_TIMER_RESPONSE;
330
331 //
332 // Below is Definitions for IPMI Messaging Support Commands (Chapter 22)
333 //
334
335 //
336 // Definitions for Set BMC Global Enables command
337 //
338 #define IPMI_APP_SET_BMC_GLOBAL_ENABLES 0x2E
339
340 //
341 // Constants and Structure definitions for "Set BMC Global Enables " command to follow here
342 //
343 typedef union {
344 struct {
345 UINT8 ReceiveMessageQueueInterrupt : 1;
346 UINT8 EventMessageBufferFullInterrupt : 1;
347 UINT8 EventMessageBuffer : 1;
348 UINT8 SystemEventLogging : 1;
349 UINT8 Reserved : 1;
350 UINT8 Oem0Enable : 1;
351 UINT8 Oem1Enable : 1;
352 UINT8 Oem2Enable : 1;
353 } Bits;
354 UINT8 Uint8;
355 } IPMI_BMC_GLOBAL_ENABLES;
356
357 typedef struct {
358 IPMI_BMC_GLOBAL_ENABLES SetEnables;
359 } IPMI_SET_BMC_GLOBAL_ENABLES_REQUEST;
360
361 //
362 // Definitions for Get BMC Global Enables command
363 //
364 #define IPMI_APP_GET_BMC_GLOBAL_ENABLES 0x2F
365
366 //
367 // Constants and Structure definitions for "Get BMC Global Enables " command to follow here
368 //
369 typedef struct {
370 UINT8 CompletionCode;
371 IPMI_BMC_GLOBAL_ENABLES GetEnables;
372 } IPMI_GET_BMC_GLOBAL_ENABLES_RESPONSE;
373
374 //
375 // Definitions for Clear Message Flags command
376 //
377 #define IPMI_APP_CLEAR_MESSAGE_FLAGS 0x30
378
379 //
380 // Constants and Structure definitions for "Clear Message Flags" command to follow here
381 //
382 typedef union {
383 struct {
384 UINT8 ReceiveMessageQueue : 1;
385 UINT8 EventMessageBuffer : 1;
386 UINT8 Reserved1 : 1;
387 UINT8 WatchdogPerTimeoutInterrupt : 1;
388 UINT8 Reserved2 : 1;
389 UINT8 Oem0 : 1;
390 UINT8 Oem1 : 1;
391 UINT8 Oem2 : 1;
392 } Bits;
393 UINT8 Uint8;
394 } IPMI_MESSAGE_FLAGS;
395
396 typedef struct {
397 IPMI_MESSAGE_FLAGS ClearFlags;
398 } IPMI_CLEAR_MESSAGE_FLAGS_REQUEST;
399
400 //
401 // Definitions for Get Message Flags command
402 //
403 #define IPMI_APP_GET_MESSAGE_FLAGS 0x31
404
405 //
406 // Constants and Structure definitions for "Get Message Flags" command to follow here
407 //
408 typedef struct {
409 UINT8 CompletionCode;
410 IPMI_MESSAGE_FLAGS GetFlags;
411 } IPMI_GET_MESSAGE_FLAGS_RESPONSE;
412
413 //
414 // Definitions for Enable Message Channel Receive command
415 //
416 #define IPMI_APP_ENABLE_MESSAGE_CHANNEL_RECEIVE 0x32
417
418 //
419 // Constants and Structure definitions for "Enable Message Channel Receive" command to follow here
420 //
421
422 //
423 // Definitions for Get Message command
424 //
425 #define IPMI_APP_GET_MESSAGE 0x33
426
427 //
428 // Constants and Structure definitions for "Get Message" command to follow here
429 //
430 typedef union {
431 struct {
432 UINT8 ChannelNumber : 4;
433 UINT8 InferredPrivilegeLevel : 4;
434 } Bits;
435 UINT8 Uint8;
436 } IPMI_GET_MESSAGE_CHANNEL_NUMBER;
437
438 typedef struct {
439 UINT8 CompletionCode;
440 IPMI_GET_MESSAGE_CHANNEL_NUMBER ChannelNumber;
441 UINT8 MessageData[0];
442 } IPMI_GET_MESSAGE_RESPONSE;
443
444 //
445 // Definitions for Send Message command
446 //
447 #define IPMI_APP_SEND_MESSAGE 0x34
448
449 //
450 // Constants and Structure definitions for "Send Message" command to follow here
451 //
452 typedef union {
453 struct {
454 UINT8 ChannelNumber : 4;
455 UINT8 Authentication : 1;
456 UINT8 Encryption : 1;
457 UINT8 Tracking : 2;
458 } Bits;
459 UINT8 Uint8;
460 } IPMI_SEND_MESSAGE_CHANNEL_NUMBER;
461
462 typedef struct {
463 UINT8 CompletionCode;
464 IPMI_SEND_MESSAGE_CHANNEL_NUMBER ChannelNumber;
465 UINT8 MessageData[0];
466 } IPMI_SEND_MESSAGE_REQUEST;
467
468 typedef struct {
469 UINT8 CompletionCode;
470 UINT8 ResponseData[0];
471 } IPMI_SEND_MESSAGE_RESPONSE;
472
473 //
474 // Definitions for Read Event Message Buffer command
475 //
476 #define IPMI_APP_READ_EVENT_MSG_BUFFER 0x35
477
478 //
479 // Constants and Structure definitions for "Read Event Message Buffer" command to follow here
480 //
481
482 //
483 // Definitions for Get BT Interface Capabilities command
484 //
485 #define IPMI_APP_GET_BT_INTERFACE_CAPABILITY 0x36
486
487 //
488 // Constants and Structure definitions for "Get BT Interface Capabilities" command to follow here
489 //
490
491 //
492 // Definitions for Get System GUID command
493 //
494 #define IPMI_APP_GET_SYSTEM_GUID 0x37
495
496 //
497 // Constants and Structure definitions for "Get System GUID" command to follow here
498 //
499
500 //
501 // Definitions for Get Channel Authentication Capabilities command
502 //
503 #define IPMI_APP_GET_CHANNEL_AUTHENTICATION_CAPABILITIES 0x38
504
505 //
506 // Constants and Structure definitions for "Get Channel Authentication Capabilities" command to follow here
507 //
508
509 //
510 // Definitions for Get Session Challenge command
511 //
512 #define IPMI_APP_GET_SESSION_CHALLENGE 0x39
513
514 //
515 // Constants and Structure definitions for "Get Session Challenge" command to follow here
516 //
517
518 //
519 // Definitions for Activate Session command
520 //
521 #define IPMI_APP_ACTIVATE_SESSION 0x3A
522
523 //
524 // Constants and Structure definitions for "Activate Session" command to follow here
525 //
526
527 //
528 // Definitions for Set Session Privelege Level command
529 //
530 #define IPMI_APP_SET_SESSION_PRIVELEGE_LEVEL 0x3B
531
532 //
533 // Constants and Structure definitions for "Set Session Privelege Level" command to follow here
534 //
535
536 //
537 // Definitions for Close Session command
538 //
539 #define IPMI_APP_CLOSE_SESSION 0x3C
540
541 //
542 // Constants and Structure definitions for "Close Session" command to follow here
543 //
544
545 //
546 // Definitions for Get Session Info command
547 //
548 #define IPMI_APP_GET_SESSION_INFO 0x3D
549
550 //
551 // Constants and Structure definitions for "Get Session Info" command to follow here
552 //
553
554 //
555 // Definitions for Get Auth Code command
556 //
557 #define IPMI_APP_GET_AUTHCODE 0x3F
558
559 //
560 // Constants and Structure definitions for "Get AuthCode" command to follow here
561 //
562
563 //
564 // Definitions for Set Channel Access command
565 //
566 #define IPMI_APP_SET_CHANNEL_ACCESS 0x40
567
568 //
569 // Constants and Structure definitions for "Set Channel Access" command to follow here
570 //
571
572 //
573 // Definitions for Get Channel Access command
574 //
575 #define IPMI_APP_GET_CHANNEL_ACCESS 0x41
576
577 //
578 // Constants and Structure definitions for "Get Channel Access" command to follow here
579 //
580
581 //
582 // Definitions for channel access memory type in Get Channel Access command request
583 //
584 #define IPMI_CHANNEL_ACCESS_MEMORY_TYPE_NON_VOLATILE 0x1
585 #define IPMI_CHANNEL_ACCESS_MEMORY_TYPE_PRESENT_VOLATILE_SETTING 0x2
586
587 //
588 // Definitions for channel access modes in Get Channel Access command response
589 //
590 #define IPMI_CHANNEL_ACCESS_MODES_DISABLED 0x0
591 #define IPMI_CHANNEL_ACCESS_MODES_PRE_BOOT_ONLY 0x1
592 #define IPMI_CHANNEL_ACCESS_MODES_ALWAYS_AVAILABLE 0x2
593 #define IPMI_CHANNEL_ACCESS_MODES_SHARED 0x3
594
595 typedef union {
596 struct {
597 UINT8 ChannelNo : 4;
598 UINT8 Reserved : 4;
599 } Bits;
600 UINT8 Uint8;
601 } IPMI_GET_CHANNEL_ACCESS_CHANNEL_NUMBER;
602
603 typedef union {
604 struct {
605 UINT8 Reserved : 6;
606 UINT8 MemoryType : 2;
607 } Bits;
608 UINT8 Uint8;
609 } IPMI_GET_CHANNEL_ACCESS_TYPE;
610
611 typedef struct {
612 IPMI_GET_CHANNEL_ACCESS_CHANNEL_NUMBER ChannelNumber;
613 IPMI_GET_CHANNEL_ACCESS_TYPE AccessType;
614 } IPMI_GET_CHANNEL_ACCESS_REQUEST;
615
616 typedef union {
617 struct {
618 UINT8 AccessMode : 3;
619 UINT8 UserLevelAuthEnabled : 1;
620 UINT8 MessageAuthEnable : 1;
621 UINT8 Alert : 1;
622 UINT8 Reserved : 2;
623 } Bits;
624 UINT8 Uint8;
625 } IPMI_GET_CHANNEL_ACCESS_CHANNEL_ACCESS;
626
627 typedef union {
628 struct {
629 UINT8 ChannelPriviledgeLimit : 4;
630 UINT8 Reserved : 4;
631 } Bits;
632 UINT8 Uint8;
633 } IPMI_GET_CHANNEL_ACCESS_PRIVILEGE_LIMIT;
634
635 typedef struct {
636 UINT8 CompletionCode;
637 IPMI_GET_CHANNEL_ACCESS_CHANNEL_ACCESS ChannelAccess;
638 IPMI_GET_CHANNEL_ACCESS_PRIVILEGE_LIMIT PrivilegeLimit;
639 } IPMI_GET_CHANNEL_ACCESS_RESPONSE;
640
641 //
642 // Definitions for Get Channel Info command
643 //
644 #define IPMI_APP_GET_CHANNEL_INFO 0x42
645
646 //
647 // Constants and Structure definitions for "Get Channel Info" command to follow here
648 //
649
650 //
651 // Definitions for channel media type
652 //
653 // IPMB (I2C)
654 #define IPMI_CHANNEL_MEDIA_TYPE_IPMB 0x1
655 // ICMB v1.0
656 #define IPMI_CHANNEL_MEDIA_TYPE_ICMB_1_0 0x2
657 // ICMB v0.9
658 #define IPMI_CHANNEL_MEDIA_TYPE_ICMB_0_9 0x3
659 // 802.3 LAN
660 #define IPMI_CHANNEL_MEDIA_TYPE_802_3_LAN 0x4
661 // Asynch. Serial/Modem (RS-232)
662 #define IPMI_CHANNEL_MEDIA_TYPE_RS_232 0x5
663 // Other LAN
664 #define IPMI_CHANNEL_MEDIA_TYPE_OTHER_LAN 0x6
665 // PCI SMBus
666 #define IPMI_CHANNEL_MEDIA_TYPE_PCI_SM_BUS 0x7
667 // SMBus v1.0/1.1
668 #define IPMI_CHANNEL_MEDIA_TYPE_SM_BUS_V1 0x8
669 // SMBus v2.0
670 #define IPMI_CHANNEL_MEDIA_TYPE_SM_BUS_V2 0x9
671 // USB 1.x
672 #define IPMI_CHANNEL_MEDIA_TYPE_USB1 0xA
673 // USB 2.x
674 #define IPMI_CHANNEL_MEDIA_TYPE_USB2 0xB
675 // System Interface (KCS, SMIC, or BT)
676 #define IPMI_CHANNEL_MEDIA_TYPE_SYSTEM_INTERFACE 0xC
677 // OEM
678 #define IPMI_CHANNEL_MEDIA_TYPE_OEM_START 0x60
679 #define IPMI_CHANNEL_MEDIA_TYPE_OEM_END 0x7F
680
681 typedef union {
682 struct {
683 UINT8 ChannelNo : 4;
684 UINT8 Reserved : 4;
685 } Bits;
686 UINT8 Uint8;
687 } IPMI_CHANNEL_INFO_CHANNEL_NUMBER;
688
689 typedef union {
690 struct {
691 UINT8 ChannelMediumType : 7;
692 UINT8 Reserved : 1;
693 } Bits;
694 UINT8 Uint8;
695 } IPMI_CHANNEL_INFO_MEDIUM_TYPE;
696
697 typedef union {
698 struct {
699 UINT8 ChannelProtocolType : 5;
700 UINT8 Reserved : 3;
701 } Bits;
702 UINT8 Uint8;
703 } IPMI_CHANNEL_INFO_PROTOCOL_TYPE;
704
705 typedef union {
706 struct {
707 UINT8 ActiveSessionCount : 6;
708 UINT8 SessionSupport : 2;
709 } Bits;
710 UINT8 Uint8;
711 } IPMI_CHANNEL_INFO_SESSION_SUPPORT;
712
713 typedef struct {
714 UINT8 CompletionCode;
715 IPMI_CHANNEL_INFO_CHANNEL_NUMBER ChannelNumber;
716 IPMI_CHANNEL_INFO_MEDIUM_TYPE MediumType;
717 IPMI_CHANNEL_INFO_PROTOCOL_TYPE ProtocolType;
718 IPMI_CHANNEL_INFO_SESSION_SUPPORT SessionSupport;
719 UINT8 VendorId[3];
720 UINT16 AuxChannelInfo;
721 } IPMI_GET_CHANNEL_INFO_RESPONSE;
722
723 //
724 // Definitions for Get Channel Info command
725 //
726 #define IPMI_APP_GET_CHANNEL_INFO 0x42
727
728 //
729 // Constants and Structure definitions for "Get Channel Info" command to follow here
730 //
731
732 //
733 // Definitions for Set User Access command
734 //
735 #define IPMI_APP_SET_USER_ACCESS 0x43
736
737 //
738 // Constants and Structure definitions for "Set User Access" command to follow here
739 //
740
741 //
742 // Definitions for Get User Access command
743 //
744 #define IPMI_APP_GET_USER_ACCESS 0x44
745
746 //
747 // Constants and Structure definitions for "Get User Access" command to follow here
748 //
749 typedef union {
750 struct {
751 UINT8 ChannelNo : 4;
752 UINT8 Reserved : 4;
753 } Bits;
754 UINT8 Uint8;
755 } IPMI_GET_USER_ACCESS_CHANNEL_NUMBER;
756
757 typedef union {
758 struct {
759 UINT8 UserId : 6;
760 UINT8 Reserved : 2;
761 } Bits;
762 UINT8 Uint8;
763 } IPMI_USER_ID;
764
765 typedef struct {
766 IPMI_GET_USER_ACCESS_CHANNEL_NUMBER ChannelNumber;
767 IPMI_USER_ID UserId;
768 } IPMI_GET_USER_ACCESS_REQUEST;
769
770 typedef union {
771 struct {
772 UINT8 MaxUserId : 6;
773 UINT8 Reserved : 2;
774 } Bits;
775 UINT8 Uint8;
776 } IPMI_GET_USER_ACCESS_MAX_USER_ID;
777
778 typedef union {
779 struct {
780 UINT8 CurrentUserId : 6;
781 UINT8 UserIdEnableStatus : 2;
782 } Bits;
783 UINT8 Uint8;
784 } IPMI_GET_USER_ACCESS_CURRENT_USER;
785
786 typedef union {
787 struct {
788 UINT8 FixedUserId : 6;
789 UINT8 Reserved : 2;
790 } Bits;
791 UINT8 Uint8;
792 } IPMI_GET_USER_ACCESS_FIXED_NAME_USER;
793
794 typedef union {
795 struct {
796 UINT8 UserPrivilegeLimit : 4;
797 UINT8 EnableIpmiMessaging : 1;
798 UINT8 EnableUserLinkAuthetication : 1;
799 UINT8 UserAccessAvailable : 1;
800 UINT8 Reserved : 1;
801 } Bits;
802 UINT8 Uint8;
803 } IPMI_GET_USER_ACCESS_CHANNEL_ACCESS;
804
805 typedef struct {
806 UINT8 CompletionCode;
807 IPMI_GET_USER_ACCESS_MAX_USER_ID MaxUserId;
808 IPMI_GET_USER_ACCESS_CURRENT_USER CurrentUser;
809 IPMI_GET_USER_ACCESS_FIXED_NAME_USER FixedNameUser;
810 IPMI_GET_USER_ACCESS_CHANNEL_ACCESS ChannelAccess;
811 } IPMI_GET_USER_ACCESS_RESPONSE;
812
813 //
814 // Definitions for Set User Name command
815 //
816 #define IPMI_APP_SET_USER_NAME 0x45
817
818 //
819 // Constants and Structure definitions for "Set User Name" command to follow here
820 //
821 typedef struct {
822 IPMI_USER_ID UserId;
823 UINT8 UserName[16];
824 } IPMI_SET_USER_NAME_REQUEST;
825
826 //
827 // Definitions for Get User Name command
828 //
829 #define IPMI_APP_GET_USER_NAME 0x46
830
831 //
832 // Constants and Structure definitions for "Get User Name" command to follow here
833 //
834 typedef struct {
835 IPMI_USER_ID UserId;
836 } IPMI_GET_USER_NAME_REQUEST;
837
838 typedef struct {
839 UINT8 CompletionCode;
840 UINT8 UserName[16];
841 } IPMI_GET_USER_NAME_RESPONSE;
842
843 //
844 // Definitions for Set User Password command
845 //
846 #define IPMI_APP_SET_USER_PASSWORD 0x47
847
848 //
849 // Constants and Structure definitions for "Set User Password" command to follow here
850 //
851
852 //
853 // Definitions for Set User password command operation type
854 //
855 #define IPMI_SET_USER_PASSWORD_OPERATION_TYPE_DISABLE_USER 0x0
856 #define IPMI_SET_USER_PASSWORD_OPERATION_TYPE_ENABLE_USER 0x1
857 #define IPMI_SET_USER_PASSWORD_OPERATION_TYPE_SET_PASSWORD 0x2
858 #define IPMI_SET_USER_PASSWORD_OPERATION_TYPE_TEST_PASSWORD 0x3
859
860 //
861 // Definitions for Set user password command password size
862 //
863 #define IPMI_SET_USER_PASSWORD_PASSWORD_SIZE_16 0x0
864 #define IPMI_SET_USER_PASSWORD_PASSWORD_SIZE_20 0x1
865
866 typedef union {
867 struct {
868 UINT8 UserId : 6;
869 UINT8 Reserved : 1;
870 UINT8 PasswordSize : 1;
871 } Bits;
872 UINT8 Uint8;
873 } IPMI_SET_USER_PASSWORD_USER_ID;
874
875 typedef union {
876 struct {
877 UINT8 Operation : 2;
878 UINT8 Reserved : 6;
879 } Bits;
880 UINT8 Uint8;
881 } IPMI_SET_USER_PASSWORD_OPERATION;
882
883 typedef struct {
884 IPMI_SET_USER_PASSWORD_USER_ID UserId;
885 IPMI_SET_USER_PASSWORD_OPERATION Operation;
886 UINT8 PasswordData[0]; // 16 or 20 bytes, depending on the 'PasswordSize' field
887 } IPMI_SET_USER_PASSWORD_REQUEST;
888
889 //
890 // Below is Definitions for RMCP+ Support and Payload Commands (Chapter 24)
891 //
892
893 //
894 // Definitions for Activate Payload command
895 //
896 #define IPMI_APP_ACTIVATE_PAYLOAD 0x48
897
898 //
899 // Constants and Structure definitions for "Activate Payload" command to follow here
900 //
901
902 //
903 // Definitions for De-Activate Payload command
904 //
905 #define IPMI_APP_DEACTIVATE_PAYLOAD 0x49
906
907 //
908 // Constants and Structure definitions for "DeActivate Payload" command to follow here
909 //
910
911 //
912 // Definitions for Get Payload activation Status command
913 //
914 #define IPMI_APP_GET_PAYLOAD_ACTIVATION_STATUS 0x4a
915
916 //
917 // Constants and Structure definitions for "Get Payload activation Status" command to follow here
918 //
919
920 //
921 // Definitions for Get Payload Instance Info command
922 //
923 #define IPMI_APP_GET_PAYLOAD_INSTANCE_INFO 0x4b
924
925 //
926 // Constants and Structure definitions for "Get Payload Instance Info" command to follow here
927 //
928
929 //
930 // Definitions for Set User Payload Access command
931 //
932 #define IPMI_APP_SET_USER_PAYLOAD_ACCESS 0x4C
933
934 //
935 // Constants and Structure definitions for "Set User Payload Access" command to follow here
936 //
937
938 //
939 // Definitions for Get User Payload Access command
940 //
941 #define IPMI_APP_GET_USER_PAYLOAD_ACCESS 0x4D
942
943 //
944 // Constants and Structure definitions for "Get User Payload Access" command to follow here
945 //
946
947 //
948 // Definitions for Get Channel Payload Support command
949 //
950 #define IPMI_APP_GET_CHANNEL_PAYLOAD_SUPPORT 0x4E
951
952 //
953 // Constants and Structure definitions for "Get Channel Payload Support" command to follow here
954 //
955
956 //
957 // Definitions for Get Channel Payload Version command
958 //
959 #define IPMI_APP_GET_CHANNEL_PAYLOAD_VERSION 0x4F
960
961 //
962 // Constants and Structure definitions for "Get Channel Payload Version" command to follow here
963 //
964
965 //
966 // Definitions for Get Channel OEM Payload Info command
967 //
968 #define IPMI_APP_GET_CHANNEL_OEM_PAYLOAD_INFO 0x50
969
970 //
971 // Constants and Structure definitions for "Get Channel OEM Payload Info" command to follow here
972 //
973
974 //
975 // Definitions for Master Write-Read command
976 //
977 #define IPMI_APP_MASTER_WRITE_READ 0x52
978
979 //
980 // Constants and Structure definitions for "Master Write Read" command to follow here
981 //
982
983 //
984 // Definitions for Get Channel Cipher Suites command
985 //
986 #define IPMI_APP_GET_CHANNEL_CIPHER_SUITES 0x54
987
988 //
989 // Constants and Structure definitions for "Get Channel Cipher Suites" command to follow here
990 //
991
992 //
993 // Below is Definitions for RMCP+ Support and Payload Commands (Chapter 24, Section 3)
994 //
995
996 //
997 // Definitions for Suspend-Resume Payload Encryption command
998 //
999 #define IPMI_APP_SUSPEND_RESUME_PAYLOAD_ENCRYPTION 0x55
1000
1001 //
1002 // Constants and Structure definitions for "Suspend-Resume Payload Encryption" command to follow here
1003 //
1004
1005 //
1006 // Below is Definitions for IPMI Messaging Support Commands (Chapter 22, Section 25 and 9)
1007 //
1008
1009 //
1010 // Definitions for Set Channel Security Keys command
1011 //
1012 #define IPMI_APP_SET_CHANNEL_SECURITY_KEYS 0x56
1013
1014 //
1015 // Constants and Structure definitions for "Set Channel Security Keys" command to follow here
1016 //
1017
1018 //
1019 // Definitions for Get System Interface Capabilities command
1020 //
1021 #define IPMI_APP_GET_SYSTEM_INTERFACE_CAPABILITIES 0x57
1022
1023 //
1024 // Constants and Structure definitions for "Get System Interface Capabilities" command to follow here
1025 //
1026
1027 //
1028 // Definitions for Get System Interface Capabilities command SSIF transaction support
1029 //
1030 #define IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_SSIF_TRANSACTION_SUPPORT_SINGLE_PARTITION_RW 0x0
1031 #define IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_SSIF_TRANSACTION_SUPPORT_MULTI_PARTITION_RW 0x1
1032 #define IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_SSIF_TRANSACTION_SUPPORT_MULTI_PARTITION_RW_WITH_MIDDLE 0x2
1033
1034 #pragma pack()
1035 #endif