]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h
548339286f187b3732878719adbbab6261fd56c5
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / IpmiNetFnStorage.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 Storage commands, including:
5 FRU Inventory Commands (Chapter 34)
6 SDR Repository (Chapter 33)
7 System Event Log(SEL) Commands (Chapter 31)
8 SEL Record Formats (Chapter 32)
9
10 See IPMI specification, Appendix G, Command Assignments
11 and Appendix H, Sub-function Assignments.
12
13 Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>
14 This program and the accompanying materials
15 are licensed and made available under the terms and conditions of the BSD License
16 which accompanies this distribution. The full text of the license may be found at
17 http://opensource.org/licenses/bsd-license.php
18
19 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
20 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 **/
22
23 #ifndef _IPMI_NET_FN_STORAGE_H_
24 #define _IPMI_NET_FN_STORAGE_H_
25
26 #pragma pack(1)
27 //
28 // Net function definition for Storage command
29 //
30 #define IPMI_NETFN_STORAGE 0x0A
31
32 //
33 // All Storage commands and their structure definitions to follow here
34 //
35
36 //
37 // Below is Definitions for FRU Inventory Commands (Chapter 34)
38 //
39
40 //
41 // Definitions for Get Fru Inventory Area Info command
42 //
43 #define IPMI_STORAGE_GET_FRU_INVENTORY_AREAINFO 0x10
44
45 //
46 // Constants and Structure definitions for "Get Fru Inventory Area Info" command to follow here
47 //
48 typedef struct {
49 UINT8 DeviceId;
50 } IPMI_GET_FRU_INVENTORY_AREA_INFO_REQUEST;
51
52 typedef struct {
53 UINT8 CompletionCode;
54 UINT16 InventoryAreaSize;
55 UINT8 AccessType;
56 } IPMI_GET_FRU_INVENTORY_AREA_INFO_RESPONSE;
57
58 //
59 // Definitions for Read Fru Data command
60 //
61 #define IPMI_STORAGE_READ_FRU_DATA 0x11
62
63 //
64 // Constants and Structure definitions for "Read Fru Data" command to follow here
65 //
66 typedef struct {
67 UINT8 FruDeviceId;
68 UINT16 FruOffset;
69 } IPMI_FRU_COMMON_DATA;
70
71 typedef struct {
72 IPMI_FRU_COMMON_DATA Data;
73 UINT8 Count;
74 } IPMI_FRU_READ_COMMAND;
75
76 typedef struct {
77 UINT8 DeviceId;
78 UINT16 InventoryOffset;
79 UINT8 CountToRead;
80 } IPMI_READ_FRU_DATA_REQUEST;
81
82 typedef struct {
83 UINT8 CompletionCode;
84 UINT8 CountReturned;
85 UINT8 Data[0];
86 } IPMI_READ_FRU_DATA_RESPONSE;
87
88 //
89 // Definitions for Write Fru Data command
90 //
91 #define IPMI_STORAGE_WRITE_FRU_DATA 0x12
92
93 //
94 // Constants and Structure definitions for "Write Fru Data" command to follow here
95 //
96 typedef struct {
97 IPMI_FRU_COMMON_DATA Data;
98 UINT8 FruData[16];
99 } IPMI_FRU_WRITE_COMMAND;
100
101 typedef struct {
102 UINT8 DeviceId;
103 UINT16 InventoryOffset;
104 UINT8 Data[0];
105 } IPMI_WRITE_FRU_DATA_REQUEST;
106
107 typedef struct {
108 UINT8 CompletionCode;
109 UINT8 CountWritten;
110 } IPMI_WRITE_FRU_DATA_RESPONSE;
111
112 //
113 // Below is Definitions for SDR Repository (Chapter 33)
114 //
115
116 //
117 // Definitions for Get SDR Repository Info command
118 //
119 #define IPMI_STORAGE_GET_SDR_REPOSITORY_INFO 0x20
120
121 //
122 // Constants and Structure definitions for "Get SDR Repository Info" command to follow here
123 //
124 typedef union {
125 struct {
126 UINT8 SdrRepAllocInfoCmd : 1;
127 UINT8 SdrRepReserveCmd : 1;
128 UINT8 PartialAddSdrCmd : 1;
129 UINT8 DeleteSdrRepCmd : 1;
130 UINT8 Reserved : 1;
131 UINT8 SdrRepUpdateOp : 2;
132 UINT8 Overflow : 1;
133 } Bits;
134 UINT8 Uint8;
135 } IPMI_SDR_OPERATION_SUPPORT;
136
137 typedef struct {
138 UINT8 CompletionCode;
139 UINT8 Version;
140 UINT16 RecordCount;
141 UINT16 FreeSpace;
142 UINT32 RecentAdditionTimeStamp;
143 UINT32 RecentEraseTimeStamp;
144 IPMI_SDR_OPERATION_SUPPORT OperationSupport;
145 } IPMI_GET_SDR_REPOSITORY_INFO_RESPONSE;
146
147 //
148 // Definitions for Get SDR Repository Allocateion Info command
149 //
150 #define IPMI_STORAGE_GET_SDR_REPOSITORY_ALLOCATION_INFO 0x21
151
152 //
153 // Constants and Structure definitions for "Get SDR Repository Allocateion Info" command to follow here
154 //
155
156 //
157 // Definitions for Reserve SDR Repository command
158 //
159 #define IPMI_STORAGE_RESERVE_SDR_REPOSITORY 0x22
160
161 //
162 // Constants and Structure definitions for "Reserve SDR Repository" command to follow here
163 //
164 typedef struct {
165 UINT8 CompletionCode;
166 UINT8 ReservationId[2]; // Reservation ID. LS byte first.
167 } IPMI_RESERVE_SDR_REPOSITORY_RESPONSE;
168
169 //
170 // Definitions for Get SDR command
171 //
172 #define IPMI_STORAGE_GET_SDR 0x23
173
174 //
175 // Constants and Structure definitions for "Get SDR" command to follow here
176 //
177 typedef union {
178 struct {
179 UINT8 EventScanningEnabled : 1;
180 UINT8 EventScanningDisabled : 1;
181 UINT8 InitSensorType : 1;
182 UINT8 InitHysteresis : 1;
183 UINT8 InitThresholds : 1;
184 UINT8 InitEvent : 1;
185 UINT8 InitScanning : 1;
186 UINT8 SettableSensor : 1;
187 } Bits;
188 UINT8 Uint8;
189 } IPMI_SDR_RECORD_SENSOR_INIT;
190
191 typedef union {
192 struct {
193 UINT8 EventMessageControl : 2;
194 UINT8 ThresholdAccessSupport : 2;
195 UINT8 HysteresisSupport : 2;
196 UINT8 ReArmSupport : 1;
197 UINT8 IgnoreSensor : 1;
198 } Bits;
199 UINT8 Uint8;
200 } IPMI_SDR_RECORD_SENSOR_CAP;
201
202 typedef union {
203 struct {
204 UINT8 Linearization : 7;
205 UINT8 Reserved : 1;
206 } Bits;
207 UINT8 Uint8;
208 } IPMI_SDR_RECORD_LINEARIZATION;
209
210 typedef union {
211 struct {
212 UINT8 Toleremce : 6;
213 UINT8 MHi : 2;
214 } Bits;
215 UINT8 Uint8;
216 } IPMI_SDR_RECORD_M_TOLERANCE;
217
218 typedef union {
219 struct {
220 UINT8 AccuracyLow : 6;
221 UINT8 BHi : 2;
222 } Bits;
223 UINT8 Uint8;
224 } IPMI_SDR_RECORD_B_ACCURACY;
225
226 typedef union {
227 struct {
228 UINT8 Reserved : 2;
229 UINT8 AccuracyExp : 2;
230 UINT8 AccuracyHi : 4;
231 } Bits;
232 UINT8 Uint8;
233 } IPMI_SDR_RECORD_ACCURACY_SENSOR_DIR;
234
235 typedef union {
236 struct {
237 UINT8 BExp : 4;
238 UINT8 RExp : 4;
239 } Bits;
240 UINT8 Uint8;
241 } IPMI_SDR_RECORD_R_EXP_B_EXP;
242
243 typedef union {
244 struct {
245 UINT8 NominalReadingSpscified : 1;
246 UINT8 NominalMaxSpscified : 1;
247 UINT8 NominalMinSpscified : 1;
248 UINT8 Reserved : 5;
249 } Bits;
250 UINT8 Uint8;
251 } IPMI_SDR_RECORD_ANALOG_FLAGS;
252
253 typedef struct {
254 UINT16 RecordId; // 1
255 UINT8 Version; // 3
256 UINT8 RecordType; // 4
257 UINT8 RecordLength; // 5
258 UINT8 OwnerId; // 6
259 UINT8 OwnerLun; // 7
260 UINT8 SensorNumber; // 8
261 UINT8 EntityId; // 9
262 UINT8 EntityInstance; // 10
263 IPMI_SDR_RECORD_SENSOR_INIT SensorInitialization; // 11
264 IPMI_SDR_RECORD_SENSOR_CAP SensorCapabilities; // 12
265 UINT8 SensorType; // 13
266 UINT8 EventType; // 14
267 UINT8 Reserved1[7]; // 15
268 UINT8 UnitType; // 22
269 UINT8 Reserved2; // 23
270 IPMI_SDR_RECORD_LINEARIZATION Linearization; // 24
271 UINT8 MLo; // 25
272 IPMI_SDR_RECORD_M_TOLERANCE MHiTolerance; // 26
273 UINT8 BLo; // 27
274 IPMI_SDR_RECORD_B_ACCURACY BHiAccuracyLo; // 28
275 IPMI_SDR_RECORD_ACCURACY_SENSOR_DIR AccuracySensorDirection; // 29
276 IPMI_SDR_RECORD_R_EXP_B_EXP RExpBExp; // 30
277 IPMI_SDR_RECORD_ANALOG_FLAGS AnalogFlags; // 31
278 UINT8 NominalReading; // 32
279 UINT8 Reserved3[4]; // 33
280 UINT8 UpperNonRecoverThreshold; // 37
281 UINT8 UpperCriticalThreshold; // 38
282 UINT8 UpperNonCriticalThreshold; // 39
283 UINT8 LowerNonRecoverThreshold; // 40
284 UINT8 LowerCriticalThreshold; // 41
285 UINT8 LowerNonCriticalThreshold; // 42
286 UINT8 Reserved4[5]; // 43
287 UINT8 IdStringLength; // 48
288 UINT8 AsciiIdString[16]; // 49 - 64
289 } IPMI_SDR_RECORD_STRUCT_1;
290
291 typedef struct {
292 UINT16 RecordId; // 1
293 UINT8 Version; // 3
294 UINT8 RecordType; // 4
295 UINT8 RecordLength; // 5
296 UINT8 OwnerId; // 6
297 UINT8 OwnerLun; // 7
298 UINT8 SensorNumber; // 8
299 UINT8 EntityId; // 9
300 UINT8 EntityInstance; // 10
301 IPMI_SDR_RECORD_SENSOR_INIT SensorInitialization; // 11
302 IPMI_SDR_RECORD_SENSOR_CAP SensorCapabilities; // 12
303 UINT8 SensorType; // 13
304 UINT8 EventType; // 14
305 UINT8 Reserved1[7]; // 15
306 UINT8 UnitType; // 22
307 UINT8 Reserved2[9]; // 23
308 UINT8 IdStringLength; // 32
309 UINT8 AsciiIdString[16]; // 33 - 48
310 } IPMI_SDR_RECORD_STRUCT_2;
311
312 typedef union {
313 struct {
314 UINT8 Reserved1 : 1;
315 UINT8 ControllerSlaveAddress : 7;
316 UINT8 FruDeviceId;
317 UINT8 BusId : 3;
318 UINT8 Lun : 2;
319 UINT8 Reserved2 : 2;
320 UINT8 LogicalFruDevice : 1;
321 UINT8 Reserved3 : 4;
322 UINT8 ChannelNumber : 4;
323 } Bits;
324 UINT32 Uint32;
325 } IPMI_FRU_DATA_INFO;
326
327 typedef union {
328 struct {
329 UINT8 Length : 4;
330 UINT8 Reserved : 1;
331 UINT8 StringType : 3;
332 } Bits;
333 UINT8 Uint8;
334 } IPMI_SDR_RECORD_DEV_ID_STR_TYPE_LENGTH;
335
336 typedef struct {
337 UINT16 RecordId; // 1
338 UINT8 Version; // 3
339 UINT8 RecordType; // 4
340 UINT8 RecordLength; // 5
341 IPMI_FRU_DATA_INFO FruDeviceData; // 6
342 UINT8 Reserved; // 10
343 UINT8 DeviceType; // 11
344 UINT8 DeviceTypeModifier; // 12
345 UINT8 FruEntityId; // 13
346 UINT8 FruEntityInstance; // 14
347 UINT8 OemReserved; // 15
348 IPMI_SDR_RECORD_DEV_ID_STR_TYPE_LENGTH StringTypeLength; // 16
349 UINT8 String[16]; // 17
350 } IPMI_SDR_RECORD_STRUCT_11;
351
352 typedef struct {
353 UINT16 RecordId; //1
354 UINT8 Version; //3
355 UINT8 RecordType; //4
356 UINT8 RecordLength; //5
357 UINT8 ManufacturerId[3]; //6
358 UINT8 StringChars[20];
359 } IPMI_SDR_RECORD_STRUCT_C0;
360
361 typedef struct {
362 UINT16 RecordId; //1
363 UINT8 Version; //3
364 UINT8 RecordType; //4
365 UINT8 RecordLength; //5
366 } IPMI_SDR_RECORD_STRUCT_HEADER;
367
368 typedef union {
369 IPMI_SDR_RECORD_STRUCT_1 SensorType1;
370 IPMI_SDR_RECORD_STRUCT_2 SensorType2;
371 IPMI_SDR_RECORD_STRUCT_11 SensorType11;
372 IPMI_SDR_RECORD_STRUCT_C0 SensorTypeC0;
373 IPMI_SDR_RECORD_STRUCT_HEADER SensorHeader;
374 } IPMI_SENSOR_RECORD_STRUCT;
375
376 typedef struct {
377 UINT16 ReservationId;
378 UINT16 RecordId;
379 UINT8 RecordOffset;
380 UINT8 BytesToRead;
381 } IPMI_GET_SDR_REQUEST;
382
383 typedef struct {
384 UINT8 CompletionCode;
385 UINT16 NextRecordId;
386 IPMI_SENSOR_RECORD_STRUCT RecordData;
387 } IPMI_GET_SDR_RESPONSE;
388
389 //
390 // Definitions for Add SDR command
391 //
392 #define IPMI_STORAGE_ADD_SDR 0x24
393
394 //
395 // Constants and Structure definitions for "Add SDR" command to follow here
396 //
397
398 //
399 // Definitions for Partial Add SDR command
400 //
401 #define IPMI_STORAGE_PARTIAL_ADD_SDR 0x25
402
403 //
404 // Constants and Structure definitions for "Partial Add SDR" command to follow here
405 //
406
407 //
408 // Definitions for Delete SDR command
409 //
410 #define IPMI_STORAGE_DELETE_SDR 0x26
411
412 //
413 // Constants and Structure definitions for "Delete SDR" command to follow here
414 //
415
416 //
417 // Definitions for Clear SDR Repository command
418 //
419 #define IPMI_STORAGE_CLEAR_SDR 0x27
420
421 //
422 // Constants and Structure definitions for "Clear SDR Repository" command to follow here
423 //
424
425 //
426 // Definitions for Get SDR Repository Time command
427 //
428 #define IPMI_STORAGE_GET_SDR_REPOSITORY_TIME 0x28
429
430 //
431 // Constants and Structure definitions for "Get SDR Repository Time" command to follow here
432 //
433
434 //
435 // Definitions for Set SDR Repository Time command
436 //
437 #define IPMI_STORAGE_SET_SDR_REPOSITORY_TIME 0x29
438
439 //
440 // Constants and Structure definitions for "Set SDR Repository Time" command to follow here
441 //
442
443 //
444 // Definitions for Enter SDR Repository Update Mode command
445 //
446 #define IPMI_STORAGE_ENTER_SDR_UPDATE_MODE 0x2A
447
448 //
449 // Constants and Structure definitions for "Enter SDR Repository Update Mode" command to follow here
450 //
451
452 //
453 // Definitions for Exit SDR Repository Update Mode command
454 //
455 #define IPMI_STORAGE_EXIT_SDR_UPDATE_MODE 0x2B
456
457 //
458 // Constants and Structure definitions for "Exit SDR Repository Update Mode" command to follow here
459 //
460
461 //
462 // Definitions for Run Initialize Agent command
463 //
464 #define IPMI_STORAGE_RUN_INIT_AGENT 0x2C
465
466 //
467 // Constants and Structure definitions for "Run Initialize Agent" command to follow here
468 //
469
470 //
471 // Below is Definitions for System Event Log(SEL) Commands (Chapter 31)
472 //
473
474 //
475 // Definitions for Get SEL Info command
476 //
477 #define IPMI_STORAGE_GET_SEL_INFO 0x40
478
479 //
480 // Constants and Structure definitions for "Get SEL Info" command to follow here
481 //
482 #define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_GET_SEL_ALLOCATION_INFO_CMD BIT0
483 #define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_RESERVE_SEL_CMD BIT1
484 #define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_PARTIAL_ADD_SEL_ENTRY_CMD BIT2
485 #define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_DELETE_SEL_CMD BIT3
486 #define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_OVERFLOW_FLAG BIT7
487
488 typedef struct {
489 UINT8 CompletionCode;
490 UINT8 Version; // Version of SEL
491 UINT16 NoOfEntries; // No of Entries in the SEL
492 UINT16 FreeSpace; // Free space in Bytes
493 UINT32 RecentAddTimeStamp; // Most Recent Addition of Time Stamp
494 UINT32 RecentEraseTimeStamp; // Most Recent Erasure of Time Stamp
495 UINT8 OperationSupport; // Operation Support
496 } IPMI_GET_SEL_INFO_RESPONSE;
497
498 //
499 // Definitions for Get SEL Allocation Info command
500 //
501 #define IPMI_STORAGE_GET_SEL_ALLOCATION_INFO 0x41
502
503 //
504 // Constants and Structure definitions for "Get SEL Allocation Info" command to follow here
505 //
506
507 //
508 // Definitions for Reserve SEL command
509 //
510 #define IPMI_STORAGE_RESERVE_SEL 0x42
511
512 //
513 // Constants and Structure definitions for "Reserve SEL" command to follow here
514 //
515 typedef struct {
516 UINT8 CompletionCode;
517 UINT8 ReservationId[2]; // Reservation ID. LS byte first.
518 } IPMI_RESERVE_SEL_RESPONSE;
519
520 //
521 // Definitions for Get SEL Entry command
522 //
523 #define IPMI_STORAGE_GET_SEL_ENTRY 0x43
524
525 //
526 // Constants and Structure definitions for "Get SEL Entry" command to follow here
527 //
528
529 //
530 // Below is Definitions for SEL Record Formats (Chapter 32)
531 //
532 typedef struct {
533 UINT16 RecordId;
534 UINT8 RecordType;
535 UINT32 TimeStamp;
536 UINT16 GeneratorId;
537 UINT8 EvMRevision;
538 UINT8 SensorType;
539 UINT8 SensorNumber;
540 UINT8 EventDirType;
541 UINT8 OEMEvData1;
542 UINT8 OEMEvData2;
543 UINT8 OEMEvData3;
544 } IPMI_SEL_EVENT_RECORD_DATA;
545
546 typedef struct {
547 UINT16 RecordId;
548 UINT8 RecordType; // C0h-DFh = OEM system event record
549 UINT32 TimeStamp;
550 UINT8 ManufacturerId[3];
551 UINT8 OEMDefined[6];
552 } IPMI_TIMESTAMPED_OEM_SEL_RECORD_DATA;
553
554 typedef struct {
555 UINT16 RecordId;
556 UINT8 RecordType; // E0h-FFh = OEM system event record
557 UINT8 OEMDefined[13];
558 } IPMI_NON_TIMESTAMPED_OEM_SEL_RECORD_DATA;
559
560 typedef struct {
561 UINT8 ReserveId[2]; // Reservation ID, LS Byte First
562 UINT8 SelRecID[2]; // Sel Record ID, LS Byte First
563 UINT8 Offset; // Offset Into Record
564 UINT8 BytesToRead; // Bytes to be Read, 0xFF for entire record
565 } IPMI_GET_SEL_ENTRY_REQUEST;
566
567 typedef struct {
568 UINT8 CompletionCode;
569 UINT16 NextSelRecordId; // Next SEL Record ID, LS Byte first
570 IPMI_SEL_EVENT_RECORD_DATA RecordData;
571 } IPMI_GET_SEL_ENTRY_RESPONSE;
572
573 //
574 // Definitions for Add SEL Entry command
575 //
576 #define IPMI_STORAGE_ADD_SEL_ENTRY 0x44
577
578 //
579 // Constants and Structure definitions for "Add SEL Entry" command to follow here
580 //
581 typedef struct {
582 IPMI_SEL_EVENT_RECORD_DATA RecordData;
583 } IPMI_ADD_SEL_ENTRY_REQUEST;
584
585 typedef struct {
586 UINT8 CompletionCode;
587 UINT16 RecordId; // Record ID for added record, LS Byte first
588 } IPMI_ADD_SEL_ENTRY_RESPONSE;
589
590 //
591 // Definitions for Partial Add SEL Entry command
592 //
593 #define IPMI_STORAGE_PARTIAL_ADD_SEL_ENTRY 0x45
594
595 //
596 // Constants and Structure definitions for "Partial Add SEL Entry" command to follow here
597 //
598 typedef struct {
599 UINT16 ReservationId;
600 UINT16 RecordId;
601 UINT8 OffsetIntoRecord;
602 UINT8 InProgress;
603 UINT8 RecordData[0];
604 } IPMI_PARTIAL_ADD_SEL_ENTRY_REQUEST;
605
606 typedef struct {
607 UINT8 CompletionCode;
608 UINT16 RecordId;
609 } IPMI_PARTIAL_ADD_SEL_ENTRY_RESPONSE;
610
611 //
612 // Definitions for Delete SEL Entry command
613 //
614 #define IPMI_STORAGE_DELETE_SEL_ENTRY 0x46
615
616 //
617 // Constants and Structure definitions for "Delete SEL Entry" command to follow here
618 //
619 typedef struct {
620 UINT8 ReserveId[2]; // Reservation ID, LS byte first
621 UINT8 RecordToDelete[2]; // Record to Delete, LS Byte First
622 } IPMI_DELETE_SEL_ENTRY_REQUEST;
623
624 #define IPMI_DELETE_SEL_ENTRY_RESPONSE_TYPE_UNSUPPORTED 0x80
625 #define IPMI_DELETE_SEL_ENTRY_RESPONSE_ERASE_IN_PROGRESS 0x81
626
627 typedef struct {
628 UINT8 CompletionCode;
629 UINT16 RecordId; // Record ID added. LS byte first
630 } IPMI_DELETE_SEL_ENTRY_RESPONSE;
631
632 //
633 // Definitions for Clear SEL command
634 //
635 #define IPMI_STORAGE_CLEAR_SEL 0x47
636
637 //
638 // Constants and Structure definitions for "Clear SEL" command to follow here
639 //
640 #define IPMI_CLEAR_SEL_REQUEST_C_CHAR_ASCII 0x43
641 #define IPMI_CLEAR_SEL_REQUEST_L_CHAR_ASCII 0x4C
642 #define IPMI_CLEAR_SEL_REQUEST_R_CHAR_ASCII 0x52
643 #define IPMI_CLEAR_SEL_REQUEST_INITIALIZE_ERASE 0xAA
644 #define IPMI_CLEAR_SEL_REQUEST_GET_ERASE_STATUS 0x00
645
646 typedef struct {
647 UINT8 Reserve[2]; // Reserve ID, LSB first
648 UINT8 AscC; // Ascii for 'C' (0x43)
649 UINT8 AscL; // Ascii for 'L' (0x4c)
650 UINT8 AscR; // Ascii for 'R' (0x52)
651 UINT8 Erase; // 0xAA, Initiate Erase, 0x00 Get Erase Status
652 } IPMI_CLEAR_SEL_REQUEST;
653
654 #define IPMI_CLEAR_SEL_RESPONSE_ERASURE_IN_PROGRESS 0x00
655 #define IPMI_CLEAR_SEL_RESPONSE_ERASURE_COMPLETED 0x01
656
657 typedef struct {
658 UINT8 CompletionCode;
659 UINT8 ErasureProgress;
660 } IPMI_CLEAR_SEL_RESPONSE;
661
662 //
663 // Definitions for Get SEL Time command
664 //
665 #define IPMI_STORAGE_GET_SEL_TIME 0x48
666
667 //
668 // Constants and Structure definitions for "Get SEL Time" command to follow here
669 //
670 typedef struct {
671 UINT8 CompletionCode;
672 UINT32 Timestamp; // Present Timestamp clock reading. LS byte first.
673 } IPMI_GET_SEL_TIME_RESPONSE;
674
675 //
676 // Definitions for Set SEL Time command
677 //
678 #define IPMI_STORAGE_SET_SEL_TIME 0x49
679
680 //
681 // Constants and Structure definitions for "Set SEL Time" command to follow here
682 //
683 typedef struct {
684 UINT32 Timestamp;
685 } IPMI_SET_SEL_TIME_REQUEST;
686
687 //
688 // Definitions for Get Auxillary Log Status command
689 //
690 #define IPMI_STORAGE_GET_AUXILLARY_LOG_STATUS 0x5A
691
692 //
693 // Constants and Structure definitions for "Get Auxillary Log Status" command to follow here
694 //
695
696 //
697 // Definitions for Set Auxillary Log Status command
698 //
699 #define IPMI_STORAGE_SET_AUXILLARY_LOG_STATUS 0x5B
700
701 //
702 // Constants and Structure definitions for "Set Auxillary Log Status" command to follow here
703 //
704
705 //
706 // Definitions for Get SEL Time UTC Offset command
707 //
708 #define IPMI_STORAGE_GET_SEL_TIME_UTC_OFFSET 0x5C
709
710 //
711 // Constants and Structure definitions for "Get SEL Time UTC Offset" command to follow here
712 //
713 typedef struct {
714 UINT8 CompletionCode;
715 //
716 // 16-bit, 2s-complement signed integer for the offset in minutes from UTC to SEL Time.
717 // LS-byte first. (ranges from -1440 to 1440)
718 //
719 INT16 UtcOffset;
720 } IPMI_GET_SEL_TIME_UTC_OFFSET_RESPONSE;
721
722 //
723 // Definitions for Set SEL Time UTC Offset command
724 //
725 #define IPMI_STORAGE_SET_SEL_TIME_UTC_OFFSET 0x5D
726
727 //
728 // Constants and Structure definitions for "Set SEL Time UTC Offset" command to follow here
729 //
730
731 #define IPMI_COMPLETE_SEL_RECORD 0xFF
732
733 #define IPMI_SEL_SYSTEM_RECORD 0x02
734 #define IPMI_SEL_OEM_TIME_STAMP_RECORD_START 0xC0
735 #define IPMI_SEL_OEM_TIME_STAMP_RECORD_END 0xDF
736 #define IPMI_SEL_OEM_NO_TIME_STAMP_RECORD_START 0xE0
737 #define IPMI_SEL_OEM_NO_TIME_STAMP_RECORD_END 0xFF
738
739 #define IPMI_SEL_EVENT_DIR(EventDirType) (EventDirType >> 7)
740 #define IPMI_SEL_EVENT_DIR_ASSERTION_EVENT 0x00
741 #define IPMI_SEL_EVENT_DIR_DEASSERTION_EVENT 0x01
742
743 #define IPMI_SEL_EVENT_TYPE(EventDirType) (EventDirType & 0x7F)
744 //
745 // Event/Reading Type Code Ranges (Chapter 42)
746 //
747 #define IPMI_SEL_EVENT_TYPE_UNSPECIFIED 0x00
748 #define IPMI_SEL_EVENT_TYPE_THRESHOLD 0x01
749 #define IPMI_SEL_EVENT_TYPE_GENERIC_START 0x02
750 #define IPMI_SEL_EVENT_TYPE_GENERIC_END 0x0C
751 #define IPMI_SEL_EVENT_TYPE_SENSOR_SPECIFIC 0x6F
752 #define IPMI_SEL_EVENT_TYPE_OEM_START 0x70
753 #define IPMI_SEL_EVENT_TYPE_OEM_END 0x7F
754
755 #define SOFTWARE_ID_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId & 0xFF) >> 1)
756 //
757 // System Software IDs definitions (Section 5.5)
758 //
759 #define IPMI_SWID_BIOS_RANGE_START 0x00
760 #define IPMI_SWID_BIOS_RANGE_END 0x0F
761 #define IPMI_SWID_SMI_HANDLER_RANGE_START 0x10
762 #define IPMI_SWID_SMI_HANDLER_RANGE_END 0x1F
763 #define IPMI_SWID_SMS_RANGE_START 0x20
764 #define IPMI_SWID_SMS_RANGE_END 0x2F
765 #define IPMI_SWID_OEM_RANGE_START 0x30
766 #define IPMI_SWID_OEM_RANGE_END 0x3F
767 #define IPMI_SWID_REMOTE_CONSOLE_RANGE_START 0x40
768 #define IPMI_SWID_REMOTE_CONSOLE_RANGE_END 0x46
769 #define IPMI_SWID_TERMINAL_REMOTE_CONSOLE_ID 0x47
770
771 #define SLAVE_ADDRESS_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId & 0xFF) >> 1)
772 #define LUN_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId >> 8) & 0x03)
773 #define CHANNEL_NUMBER_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId >> 12) & 0x0F)
774
775 #define IPMI_EVM_REVISION 0x04
776 #define IPMI_BIOS_ID 0x18
777 #define IPMI_FORMAT_REV 0x00
778 #define IPMI_FORMAT_REV1 0x01
779 #define IPMI_SOFTWARE_ID 0x01
780 #define IPMI_PLATFORM_VAL_ID 0x01
781 #define IPMI_GENERATOR_ID(i,f) ((i << 1) | (f << 1) | IPMI_SOFTWARE_ID)
782
783 #define IPMI_SENSOR_TYPE_EVENT_CODE_DISCRETE 0x6F
784
785 #define IPMI_OEM_SPECIFIC_DATA 0x02
786 #define IPMI_SENSOR_SPECIFIC_DATA 0x03
787
788 #pragma pack()
789 #endif