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