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