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)
9 See IPMI specification, Appendix G, Command Assignments
10 and Appendix H, Sub-function Assignments.
12 Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.<BR>
13 This program and the accompanying materials
14 are licensed and made available under the terms and conditions of the BSD License
15 which accompanies this distribution. The full text of the license may be found at
16 http://opensource.org/licenses/bsd-license.php
18 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
19 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 #ifndef _IPMI_NET_FN_STORAGE_H_
23 #define _IPMI_NET_FN_STORAGE_H_
27 // Net function definition for Storage command
29 #define IPMI_NETFN_STORAGE 0x0A
32 // All Storage commands and their structure definitions to follow here
36 // Below is Definitions for FRU Inventory Commands (Chapter 34)
40 // Definitions for Get Fru Inventory Area Info command
42 #define IPMI_STORAGE_GET_FRU_INVENTORY_AREAINFO 0x10
45 // Constants and Structure definitions for "Get Fru Inventory Area Info" command to follow here
49 // Definitions for Get Fru Data command
51 #define IPMI_STORAGE_READ_FRU_DATA 0x11
54 // Constants and Structure definitions for "Get Fru Data" command to follow here
59 } IPMI_FRU_COMMON_DATA
;
62 IPMI_FRU_COMMON_DATA Data
;
64 } IPMI_FRU_READ_COMMAND
;
67 // Definitions for Write Fru Data command
69 #define IPMI_STORAGE_WRITE_FRU_DATA 0x12
72 // Constants and Structure definitions for "Write Fru Data" command to follow here
75 IPMI_FRU_COMMON_DATA Data
;
77 } IPMI_FRU_WRITE_COMMAND
;
80 // Below is Definitions for SDR Repository (Chapter 33)
84 // Definitions for Get SDR Repository Info command
86 #define IPMI_STORAGE_GET_SDR_REPOSITORY_INFO 0x20
89 // Constants and Structure definitions for "Get SDR Repository Info" command to follow here
95 UINT32 RecentAdditionTimeStamp
;
96 UINT32 RecentEraseTimeStamp
;
97 UINT8 SdrRepAllocInfoCmd
: 1;
98 UINT8 SdrRepReserveCmd
: 1;
99 UINT8 PartialAddSdrCmd
: 1;
100 UINT8 DeleteSdrRepCmd
: 1;
102 UINT8 SdrRepUpdateOp
: 2;
104 } IPMI_SDR_REPOSITORY_INFO
;
107 // Definitions for Get SDR Repository Allocateion Info command
109 #define IPMI_STORAGE_GET_SDR_REPOSITORY_ALLOCATION_INFO 0x21
112 // Constants and Structure definitions for "Get SDR Repository Allocateion Info" command to follow here
116 // Definitions for Reserve SDR Repository command
118 #define IPMI_STORAGE_RESERVE_SDR_REPOSITORY 0x22
121 // Constants and Structure definitions for "Reserve SDR Repository" command to follow here
125 // Definitions for Get SDR command
127 #define IPMI_STORAGE_GET_SDR 0x23
130 // Constants and Structure definitions for "Get SDR" command to follow here
134 UINT16 RecordId
; // 1
136 UINT8 RecordType
; // 4
137 UINT8 RecordLength
; // 5
140 UINT8 SensorNumber
; // 8
142 UINT8 EntityInstance
; // 10
143 UINT8 EventScanningEnabled
: 1; // 11
144 UINT8 EventScanningDisabled
: 1; // 11
145 UINT8 InitSensorType
: 1; // 11
146 UINT8 InitHysteresis
: 1; // 11
147 UINT8 InitThresholds
: 1; // 11
148 UINT8 InitEvent
: 1; // 11
149 UINT8 InitScanning
: 1; // 11
150 UINT8 Reserved
: 1; // 11
151 UINT8 EventMessageControl
: 2; // 12
152 UINT8 ThresholdAccessSupport
: 2; // 12
153 UINT8 HysteresisSupport
: 2; // 12
154 UINT8 ReArmSupport
: 1; // 12
155 UINT8 IgnoreSensor
: 1; // 12
156 UINT8 SensorType
; // 13
157 UINT8 EventType
; // 14
158 UINT8 Reserved1
[7]; // 15
159 UINT8 UnitType
; // 22
160 UINT8 Reserved2
; // 23
161 UINT8 Linearization
: 7; // 24
162 UINT8 Reserved3
: 1; // 24
164 UINT8 Toleremce
: 6; // 26
167 UINT8 AccuracyLow
: 6; // 28
169 UINT8 Reserved4
: 2; // 29
170 UINT8 AccuracyExp
: 2; // 29
171 UINT8 AccuracyHi
: 4; // 29
172 UINT8 BExp
: 4; // 30
173 UINT8 RExp
: 4; // 30
174 UINT8 NominalReadingSpscified
: 1; // 31
175 UINT8 NominalMaxSpscified
: 1; // 31
176 UINT8 NominalMinSpscified
: 1; // 31
177 UINT8 Reserved5
: 5; // 31
178 UINT8 NominalReading
; // 32
179 UINT8 Reserved6
[4]; // 33
180 UINT8 UpperNonRecoverThreshold
; // 37
181 UINT8 UpperCriticalThreshold
; // 38
182 UINT8 UpperNonCriticalThreshold
; // 39
183 UINT8 LowerNonRecoverThreshold
; // 40
184 UINT8 LowerCriticalThreshold
; // 41
185 UINT8 LowerNonCriticalThreshold
; // 42
186 UINT8 Reserved7
[5]; // 43
187 UINT8 IdStringLength
; // 48
188 UINT8 AsciiIdString
[16]; // 49 - 64
189 } IPMI_SDR_RECORD_STRUCT_1
;
192 UINT16 RecordId
; // 1
194 UINT8 RecordType
; // 4
195 UINT8 RecordLength
; // 5
198 UINT8 SensorNumber
; // 8
200 UINT8 EntityInstance
; // 10
201 UINT8 SensorScanning
: 1; // 11
202 UINT8 EventScanning
: 1; // 11
203 UINT8 InitSensorType
: 1; // 11
204 UINT8 InitHysteresis
: 1; // 11
205 UINT8 InitThresholds
: 1; // 11
206 UINT8 InitEvent
: 1; // 11
207 UINT8 InitScanning
: 1; // 11
208 UINT8 Reserved
: 1; // 11
209 UINT8 EventMessageControl
: 2; // 12
210 UINT8 ThresholdAccessSupport
: 2; // 12
211 UINT8 HysteresisSupport
: 2; // 12
212 UINT8 ReArmSupport
: 1; // 12
213 UINT8 IgnoreSensor
: 1; // 12
214 UINT8 SensorType
; // 13
215 UINT8 EventType
; // 14
216 UINT8 Reserved1
[7]; // 15
217 UINT8 UnitType
; // 22
218 UINT8 Reserved2
[9]; // 23
219 UINT8 IdStringLength
; // 32
220 UINT8 AsciiIdString
[16]; // 33 - 48
221 } IPMI_SDR_RECORD_STRUCT_2
;
225 UINT8 ControllerSlaveAddress
: 7;
230 UINT8 LogicalFruDevice
: 1;
232 UINT8 ChannelNumber
: 4;
233 } IPMI_FRU_DATA_INFO
;
236 UINT16 RecordId
; // 1
238 UINT8 RecordType
; // 4
239 UINT8 RecordLength
; // 5
240 IPMI_FRU_DATA_INFO FruDeviceData
; // 6
241 UINT8 Reserved1
; // 10
242 UINT8 DeviceType
; // 11
243 UINT8 DeviceTypeModifier
; // 12
244 UINT8 FruEntityId
; // 13
245 UINT8 FruEntityInstance
; // 14
246 UINT8 OemReserved
; // 15
247 UINT8 Length
: 4; // 16
248 UINT8 Reserved2
: 1; // 16
249 UINT8 StringType
: 3; // 16
250 UINT8 String
[16]; // 17
251 } IPMI_SDR_RECORD_STRUCT_11
;
254 UINT16 NextRecordId
; //1
257 UINT8 RecordType
; //6
258 UINT8 RecordLength
; //7
259 UINT8 ManufacturerId
[3]; //8
260 UINT8 StringChars
[20];
261 } IPMI_SDR_RECORD_STRUCT_C0
;
264 UINT16 NextRecordId
; //1
267 UINT8 RecordType
; //6
268 UINT8 RecordLength
; //7
269 } IPMI_SDR_RECORD_STRUCT_HEADER
;
272 IPMI_SDR_RECORD_STRUCT_1 SensorType1
;
273 IPMI_SDR_RECORD_STRUCT_2 SensorType2
;
274 IPMI_SDR_RECORD_STRUCT_11 SensorType11
;
275 IPMI_SDR_RECORD_STRUCT_C0 SensorTypeC0
;
276 IPMI_SDR_RECORD_STRUCT_HEADER SensorHeader
;
277 } IPMI_SENSOR_RECORD_STRUCT
;
280 UINT16 ReservationId
;
287 // Definitions for Add SDR command
289 #define IPMI_STORAGE_ADD_SDR 0x24
292 // Constants and Structure definitions for "Add SDR" command to follow here
296 // Definitions for Partial Add SDR command
298 #define IPMI_STORAGE_PARTIAL_ADD_SDR 0x25
301 // Constants and Structure definitions for "Partial Add SDR" command to follow here
305 // Definitions for Delete SDR command
307 #define IPMI_STORAGE_DELETE_SDR 0x26
310 // Constants and Structure definitions for "Delete SDR" command to follow here
314 // Definitions for Clear SDR Repository command
316 #define IPMI_STORAGE_CLEAR_SDR 0x27
319 // Constants and Structure definitions for "Clear SDR Repository" command to follow here
323 // Definitions for Get SDR Repository Time command
325 #define IPMI_STORAGE_GET_SDR_REPOSITORY_TIME 0x28
328 // Constants and Structure definitions for "Get SDR Repository Time" command to follow here
332 // Definitions for Set SDR Repository Time command
334 #define IPMI_STORAGE_SET_SDR_REPOSITORY_TIME 0x29
337 // Constants and Structure definitions for "Set SDR Repository Time" command to follow here
341 // Definitions for Enter SDR Repository Update Mode command
343 #define IPMI_STORAGE_ENTER_SDR_UPDATE_MODE 0x2A
346 // Constants and Structure definitions for "Enter SDR Repository Update Mode" command to follow here
350 // Definitions for Exit SDR Repository Update Mode command
352 #define IPMI_STORAGE_EXIT_SDR_UPDATE_MODE 0x2B
355 // Constants and Structure definitions for "Exit SDR Repository Update Mode" command to follow here
359 // Definitions for Run Initialize Agent command
361 #define IPMI_STORAGE_RUN_INIT_AGENT 0x2C
364 // Constants and Structure definitions for "Run Initialize Agent" command to follow here
368 // Below is Definitions for System Event Log(SEL) Commands (Chapter 31)
372 // Definitions for Get SEL Info command
374 #define IPMI_STORAGE_GET_SEL_INFO 0x40
377 // Constants and Structure definitions for "Get SEL Info" command to follow here
380 UINT8 Version
; // Version of SEL
381 UINT16 NoOfEntries
; // No of Entries in the SEL
382 UINT16 FreeSpace
; // Free space in Bytes
383 UINT32 RecentAddTimeStamp
; // Most Recent Addition of Time Stamp
384 UINT32 RecentEraseTimeStamp
; // Most Recent Erasure of Time Stamp
385 UINT8 OperationSupport
; // Operation Support
389 // Definitions for Get SEL Allocation Info command
391 #define IPMI_STORAGE_GET_SEL_ALLOCATION_INFO 0x41
394 // Constants and Structure definitions for "Get SEL Allocation Info" command to follow here
398 // Definitions for Reserve SEL command
400 #define IPMI_STORAGE_RESERVE_SEL 0x42
403 // Constants and Structure definitions for "Reserve SEL" command to follow here
407 // Definitions for Get SEL Entry command
409 #define IPMI_STORAGE_GET_SEL_ENTRY 0x43
412 // Constants and Structure definitions for "Get SEL Entry" command to follow here
414 #define IPMI_COMPLETE_SEL_RECORD 0xFF
417 UINT8 ReserveId
[2]; // Reservation ID, LS Byte First
418 UINT8 SelRecID
[2]; // Sel Record ID, LS Byte First
419 UINT8 Offset
; // Offset Into Record
420 UINT8 BytesToRead
; // Bytes to be Read, 0xFF for entire record
421 } IPMI_GET_SEL_ENTRY
;
424 // Definitions for Add SEL Entry command
426 #define IPMI_STORAGE_ADD_SEL_ENTRY 0x44
429 // Constants and Structure definitions for "Add SEL Entry" command to follow here
443 } IPMI_SEL_RECORD_DATA
;
445 #define IPMI_SEL_SYSTEM_RECORD 0x02
447 #define IPMI_EVM_REVISION 0x04
448 #define IPMI_BIOS_ID 0x18
449 #define IPMI_FORMAT_REV 0x00
450 #define IPMI_FORMAT_REV1 0x01
451 #define IPMI_SOFTWARE_ID 0x01
452 #define IPMI_PLATFORM_VAL_ID 0x01
453 #define IPMI_GENERATOR_ID(i,f) ((i << 1) | (f << 1) | IPMI_SOFTWARE_ID)
455 #define IPMI_SENSOR_TYPE_EVENT_CODE_DISCRETE 0x6F
457 #define IPMI_OEM_SPECIFIC_DATA 0x02
458 #define IPMI_SENSOR_SPECIFIC_DATA 0x03
461 // Definitions for Partial Add SEL Entry command
463 #define IPMI_STORAGE_PARTIAL_ADD_SEL_ENTRY 0x45
466 // Constants and Structure definitions for "Partial Add SEL Entry" command to follow here
470 // Definitions for Delete SEL Entry command
472 #define IPMI_STORAGE_DELETE_SEL_ENTRY 0x46
475 // Constants and Structure definitions for "Delete SEL Entry" command to follow here
478 UINT8 ReserveId
[2]; // Reservation ID, LS byte first
479 UINT8 RecordToDelete
[2]; // Record to Delete, LS Byte First
483 // Definitions for Clear SEL command
485 #define IPMI_STORAGE_CLEAR_SEL 0x47
488 // Constants and Structure definitions for "Clear SEL" command to follow here
491 UINT8 Reserve
[2]; // Reserve ID, LSB first
492 UINT8 AscC
; // Ascii for 'C' (0x43)
493 UINT8 AscL
; // Ascii for 'L' (0x4c)
494 UINT8 AscR
; // Ascii for 'R' (0x52)
495 UINT8 Erase
; // 0xAA, Initiate Erase, 0x00 Get Erase Status
499 // Definitions for Get SEL Time command
501 #define IPMI_STORAGE_GET_SEL_TIME 0x48
504 // Constants and Structure definitions for "Get SEL Time" command to follow here
508 // Definitions for Set SEL Time command
510 #define IPMI_STORAGE_SET_SEL_TIME 0x49
513 // Constants and Structure definitions for "Set SEL Time" command to follow here
517 // Definitions for Get Auxillary Log Status command
519 #define IPMI_STORAGE_GET_AUXILLARY_LOG_STATUS 0x5A
522 // Constants and Structure definitions for "Get Auxillary Log Status" command to follow here
526 // Definitions for Set Auxillary Log Status command
528 #define IPMI_STORAGE_SET_AUXILLARY_LOG_STATUS 0x5B
531 // Constants and Structure definitions for "Set Auxillary Log Status" command to follow here