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