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