com_IPMI_SEL.h 6.5 KB

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