2 IPMI 2.0 definitions from the IPMI Specification Version 2.0, Revision 1.1.
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)
10 See IPMI specification, Appendix G, Command Assignments
11 and Appendix H, Sub-function Assignments.
13 Copyright (c) 1999 - 2015, 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
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.
23 #ifndef _IPMI_NET_FN_STORAGE_H_
24 #define _IPMI_NET_FN_STORAGE_H_
28 // Net function definition for Storage command
30 #define IPMI_NETFN_STORAGE 0x0A
33 // All Storage commands and their structure definitions to follow here
37 // Below is Definitions for FRU Inventory Commands (Chapter 34)
41 // Definitions for Get Fru Inventory Area Info command
43 #define IPMI_STORAGE_GET_FRU_INVENTORY_AREAINFO 0x10
46 // Constants and Structure definitions for "Get Fru Inventory Area Info" command to follow here
50 // Definitions for Get Fru Data command
52 #define IPMI_STORAGE_READ_FRU_DATA 0x11
55 // Constants and Structure definitions for "Get Fru Data" command to follow here
60 } IPMI_FRU_COMMON_DATA
;
63 IPMI_FRU_COMMON_DATA Data
;
65 } IPMI_FRU_READ_COMMAND
;
68 // Definitions for Write Fru Data command
70 #define IPMI_STORAGE_WRITE_FRU_DATA 0x12
73 // Constants and Structure definitions for "Write Fru Data" command to follow here
76 IPMI_FRU_COMMON_DATA Data
;
78 } IPMI_FRU_WRITE_COMMAND
;
81 // Below is Definitions for SDR Repository (Chapter 33)
85 // Definitions for Get SDR Repository Info command
87 #define IPMI_STORAGE_GET_SDR_REPOSITORY_INFO 0x20
90 // Constants and Structure definitions for "Get SDR Repository Info" command to follow here
97 UINT32 RecentAdditionTimeStamp
;
98 UINT32 RecentEraseTimeStamp
;
99 UINT8 SdrRepAllocInfoCmd
: 1;
100 UINT8 SdrRepReserveCmd
: 1;
101 UINT8 PartialAddSdrCmd
: 1;
102 UINT8 DeleteSdrRepCmd
: 1;
104 UINT8 SdrRepUpdateOp
: 2;
106 } IPMI_GET_SDR_REPOSITORY_INFO
;
109 // Definitions for Get SDR Repository Allocateion Info command
111 #define IPMI_STORAGE_GET_SDR_REPOSITORY_ALLOCATION_INFO 0x21
114 // Constants and Structure definitions for "Get SDR Repository Allocateion Info" command to follow here
118 // Definitions for Reserve SDR Repository command
120 #define IPMI_STORAGE_RESERVE_SDR_REPOSITORY 0x22
123 // Constants and Structure definitions for "Reserve SDR Repository" command to follow here
127 // Definitions for Get SDR command
129 #define IPMI_STORAGE_GET_SDR 0x23
132 // Constants and Structure definitions for "Get SDR" command to follow here
136 UINT16 RecordId
; // 1
138 UINT8 RecordType
; // 4
139 UINT8 RecordLength
; // 5
142 UINT8 SensorNumber
; // 8
144 UINT8 EntityInstance
; // 10
145 UINT8 EventScanningEnabled
: 1; // 11
146 UINT8 EventScanningDisabled
: 1; // 11
147 UINT8 InitSensorType
: 1; // 11
148 UINT8 InitHysteresis
: 1; // 11
149 UINT8 InitThresholds
: 1; // 11
150 UINT8 InitEvent
: 1; // 11
151 UINT8 InitScanning
: 1; // 11
152 UINT8 Reserved
: 1; // 11
153 UINT8 EventMessageControl
: 2; // 12
154 UINT8 ThresholdAccessSupport
: 2; // 12
155 UINT8 HysteresisSupport
: 2; // 12
156 UINT8 ReArmSupport
: 1; // 12
157 UINT8 IgnoreSensor
: 1; // 12
158 UINT8 SensorType
; // 13
159 UINT8 EventType
; // 14
160 UINT8 Reserved1
[7]; // 15
161 UINT8 UnitType
; // 22
162 UINT8 Reserved2
; // 23
163 UINT8 Linearization
: 7; // 24
164 UINT8 Reserved3
: 1; // 24
166 UINT8 Toleremce
: 6; // 26
169 UINT8 AccuracyLow
: 6; // 28
171 UINT8 Reserved4
: 2; // 29
172 UINT8 AccuracyExp
: 2; // 29
173 UINT8 AccuracyHi
: 4; // 29
174 UINT8 BExp
: 4; // 30
175 UINT8 RExp
: 4; // 30
176 UINT8 NominalReadingSpscified
: 1; // 31
177 UINT8 NominalMaxSpscified
: 1; // 31
178 UINT8 NominalMinSpscified
: 1; // 31
179 UINT8 Reserved5
: 5; // 31
180 UINT8 NominalReading
; // 32
181 UINT8 Reserved6
[4]; // 33
182 UINT8 UpperNonRecoverThreshold
; // 37
183 UINT8 UpperCriticalThreshold
; // 38
184 UINT8 UpperNonCriticalThreshold
; // 39
185 UINT8 LowerNonRecoverThreshold
; // 40
186 UINT8 LowerCriticalThreshold
; // 41
187 UINT8 LowerNonCriticalThreshold
; // 42
188 UINT8 Reserved7
[5]; // 43
189 UINT8 IdStringLength
; // 48
190 UINT8 AsciiIdString
[16]; // 49 - 64
191 } IPMI_SDR_RECORD_STRUCT_1
;
194 UINT16 RecordId
; // 1
196 UINT8 RecordType
; // 4
197 UINT8 RecordLength
; // 5
200 UINT8 SensorNumber
; // 8
202 UINT8 EntityInstance
; // 10
203 UINT8 SensorScanning
: 1; // 11
204 UINT8 EventScanning
: 1; // 11
205 UINT8 InitSensorType
: 1; // 11
206 UINT8 InitHysteresis
: 1; // 11
207 UINT8 InitThresholds
: 1; // 11
208 UINT8 InitEvent
: 1; // 11
209 UINT8 InitScanning
: 1; // 11
210 UINT8 Reserved
: 1; // 11
211 UINT8 EventMessageControl
: 2; // 12
212 UINT8 ThresholdAccessSupport
: 2; // 12
213 UINT8 HysteresisSupport
: 2; // 12
214 UINT8 ReArmSupport
: 1; // 12
215 UINT8 IgnoreSensor
: 1; // 12
216 UINT8 SensorType
; // 13
217 UINT8 EventType
; // 14
218 UINT8 Reserved1
[7]; // 15
219 UINT8 UnitType
; // 22
220 UINT8 Reserved2
[9]; // 23
221 UINT8 IdStringLength
; // 32
222 UINT8 AsciiIdString
[16]; // 33 - 48
223 } IPMI_SDR_RECORD_STRUCT_2
;
227 UINT8 ControllerSlaveAddress
: 7;
232 UINT8 LogicalFruDevice
: 1;
234 UINT8 ChannelNumber
: 4;
235 } IPMI_FRU_DATA_INFO
;
238 UINT16 RecordId
; // 1
240 UINT8 RecordType
; // 4
241 UINT8 RecordLength
; // 5
242 IPMI_FRU_DATA_INFO FruDeviceData
; // 6
243 UINT8 Reserved1
; // 10
244 UINT8 DeviceType
; // 11
245 UINT8 DeviceTypeModifier
; // 12
246 UINT8 FruEntityId
; // 13
247 UINT8 FruEntityInstance
; // 14
248 UINT8 OemReserved
; // 15
249 UINT8 Length
: 4; // 16
250 UINT8 Reserved2
: 1; // 16
251 UINT8 StringType
: 3; // 16
252 UINT8 String
[16]; // 17
253 } IPMI_SDR_RECORD_STRUCT_11
;
256 UINT16 NextRecordId
; //1
259 UINT8 RecordType
; //6
260 UINT8 RecordLength
; //7
261 UINT8 ManufacturerId
[3]; //8
262 UINT8 StringChars
[20];
263 } IPMI_SDR_RECORD_STRUCT_C0
;
266 UINT16 NextRecordId
; //1
269 UINT8 RecordType
; //6
270 UINT8 RecordLength
; //7
271 } IPMI_SDR_RECORD_STRUCT_HEADER
;
274 IPMI_SDR_RECORD_STRUCT_1 SensorType1
;
275 IPMI_SDR_RECORD_STRUCT_2 SensorType2
;
276 IPMI_SDR_RECORD_STRUCT_11 SensorType11
;
277 IPMI_SDR_RECORD_STRUCT_C0 SensorTypeC0
;
278 IPMI_SDR_RECORD_STRUCT_HEADER SensorHeader
;
279 } IPMI_SENSOR_RECORD_STRUCT
;
282 UINT16 ReservationId
;
286 } IPMI_GET_SDR_REQUEST
;
289 // Definitions for Add SDR command
291 #define IPMI_STORAGE_ADD_SDR 0x24
294 // Constants and Structure definitions for "Add SDR" command to follow here
298 // Definitions for Partial Add SDR command
300 #define IPMI_STORAGE_PARTIAL_ADD_SDR 0x25
303 // Constants and Structure definitions for "Partial Add SDR" command to follow here
307 // Definitions for Delete SDR command
309 #define IPMI_STORAGE_DELETE_SDR 0x26
312 // Constants and Structure definitions for "Delete SDR" command to follow here
316 // Definitions for Clear SDR Repository command
318 #define IPMI_STORAGE_CLEAR_SDR 0x27
321 // Constants and Structure definitions for "Clear SDR Repository" command to follow here
325 // Definitions for Get SDR Repository Time command
327 #define IPMI_STORAGE_GET_SDR_REPOSITORY_TIME 0x28
330 // Constants and Structure definitions for "Get SDR Repository Time" command to follow here
334 // Definitions for Set SDR Repository Time command
336 #define IPMI_STORAGE_SET_SDR_REPOSITORY_TIME 0x29
339 // Constants and Structure definitions for "Set SDR Repository Time" command to follow here
343 // Definitions for Enter SDR Repository Update Mode command
345 #define IPMI_STORAGE_ENTER_SDR_UPDATE_MODE 0x2A
348 // Constants and Structure definitions for "Enter SDR Repository Update Mode" command to follow here
352 // Definitions for Exit SDR Repository Update Mode command
354 #define IPMI_STORAGE_EXIT_SDR_UPDATE_MODE 0x2B
357 // Constants and Structure definitions for "Exit SDR Repository Update Mode" command to follow here
361 // Definitions for Run Initialize Agent command
363 #define IPMI_STORAGE_RUN_INIT_AGENT 0x2C
366 // Constants and Structure definitions for "Run Initialize Agent" command to follow here
370 // Below is Definitions for System Event Log(SEL) Commands (Chapter 31)
374 // Definitions for Get SEL Info command
376 #define IPMI_STORAGE_GET_SEL_INFO 0x40
379 // Constants and Structure definitions for "Get SEL Info" command to follow here
382 UINT8 CompletionCode
;
383 UINT8 Version
; // Version of SEL
384 UINT16 NoOfEntries
; // No of Entries in the SEL
385 UINT16 FreeSpace
; // Free space in Bytes
386 UINT32 RecentAddTimeStamp
; // Most Recent Addition of Time Stamp
387 UINT32 RecentEraseTimeStamp
; // Most Recent Erasure of Time Stamp
388 UINT8 OperationSupport
; // Operation Support
389 } IPMI_GET_SEL_INFO_RESPONSE
;
392 // Definitions for Get SEL Allocation Info command
394 #define IPMI_STORAGE_GET_SEL_ALLOCATION_INFO 0x41
397 // Constants and Structure definitions for "Get SEL Allocation Info" command to follow here
401 // Definitions for Reserve SEL command
403 #define IPMI_STORAGE_RESERVE_SEL 0x42
406 // Constants and Structure definitions for "Reserve SEL" command to follow here
410 // Definitions for Get SEL Entry command
412 #define IPMI_STORAGE_GET_SEL_ENTRY 0x43
415 // Constants and Structure definitions for "Get SEL Entry" command to follow here
418 UINT8 ReserveId
[2]; // Reservation ID, LS Byte First
419 UINT8 SelRecID
[2]; // Sel Record ID, LS Byte First
420 UINT8 Offset
; // Offset Into Record
421 UINT8 BytesToRead
; // Bytes to be Read, 0xFF for entire record
422 } IPMI_GET_SEL_ENTRY_REQUEST
;
425 // Definitions for Add SEL Entry command
427 #define IPMI_STORAGE_ADD_SEL_ENTRY 0x44
430 // Constants and Structure definitions for "Add SEL Entry" command to follow here
434 // Definitions for Partial Add SEL Entry command
436 #define IPMI_STORAGE_PARTIAL_ADD_SEL_ENTRY 0x45
439 // Constants and Structure definitions for "Partial Add SEL Entry" command to follow here
443 // Definitions for Delete SEL Entry command
445 #define IPMI_STORAGE_DELETE_SEL_ENTRY 0x46
448 // Constants and Structure definitions for "Delete SEL Entry" command to follow here
451 UINT8 ReserveId
[2]; // Reservation ID, LS byte first
452 UINT8 RecordToDelete
[2]; // Record to Delete, LS Byte First
453 } IPMI_DELETE_SEL_REQUEST
;
456 // Definitions for Clear SEL command
458 #define IPMI_STORAGE_CLEAR_SEL 0x47
461 // Constants and Structure definitions for "Clear SEL" command to follow here
464 UINT8 Reserve
[2]; // Reserve ID, LSB first
465 UINT8 AscC
; // Ascii for 'C' (0x43)
466 UINT8 AscL
; // Ascii for 'L' (0x4c)
467 UINT8 AscR
; // Ascii for 'R' (0x52)
468 UINT8 Erase
; // 0xAA, Initiate Erase, 0x00 Get Erase Status
469 } IPMI_CLEAR_SEL_REQUEST
;
472 // Definitions for Get SEL Time command
474 #define IPMI_STORAGE_GET_SEL_TIME 0x48
477 // Constants and Structure definitions for "Get SEL Time" command to follow here
481 // Definitions for Set SEL Time command
483 #define IPMI_STORAGE_SET_SEL_TIME 0x49
486 // Constants and Structure definitions for "Set SEL Time" command to follow here
490 // Definitions for Get Auxillary Log Status command
492 #define IPMI_STORAGE_GET_AUXILLARY_LOG_STATUS 0x5A
495 // Constants and Structure definitions for "Get Auxillary Log Status" command to follow here
499 // Definitions for Set Auxillary Log Status command
501 #define IPMI_STORAGE_SET_AUXILLARY_LOG_STATUS 0x5B
504 // Constants and Structure definitions for "Set Auxillary Log Status" command to follow here
507 #define IPMI_COMPLETE_SEL_RECORD 0xFF
510 // Below is Definitions for SEL Record Formats (Chapter 32)
524 } IPMI_SEL_EVENT_RECORD_DATA
;
526 #define IPMI_SEL_SYSTEM_RECORD 0x02
528 #define IPMI_EVM_REVISION 0x04
529 #define IPMI_BIOS_ID 0x18
530 #define IPMI_FORMAT_REV 0x00
531 #define IPMI_FORMAT_REV1 0x01
532 #define IPMI_SOFTWARE_ID 0x01
533 #define IPMI_PLATFORM_VAL_ID 0x01
534 #define IPMI_GENERATOR_ID(i,f) ((i << 1) | (f << 1) | IPMI_SOFTWARE_ID)
536 #define IPMI_SENSOR_TYPE_EVENT_CODE_DISCRETE 0x6F
538 #define IPMI_OEM_SPECIFIC_DATA 0x02
539 #define IPMI_SENSOR_SPECIFIC_DATA 0x03