com_IPMI_SEL.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  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. * ipmi_sel.h
  17. * Sel device exports
  18. *
  19. * Author: Bakka Ravinder Reddy <bakkar@ami.com>
  20. *
  21. *****************************************************************/
  22. #ifndef IPMI_SEL_H
  23. #define IPMI_SEL_H
  24. /*** External Definitions ***/
  25. #define SEL_VERSION 0x51
  26. #define UNSPECIFIED_UTC_OFFSET 0x07FF
  27. #define SEL_UTC_MIN_RANGE -1440
  28. #define SEL_UTC_MAX_RANGE 1440
  29. #define SEL_RECORD_SIZE 16
  30. /**
  31. * @struct SELRecHdr_T
  32. * @brief SEL Record Header
  33. **/
  34. #pragma pack(1)
  35. typedef struct
  36. {
  37. uint16_t ID;
  38. uint8_t Type;
  39. uint32_t TimeStamp;
  40. } SELRecHdr_T;
  41. typedef struct {
  42. /* RECORD BODY BYTES */
  43. uint8_t GenID [2];
  44. uint8_t EvMRev;
  45. uint8_t SensorType;
  46. uint8_t SensorNum;
  47. uint8_t EvtDirType;
  48. uint8_t EvtData1;
  49. uint8_t EvtData2;
  50. uint8_t EvtData3;
  51. } EventRecord_T;
  52. typedef struct {
  53. /* RECORD BODY BYTES */
  54. uint8_t ManufacturerID[3];
  55. uint8_t OEMDefined[6];
  56. } OemEventRecord_T;
  57. /**
  58. * @struct SELEventRecord_T
  59. * @brief SEL Event Record
  60. **/
  61. typedef struct
  62. {
  63. /* SEL ENTRY RECORD HEADER */
  64. SELRecHdr_T hdr;
  65. union {
  66. EventRecord_T sysEventRecord;
  67. OemEventRecord_T oemEventRecord;
  68. } body;
  69. } SELEventRecord_T;
  70. /**
  71. * @struct SELRec_T
  72. * @brief SEL Record
  73. **/
  74. typedef struct
  75. {
  76. uint8_t Valid;
  77. uint8_t Len;
  78. SELEventRecord_T EvtRecord;
  79. } SELRec_T;
  80. /**
  81. * @struct SELOEM1Record_T
  82. * @brief SEL OEM1 Record
  83. **/
  84. typedef struct
  85. {
  86. /* SEL ENTRY RECORD HEADER */
  87. uint16_t ID;
  88. uint8_t Type;
  89. /* RECORD BODY BYTES */
  90. uint32_t TimeStamp;
  91. uint8_t MftrID [3];
  92. uint8_t OEMData [6];
  93. } SELOEM1Record_T;
  94. /**
  95. * @struct SELOEM2Record_T
  96. * @brief SEL OEM2 Record
  97. **/
  98. typedef struct
  99. {
  100. /* SEL ENTRY RECORD HEADER */
  101. // SELRecHdr_T hdr;
  102. uint16_t ID;
  103. uint8_t Type;
  104. /* RECORD BODY BYTES */
  105. uint8_t OEMData [13];
  106. } SELOEM2Record_T;
  107. /* SELInfo_T */
  108. typedef struct
  109. {
  110. uint8_t CompletionCode; /* Completion Code */
  111. uint8_t Version; /* Version of the SEL 0x51 */
  112. uint16_t RecCt; /* Record Count */
  113. uint16_t FreeSpace; /* Free space LSB first */
  114. uint32_t AddTimeStamp; /* Most recent addition timestamp */
  115. uint32_t EraseTimeStamp; /* Most recent erase timestamp */
  116. uint8_t OpSupport; /* Operation Support */
  117. } SELInfo_T;
  118. /* SELAllocInfo_T */
  119. typedef struct
  120. {
  121. uint8_t CompletionCode;
  122. uint16_t NumAllocUnits; /* Number of possible allocation units */
  123. uint16_t AllocUnitSize; /* Allocation unit size in bytes */
  124. uint16_t NumFreeAllocUnits; /* Number of free allocation units */
  125. uint16_t LargestFreeBlock; /* Largest free block in allocation units */
  126. uint8_t MaxRecSize; /* Maximimum record size in allocation units */
  127. } SELAllocInfo_T;
  128. /* ReserveSELRes_T */
  129. typedef struct
  130. {
  131. uint8_t CompletionCode;
  132. uint16_t ReservationID;
  133. } ReserveSELRes_T;
  134. /* GetSELReq_T */
  135. typedef struct
  136. {
  137. uint16_t ReservationID;
  138. uint16_t RecID;
  139. uint8_t Offset;
  140. uint8_t Size;
  141. } GetSELReq_T;
  142. /* GetSELRes_T */
  143. typedef struct
  144. {
  145. uint8_t CompletionCode;
  146. uint16_t NextRecID;
  147. } GetSELRes_T;
  148. /* AddSELRes_T */
  149. typedef struct
  150. {
  151. uint8_t CompletionCode;
  152. uint16_t RecID;
  153. } AddSELRes_T;
  154. /* PartialAddSELReq_T */
  155. typedef struct
  156. {
  157. uint8_t LSBReservationID;
  158. uint8_t MSBReservationID;
  159. uint8_t LSBRecordID;
  160. uint8_t MSBRecordID;
  161. uint8_t Offset;
  162. uint8_t Progress;
  163. //Added to support PartialAddselEntry Cmd ../
  164. uint8_t RecordData[SEL_RECORD_SIZE];
  165. } PartialAddSELReq_T;
  166. /* PartialAddSELRes_T */
  167. typedef struct
  168. {
  169. uint8_t CompletionCode;
  170. uint16_t RecID;
  171. } PartialAddSELRes_T;
  172. /* DeleteSELReq_T */
  173. typedef struct
  174. {
  175. uint16_t ReservationID;
  176. uint16_t RecID;
  177. } DeleteSELReq_T;
  178. /* DeleteSELRes_T */
  179. typedef struct
  180. {
  181. uint8_t CompletionCode;
  182. uint16_t RecID;
  183. } DeleteSELRes_T;
  184. /* ClearSELReq_T */
  185. typedef struct
  186. {
  187. uint16_t ReservationID;
  188. uint8_t CLR [3];
  189. uint8_t InitOrStatus;
  190. } ClearSELReq_T;
  191. /* ClearSELRes_T */
  192. typedef struct
  193. {
  194. uint8_t CompletionCode;
  195. uint8_t EraseProgress;
  196. } ClearSELRes_T;
  197. /* GetSELTimeRes_T */
  198. typedef struct
  199. {
  200. uint8_t CompletionCode;
  201. uint32_t Time;
  202. } GetSELTimeRes_T;
  203. /* SetSELTimeReq_T */
  204. typedef struct
  205. {
  206. uint32_t Time;
  207. } SetSELTimeReq_T;
  208. /* GetSELAuxiliaryMCALogStatusRes_T */
  209. typedef struct
  210. {
  211. uint8_t CompletionCode;
  212. uint32_t Time;
  213. uint32_t NumEntries;
  214. } GetSELAuxiliaryMCALogStatusRes_T;
  215. /* GetSELAuxiliaryOEMLogStatusRes_T */
  216. typedef struct
  217. {
  218. uint8_t CompletionCode;
  219. uint32_t Time;
  220. uint8_t OEMId[3];
  221. uint8_t LogStatusBytes[8];
  222. } GetSELAuxiliaryOEMLogStatusRes_T;
  223. /* SetSELAuxiliaryMCALogStatusReq_T */
  224. typedef struct
  225. {
  226. uint8_t LogType;
  227. uint32_t Time;
  228. uint32_t NumEntries;
  229. } SetSELAuxiliaryMCALogStatusReq_T;
  230. /* SetSELAuxiliaryOEMLogStatusReq_T */
  231. typedef struct
  232. {
  233. uint8_t LogType;
  234. uint32_t Time;
  235. uint8_t OEMId[3];
  236. uint8_t LogStatusBytes[8];
  237. } SetSELAuxiliaryOEMLogStatusReq_T;
  238. /* GetSELTimeUTCoffsetRes_T */
  239. typedef struct
  240. {
  241. uint8_t CompletionCode;
  242. int16_t UTCOffset;
  243. } GetSELTimeUTCOffsetRes_T;
  244. /* SetSELTimeUTCOffsetReq_T*/
  245. typedef struct
  246. {
  247. int16_t UTCOffset;
  248. } SetSELTimeUTCOffsetReq_T;
  249. /* SetSELTimeUTCOffsetRes_T*/
  250. typedef struct
  251. {
  252. uint8_t CompletionCode;
  253. } SetSELTimeUTCOffsetRes_T;
  254. #pragma pack()
  255. #endif /* IPMI_SEL_H */