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