com_IPMI_Sensor.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  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_sensor.h
  18. * IPMI Sensor Requests and Responses.
  19. *
  20. * Author: Govind Kothandapani <govindk@ami.com>
  21. *
  22. ******************************************************************/
  23. #ifndef IPMI_SENSOR_H
  24. #define IPMI_SENSOR_H
  25. /*** External Definitions ***/
  26. #define SENSOR_TYPE_TEMP 0x01
  27. #define SENSOR_TYPE_SECUIRTY_VIOLATION 0x06
  28. #define SENSOR_TYPE_EVT_LOGGING 0x10
  29. #define SENSOR_TYPE_SYSTEM_EVENT 0x12
  30. #define SENSOR_TYPE_CRITICAL_INTERRUPT 0x13
  31. #define SENSOR_TYPE_MODULE_BOARD 0x15
  32. #define SENSOR_TYPE_WATCHDOG2 0x23
  33. #define SENSOR_TYPE_OS_CRITICAL_STOP 0x20
  34. #define SENSOR_TYPE_FRU_STATE 0x2C
  35. #define SENSOR_TYPE_SERV_STATE 0xF0
  36. #define FP_NMI_OFFSET 0x00
  37. #define PW_VIOLATION_OFFSET 0x05
  38. #define WDT_SENSOR_NUMBER 0xFE
  39. #define SECUIRTY_VIOLATION_SENSOR_NUMBER 0xFD
  40. #define NMI_SENSOR_NUMBER 0xFC
  41. #define SENSOR_SPECIFIC_READ_TYPE 0x6F
  42. #define SENSOR_SPECIFIC_OFFSET_MASK 0x0F
  43. #define PEF_ACTION_SEN_SPECIFIC_OFFSET 0xC4
  44. #define OS_RUNTIME_CRITICAL_STOP 0x01
  45. #define HOT_SWAP_SENSOR_START_NUM 0xD0
  46. #define SENSOR_TYPE_FRUSDR_COLLECTION 0xD0
  47. #define FRUSDR_COLLECTION_SENSOR_NUMBER 0xFD
  48. // 0 = Communication lost during FRU collection
  49. // 1 = FRU Invalid checksum
  50. // 2 = Communication lost during SDR collection
  51. #define FRU_COLLECTION_COMMUNICATION_LOST 0
  52. #define FRU_COLLECTION_INV_CHECKSUM 1
  53. #define SDR_COLLECTION_COMMUNICATION_LOST 2
  54. #define SDR_COLLECTION_INV_CC 3
  55. #define INVALID_PICMG_VERSION 4
  56. #pragma pack( 1 )
  57. /* GetSDRInfoRes_T */
  58. typedef struct
  59. {
  60. uint8_t CompletionCode;
  61. uint8_t NumSensor;
  62. uint8_t Flags;
  63. uint32_t TimeStamp;
  64. } GetSDRInfoRes_T;
  65. /* GetDevSDRReq_T */
  66. typedef struct
  67. {
  68. uint16_t ReservationID;
  69. uint16_t RecID;
  70. uint8_t Offset;
  71. uint8_t Size;
  72. } GetDevSDRReq_T;
  73. /* GetDevSDRRes_T */
  74. typedef struct
  75. {
  76. uint8_t CompletionCode;
  77. uint16_t NextRecID;
  78. } GetDevSDRRes_T;
  79. /* ReserveDevSDRRes_T */
  80. typedef struct
  81. {
  82. uint8_t CompletionCode;
  83. uint16_t ReservationID;
  84. } ReserveDevSDRRes_T;
  85. /* GetSensorReadingFactorReq_T */
  86. typedef struct
  87. {
  88. uint8_t SensorNum;
  89. uint8_t ReadingByte;
  90. } GetSensorReadingFactorReq_T;
  91. /* GetSensorReadingFactorRes_T */
  92. typedef struct
  93. {
  94. uint8_t CompletionCode;
  95. uint8_t NextReading;
  96. uint8_t M_LSB;
  97. uint8_t M_MSB_Tolerance;
  98. uint8_t B_LSB;
  99. uint8_t B_MSB_Accuracy;
  100. uint8_t Accuracy_MSB_Exp;
  101. uint8_t RExp_BExp;
  102. } GetSensorReadingFactorRes_T;
  103. /* SetSensorHysterisisReq_T */
  104. typedef struct
  105. {
  106. uint8_t SensorNum;
  107. uint8_t Reserved;
  108. uint8_t PositiveHysterisis;
  109. uint8_t NegativeHysterisis;
  110. } SetSensorHysterisisReq_T;
  111. /* SetSensorHysterisisRes_T */
  112. typedef struct
  113. {
  114. uint8_t CompletionCode;
  115. } SetSensorHysterisisRes_T;
  116. /* GetSensorHysterisisReq_T */
  117. typedef struct
  118. {
  119. uint8_t SensorNum;
  120. uint8_t Reserved;
  121. } GetSensorHysterisisReq_T;
  122. /* GetSensorHysterisisRes_T */
  123. typedef struct
  124. {
  125. uint8_t CompletionCode;
  126. uint8_t PositiveHysterisis;
  127. uint8_t NegativeHysterisis;
  128. } GetSensorHysterisisRes_T;
  129. /* SetSensorThresholdReq_T */
  130. typedef struct
  131. {
  132. uint8_t SensorNum;
  133. uint8_t SetFlags;
  134. uint8_t LowerNonCritical;
  135. uint8_t LowerCritical;
  136. uint8_t LowerNonRecoverable;
  137. uint8_t UpperNonCritical;
  138. uint8_t UpperCritical;
  139. uint8_t UpperNonRecoverable;
  140. } SetSensorThresholdReq_T;
  141. typedef struct
  142. {
  143. uint8_t CompletionCode;
  144. uint8_t records[480];
  145. } SensorhistoryData_T;
  146. /* SetSensorThresholdRes_T */
  147. typedef struct
  148. {
  149. uint8_t CompletionCode;
  150. } SetSensorThresholdRes_T;
  151. /* GetSensorThresholdReq_T */
  152. typedef struct
  153. {
  154. uint8_t SensorNum;
  155. } GetSensorThresholdReq_T;
  156. /* GetSensorThresholdRes_T */
  157. typedef struct
  158. {
  159. uint8_t CompletionCode;
  160. uint8_t GetFlags;
  161. uint8_t LowerNonCritical;
  162. uint8_t LowerCritical;
  163. uint8_t LowerNonRecoverable;
  164. uint8_t UpperNonCritical;
  165. uint8_t UpperCritical;
  166. uint8_t UpperNonRecoverable;
  167. } GetSensorThresholdRes_T;
  168. /* SetSensorEventEnableReq_T */
  169. typedef struct
  170. {
  171. uint8_t SensorNum;
  172. uint8_t Flags;
  173. uint16_t AssertionMask;
  174. uint16_t DeAssertionMask;
  175. } SetSensorEventEnableReq_T;
  176. /* SetSensorEventEnableRes_T */
  177. typedef struct
  178. {
  179. uint8_t CompletionCode;
  180. } SetSensorEventEnableRes_T;
  181. /* GetSensorEventEnableReq_T */
  182. typedef struct
  183. {
  184. uint8_t SensorNum;
  185. } GetSensorEventEnableReq_T;
  186. /* GetSensorEventEnableRes_T */
  187. typedef struct
  188. {
  189. uint8_t CompletionCode;
  190. uint8_t Flags;
  191. uint16_t AssertionMask;
  192. uint16_t DeAssertionMask;
  193. } GetSensorEventEnableRes_T;
  194. /* GetSensorReadingReq_T */
  195. typedef struct
  196. {
  197. uint8_t SensorNum;
  198. } GetSensorReadingReq_T;
  199. /* GetSensorReadingRes_T */
  200. typedef struct
  201. {
  202. uint8_t CompletionCode;
  203. uint8_t SensorReading;
  204. uint8_t Flags;
  205. uint8_t ComparisonStatus;
  206. uint8_t OptionalStatus;
  207. } GetSensorReadingRes_T;
  208. /* SetSensorTypeReq_T */
  209. typedef struct
  210. {
  211. uint8_t SensorNum;
  212. uint8_t SensorType;
  213. uint8_t EventTypeCode;
  214. } SetSensorTypeReq_T;
  215. /* SetSensorTypeRes_T */
  216. typedef struct
  217. {
  218. uint8_t CompletionCode;
  219. } SetSensorTypeRes_T;
  220. /* GetSensorTypeReq_T */
  221. typedef struct
  222. {
  223. uint8_t SensorNum;
  224. } GetSensorTypeReq_T;
  225. /* GetSensorTypeRes_T */
  226. typedef struct
  227. {
  228. uint8_t CompletionCode;
  229. uint8_t SensorType;
  230. uint8_t EventTypeCode;
  231. } GetSensorTypeRes_T;
  232. /* ReArmSensorReq_T */
  233. typedef struct
  234. {
  235. uint8_t SensorNum;
  236. uint8_t ReArmAllEvents;
  237. uint8_t ReArmAssertionEvents1;
  238. uint8_t ReArmAssertionEvents2;
  239. uint8_t ReArmDeassertionEvents1;
  240. uint8_t ReArmDeassertionEvents2;
  241. } ReArmSensorReq_T;
  242. /* ReArmSensorRes_T */
  243. typedef struct
  244. {
  245. uint8_t CompletionCode;
  246. } ReArmSensorRes_T;
  247. /* GetSensorEventStatusReq_T */
  248. typedef struct
  249. {
  250. uint8_t SensorNum;
  251. } GetSensorEventStatusReq_T;
  252. /* GetSensorEventStatusRes_T */
  253. typedef struct
  254. {
  255. uint8_t CompletionCode;
  256. uint8_t Flags;
  257. uint8_t AssertionEvents1;
  258. uint8_t AssertionEvents2;
  259. uint8_t DeassertionEvents1;
  260. uint8_t DeassertionEvents2;
  261. } GetSensorEventStatusRes_T;
  262. /* SetSensorReadingReq_T */
  263. typedef struct
  264. {
  265. uint8_t SensorNum;
  266. uint8_t Operation;
  267. uint8_t SensorReading;
  268. uint8_t AssertionEventOccuredByte1;
  269. uint8_t AssertionEventOccuredByte2;
  270. uint8_t DeAssertionEventOccuredByte1;
  271. uint8_t DeAssertionEventOccuredByte2;
  272. uint8_t EvtData1;
  273. uint8_t EvtData2;
  274. uint8_t EvtData3;
  275. } SetSensorReadingReq_T;
  276. /* SetSensorReadingRes_T */
  277. typedef struct
  278. {
  279. uint8_t CompletionCode;
  280. } SetSensorReadingRes_T;
  281. #pragma pack( )
  282. #endif /* IPMI_SENSOR_H */