com_IPMI_SEL.h 6.3 KB

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