com_IPMI_FRU.h 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. /****************************************************************
  2. ****************************************************************
  3. ** **
  4. ** (C)Copyright 2005-2006, American Megatrends Inc. **
  5. ** **
  6. ** All Rights Reserved. **
  7. ** **
  8. ** 6145-F, Northbelt Parkway, Norcross, **
  9. ** **
  10. ** Georgia - 30071, USA. Phone-(770)-246-8600. **
  11. ** **
  12. ****************************************************************
  13. ****************************************************************
  14. ****************************************************************
  15. ******************************************************************
  16. *
  17. * ipmi_fru.h
  18. * IPMI fru structures
  19. *
  20. * Author: Rama Bisa <govindk@ami.com>
  21. *
  22. ******************************************************************/
  23. #ifndef IPMI_FRU_H
  24. #define IPMI_FRU_H
  25. #include <stdint.h>
  26. #define FRU_COMMON_HEADER 1
  27. #define FRU_INTERNAL_USE_AREA 2
  28. #define FRU_CHASSIS_INFO_AREA 3
  29. #define FRU_BOARD_INFO_AREA 4
  30. #define FRU_PRODUCT_INFO_AREA 5
  31. #define FRU_MULTI_RECORD_AREA 6
  32. #define FRU_MULTI_RECORD_HEADER FRU_MULTI_RECORD_AREA
  33. #define FRU_MULTI_RECORD_DATA 7
  34. #define FRU_END_OF_RECORD 0xF
  35. #define FRU_BLOCK_SIZE 8
  36. #pragma pack(1)
  37. /* FRUInventoryAreaInfoReq_T */
  38. typedef struct
  39. {
  40. uint8_t FRUDeviceID; /* 0xff is reserved */
  41. } FRUInventoryAreaInfoReq_T;
  42. /* FRUInventoryAreaInfoRes_T */
  43. typedef struct
  44. {
  45. uint8_t CompletionCode;
  46. uint16_t Size;
  47. uint8_t DeviceAccessMode;
  48. } FRUInventoryAreaInfoRes_T;
  49. /* FRUReadReq_T */
  50. typedef struct
  51. {
  52. uint8_t FRUDeviceID;
  53. uint16_t Offset;
  54. uint8_t CountToRead;
  55. } FRUReadReq_T;
  56. /* FRUReadRes_T */
  57. typedef struct
  58. {
  59. uint8_t CompletionCode;
  60. uint8_t CountReturned;
  61. } FRUReadRes_T;
  62. /* FRUWriteReq_T */
  63. typedef struct
  64. {
  65. uint8_t FRUDeviceID;
  66. uint16_t Offset;
  67. } FRUWriteReq_T;
  68. /* FRUWriteRes_T */
  69. typedef struct
  70. {
  71. uint8_t CompletionCode;
  72. uint8_t CountWritten;
  73. } FRUWriteRes_T;
  74. /**************************************************************/
  75. /* FRU Data structures */
  76. /**************************************************************/
  77. /* Common Header */
  78. typedef struct
  79. {
  80. uint8_t CommonHeaderFormatVersion;
  81. uint8_t InternalUseAreaStartOffset; /* In multiple of 8 bytes. 0 means area not present */
  82. uint8_t ChassisInfoAreaStartOffset; /* In multiple of 8 bytes. 0 means area not present */
  83. uint8_t BoardInfoAreaStartOffset; /* In multiple of 8 bytes. 0 means area not present */
  84. uint8_t ProductInfoAreaStartOffset; /* In multiple of 8 bytes. 0 means area not present */
  85. uint8_t MultiRecordAreaStartOffset; /* In multiple of 8 bytes. 0 means area not present */
  86. uint8_t PAD; /* 0x00 */
  87. uint8_t ZeroChecksum; /* Common Header Zero checksum */
  88. } FRUCommonHeader_T;
  89. /* Internal Use Area */
  90. typedef struct
  91. {
  92. uint8_t FormatVersion;
  93. uint8_t *Data;
  94. } FRUInternalInfo_T;
  95. /* Chassis Info Area */
  96. typedef enum
  97. {
  98. Other = 0x01,
  99. ChassisUnknown,
  100. Desktop,
  101. LowProfileDesktop,
  102. PizzaBox,
  103. MiniTower,
  104. Tower,
  105. Portable,
  106. LapTop,
  107. Notebook,
  108. HandHeld,
  109. DockingStation,
  110. AllinOne,
  111. SubNotebook,
  112. SpaceSaving,
  113. LunchBox,
  114. MainServerChassis,
  115. ExpansionChassis,
  116. SubChassis,
  117. BusExpansionChassis,
  118. PeripheralChassis,
  119. RAIDChassis,
  120. RackMountChassis
  121. } ChassisType_T;
  122. typedef struct
  123. {
  124. uint8_t ChassisInfoAreaFormatVersion;
  125. uint8_t ChassisInfoAreaLength; /* In multiple of 8 bytes. */
  126. uint8_t *ChassisType;
  127. uint8_t ChassisPartNumTypeLength;
  128. uint8_t *ChassisPartNum;
  129. uint8_t ChassisSerialNumTypeLength;
  130. uint8_t *ChassisSerialNum;
  131. uint8_t **CustomFields;
  132. uint8_t Total_Chassis_CustomField;
  133. } FRUChassisInfo_T;
  134. /* Board Info Area */
  135. typedef enum
  136. {
  137. English = 0
  138. } LanguageType_T;
  139. typedef struct
  140. {
  141. uint8_t BoardInfoAreaFormatVersion;
  142. uint8_t BoardInfoAreaLength; /* In multiple of 8 bytes. */
  143. uint8_t Language;
  144. uint8_t MfgDateTime[3];
  145. uint8_t BoardMfrTypeLength;
  146. uint8_t *BoardMfr;
  147. uint8_t BoardProductNameTypeLength;
  148. uint8_t *BoardProductName;
  149. uint8_t BoardSerialNumTypeLength;
  150. uint8_t *BoardSerialNum;
  151. uint8_t BoardPartNumTypeLength;
  152. uint8_t *BoardPartNum;
  153. uint8_t FRUFileIDTypeLength;
  154. uint8_t *FRUFileID;
  155. uint8_t **CustomFields;
  156. uint8_t Total_Board_CustomField;
  157. } FRUBoardInfo_T;
  158. /* Product Info Area */
  159. typedef struct
  160. {
  161. uint8_t ProductInfoAreaFormatVersion;
  162. uint8_t ProductInfoAreaLength; /* In multiple of 8 bytes. */
  163. uint8_t Language;
  164. uint8_t MfrNameTypeLength;
  165. uint8_t *MfrName;
  166. uint8_t ProductNameTypeLength;
  167. uint8_t *ProductName;
  168. uint8_t ProductPartNumTypeLength;
  169. uint8_t *ProductPartNum;
  170. uint8_t ProductVersionTypeLength;
  171. uint8_t *ProductVersion;
  172. uint8_t ProductSerialNumTypeLength;
  173. uint8_t *ProductSerialNum;
  174. uint8_t AssetTagTypeLength;
  175. uint8_t *AssetTag;
  176. uint8_t FRUFileIDTypeLength;
  177. uint8_t *FRUFileID;
  178. uint8_t **CustomFields;
  179. uint8_t Total_Product_CustomField;
  180. } FRUProductInfo_T;
  181. /* MultiRecord Area */
  182. typedef enum
  183. {
  184. PowerSupplyInformation,
  185. DCOutput,
  186. DCLoad,
  187. ManagementAccessRecord,
  188. BaseCompatibilityRecord,
  189. ExtendedCompatibilityRecord
  190. } RecordType_T;
  191. typedef struct
  192. {
  193. uint16_t OverallCapacity;
  194. uint16_t PeakVA;
  195. uint8_t InrushCurrent;
  196. uint8_t InrushIntervalinMSecs;
  197. uint16_t LowEndInVoltageRange1; /* 10mV */
  198. uint16_t HighEndInVoltageRange1; /* 10mV */
  199. uint16_t LowEndInVoltageRange2; /* 10mV. 0 if single range */
  200. uint16_t HighEndInVoltageRange2; /* 10mV. 0 if single range */
  201. uint8_t LowEndInFreqRange;
  202. uint8_t HighEndInFreqRange;
  203. uint8_t ACDropoutToleranceinMSecs;
  204. uint8_t FlagsPolarity;
  205. uint16_t PeakWattage;
  206. uint8_t CombinedWattage[3];
  207. uint8_t TechMtrLowerThresh;
  208. } PowerSupplyInformation_T;
  209. typedef struct
  210. {
  211. uint8_t OutputInfo;
  212. uint16_t NominalVoltage; /* 10mV */
  213. uint16_t MaxNegVolDeviation; /* 10mV */
  214. uint16_t MaxPosVolDeviation; /* 10mV */
  215. uint16_t RippleNoise; /* mV */
  216. uint16_t MinCurrentDraw; /* mA */
  217. uint16_t MaxCurrentDraw; /* mA */
  218. } DCOutput_T;
  219. typedef struct
  220. {
  221. uint8_t VoltageReqd;
  222. uint16_t NominalVoltage; /* 10mV */
  223. uint16_t SpecdMinVoltage; /* 10mV */
  224. uint16_t SpecdMaxVoltage; /* 10mV */
  225. uint16_t SpecdRippleNoise; /* mV */
  226. uint16_t MinCurrentLoad; /* mA */
  227. uint16_t MaxCurrentLoad; /* mA */
  228. } DCLoad_T;
  229. typedef struct
  230. {
  231. uint8_t RecordTypeID;
  232. uint8_t RecordFormatVersionEOL;
  233. uint8_t RecordLength;
  234. uint8_t RecordChecksum; /* zero checksum */
  235. uint8_t HeaderChecksum; /* zero checksum */
  236. uint8_t *RecordData;
  237. } MultiRecordHeader_T;
  238. typedef struct
  239. {
  240. MultiRecordHeader_T RecordHeader;
  241. uint8_t *RecordData;
  242. } Record_T;
  243. #define MAX_MULTIRECORDS 64
  244. typedef struct
  245. {
  246. Record_T MultiRecordsData[MAX_MULTIRECORDS];
  247. } FRUMultiRecordInfo_T;
  248. /* Complete FRU Data */
  249. typedef struct
  250. {
  251. FRUCommonHeader_T CommonHeader;
  252. FRUInternalInfo_T InternalInfo;
  253. FRUChassisInfo_T ChassisInfo;
  254. FRUBoardInfo_T BoardInfo;
  255. FRUProductInfo_T ProductInfo;
  256. FRUMultiRecordInfo_T MultiRecordInfo;
  257. } FRUData_T;
  258. #pragma pack()
  259. #endif /* IPMI_FRU_H */