IPMI_AMIOBSM.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. /****************************************************************
  2. ** **
  3. ** (C)Copyright 2007-2008, American Megatrends Inc. **
  4. ** **
  5. ** All Rights Reserved. **
  6. ** **
  7. ** 5555, Oakbrook Parkway, Suite 200, Norcross, **
  8. ** **
  9. ** Georgia - 30093, USA. Phone-(770)-246-8600. **
  10. ** **
  11. ****************************************************************/
  12. /****************************************************************
  13. * @file IPMI_AMIOBSM.h
  14. * @author Velu <velmuruganv@amiindia.co.in>
  15. * @brief
  16. ****************************************************************/
  17. #ifndef LIBIPMI_AMIOBSM_H
  18. #define LIBIPMI_AMIOBSM_H
  19. #include "OBSMPort.h"
  20. /*** Definitions and Macros ***/
  21. #define CMD_AMI_GET_SLOT_MAP_INFO 0xA0
  22. #define CMD_AMI_GET_SLOT_INFO 0xA1
  23. #define CMD_AMI_GET_PWR_INFO 0xA2
  24. #define CMD_AMI_GET_PWR_DOM_INFO 0xA3
  25. #define CMD_AMI_GET_PWR_SUPPLY_INFO 0xA4
  26. #define CMD_AMI_GET_COOLING_INFO 0xA5
  27. #define CMD_AMI_GET_COOLING_DOM_INFO 0xA6
  28. #define CMD_AMI_GET_FAN_INFO 0xA7
  29. #define CMD_AMI_GET_BLADE_STATUS 0xA8
  30. #define CMD_AMI_ETH_RESTART_ALL 0xA9
  31. /* Debug Commands */
  32. #define CMD_DBG_GET_CHASSIS_PWR_INFO 0xD0
  33. #define CMD_DBG_GET_CHASSIS_COOLING_INFO 0xD1
  34. #define CMD_DBG_GET_BLADE_INFO 0xD2
  35. #define CMD_DBG_BLADE_INS_REM_EVT 0xD3
  36. #define CMD_DBG_PS_STATE_CHANGE_EVT 0xD4
  37. #define CMD_DBG_FAN_STATE_CHANGE_EVT 0xD5
  38. #define CMD_DBG_THERMAL_STATE_CHANGE_EVT 0xD6
  39. #pragma pack(1)
  40. /*
  41. * Slot Data Info structure
  42. */
  43. typedef struct
  44. {
  45. INT8U modClass;
  46. INT8U modType;
  47. INT8U slotIns;
  48. INT8U slotId;
  49. INT8U slotStatus;
  50. INT8U devId[16];
  51. }PACKED SlotData_T;
  52. /*
  53. * Power Supply Info Structure
  54. */
  55. typedef struct
  56. {
  57. INT8U presence;
  58. INT8U status;
  59. INT16U maxPwr;
  60. }PACKED PwrSupplyStatusInfo_T;
  61. /*
  62. * Power Domain Info Structure
  63. */
  64. typedef struct
  65. {
  66. INT8U domNum;
  67. INT8U redundancy;
  68. INT8U redundancyState;
  69. INT8U hotSwap;
  70. INT16U totalPwr;
  71. INT16U remPwr;
  72. INT8U devCount;
  73. INT8U pwrSupplyCount;
  74. INT8U totalPwrSupplySlot;
  75. INT8U reqPwrSupply;
  76. INT8U slotCount;
  77. INT8U slotList[MAX_SLOT_NUM_SUPPORTED];
  78. }PACKED ChassisPwrDomInfo_T;
  79. /*
  80. * Fan Info Structure
  81. */
  82. typedef struct
  83. {
  84. INT8U tachSensorNum;
  85. INT8U rdg;
  86. INT8U presence;
  87. INT8U status;
  88. }PACKED FanModuleInfo_T;
  89. /*
  90. * Cooling Domain Info Structure
  91. */
  92. typedef struct
  93. {
  94. INT8U domNum;
  95. INT8U redundancy;
  96. INT8U redundancyState;
  97. INT8U hotSwap;
  98. INT8U thermalState;
  99. INT16U allocPwr;
  100. INT8U devCount;
  101. INT8U fanCount;
  102. INT8U totalFanSlot;
  103. INT8U reqFanCount;
  104. INT8U slotCount;
  105. INT8U slotList[MAX_SLOT_NUM_SUPPORTED];
  106. }PACKED ChassisCoolingDomInfo_T;
  107. /*
  108. * Get Power Supply Info structures
  109. */
  110. typedef struct
  111. {
  112. INT8U openBladeId;
  113. INT8U domNum;
  114. INT8U pwrSupplyId;
  115. } PACKED GetPwrSupplyInfoReq_T;
  116. typedef struct
  117. {
  118. INT8U completionCode;
  119. INT8U openBladeId;
  120. PwrSupplyStatusInfo_T pwrSupplyStatusInfo;
  121. } PACKED GetPwrSupplyInfoRes_T;
  122. /*
  123. * Get Power Domain Info structures
  124. */
  125. typedef struct
  126. {
  127. INT8U openBladeId;
  128. INT8U domNum;
  129. } PACKED GetPwrDomInfoReq_T;
  130. typedef struct
  131. {
  132. INT8U completionCode;
  133. INT8U openBladeId;
  134. ChassisPwrDomInfo_T chassisPwrDomInfo;
  135. } PACKED GetPwrDomInfoRes_T;
  136. /*
  137. * Get Power Info structures
  138. */
  139. typedef struct
  140. {
  141. INT8U openBladeId;
  142. } PACKED GetPwrInfoReq_T;
  143. typedef struct
  144. {
  145. INT8U completionCode;
  146. INT8U openBladeId;
  147. INT8U totPwrDomain;
  148. } PACKED GetPwrInfoRes_T;
  149. /*
  150. * Get Fan Info structures
  151. */
  152. typedef struct
  153. {
  154. INT8U openBladeId;
  155. INT8U domNum;
  156. INT8U fanId;
  157. } PACKED GetFanInfoReq_T;
  158. typedef struct
  159. {
  160. INT8U completionCode;
  161. INT8U openBladeId;
  162. FanModuleInfo_T fanModuleInfo;
  163. } PACKED GetFanInfoRes_T;
  164. /*
  165. * Get Cooling Domain Info structures
  166. */
  167. typedef struct
  168. {
  169. INT8U openBladeId;
  170. INT8U domNum;
  171. } PACKED GetCoolingDomInfoReq_T;
  172. typedef struct
  173. {
  174. INT8U completionCode;
  175. INT8U openBladeId;
  176. ChassisCoolingDomInfo_T chassisCoolingDomInfo;
  177. } PACKED GetCoolingDomInfoRes_T;
  178. /*
  179. * Get Cooling Info structures
  180. */
  181. typedef struct
  182. {
  183. INT8U openBladeId;
  184. } PACKED GetCoolingInfoReq_T;
  185. typedef struct
  186. {
  187. INT8U completionCode;
  188. INT8U openBladeId;
  189. INT8U totCoolingDomain;
  190. } PACKED GetCoolingInfoRes_T;
  191. /*
  192. * Get Slot Map Info Structures
  193. */
  194. typedef struct
  195. {
  196. INT8U openBladeId;
  197. } PACKED GetSlotMapInfoReq_T;
  198. typedef struct
  199. {
  200. INT8U completionCode;
  201. INT8U openBladeId;
  202. INT8U slotCount;
  203. } PACKED GetSlotMapInfoRes_T;
  204. /*
  205. * Get Slot Info Structures
  206. */
  207. typedef struct
  208. {
  209. INT8U openBladeId;
  210. INT8U slotNum;
  211. } PACKED GetSlotInfoReq_T;
  212. typedef struct
  213. {
  214. INT8U completionCode;
  215. INT8U openBladeId;
  216. SlotData_T slotData;
  217. } PACKED GetSlotInfoRes_T;
  218. /*
  219. * Get Blade Status Structure
  220. */
  221. typedef struct
  222. {
  223. INT8U openBladeId;
  224. INT8U slotId;
  225. } PACKED GetBladeStatusReq_T;
  226. typedef struct
  227. {
  228. INT8U completionCode;
  229. INT8U openBladeId;
  230. INT8U bladePresentFlag;
  231. } PACKED GetBladeStatusRes_T;
  232. /*-------------------
  233. * Debug Commands
  234. *-------------------*/
  235. /*
  236. * Get Power Info Structure
  237. */
  238. typedef struct
  239. {
  240. INT8U param;
  241. INT8U size;
  242. INT16U offset;
  243. } PACKED GetChassisPwrInfoReq_T;
  244. typedef struct
  245. {
  246. INT8U completionCode;
  247. INT8U pwrData [512];
  248. } PACKED GetChassisPwrInfoRes_T;
  249. /*
  250. * Get Cooling Info Structure
  251. */
  252. typedef struct
  253. {
  254. INT8U param;
  255. INT8U size;
  256. INT16U offset;
  257. } PACKED GetChassisCoolingInfoReq_T;
  258. typedef struct
  259. {
  260. INT8U completionCode;
  261. INT8U coolingData [512];
  262. } PACKED GetChassisCoolingInfoRes_T;
  263. /*
  264. * Get Blade Info Structure
  265. */
  266. typedef struct
  267. {
  268. INT8U slotId;
  269. } PACKED GetBladeInfoReq_T;
  270. typedef struct
  271. {
  272. INT8U completionCode;
  273. INT8U bladePresentFlag;
  274. INT8U bladeInfo[127];
  275. } PACKED GetBladeInfoRes_T;
  276. /*
  277. * Blade Insertion/Removal Structure
  278. */
  279. typedef struct
  280. {
  281. INT8U slotId;
  282. INT8U insertFlag;
  283. } PACKED BladeInsRemEvtReq_T;
  284. typedef struct
  285. {
  286. INT8U completionCode;
  287. } PACKED BladeInsRemEvtRes_T;
  288. /*
  289. * Power supply state change event
  290. */
  291. typedef struct
  292. {
  293. INT8U param;
  294. INT8U sensorNum;
  295. } PACKED PSEvtReq_T;
  296. typedef struct
  297. {
  298. INT8U completionCode;
  299. } PACKED PSEvtRes_T;
  300. /*
  301. * Fan state change event
  302. */
  303. typedef struct
  304. {
  305. INT8U param;
  306. INT8U sensorNum;
  307. } PACKED FanEvtReq_T;
  308. typedef struct
  309. {
  310. INT8U completionCode;
  311. } PACKED FanEvtRes_T;
  312. /*
  313. * Thermal state change event
  314. */
  315. typedef struct
  316. {
  317. INT8U param;
  318. INT8U slotId;
  319. INT8U sensorNum;
  320. INT8U domId;
  321. INT8U thermalState;
  322. } PACKED ThermalEvtReq_T;
  323. typedef struct
  324. {
  325. INT8U completionCode;
  326. } PACKED ThermalEvtRes_T;
  327. #pragma pack()
  328. #endif