IPMI_ChassisDevice.h 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  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. * ipmi_chassis.h
  16. * IPMI chassis Request and Response structures
  17. *
  18. * Author: Rama Bisa <ramab@ami.com>
  19. *
  20. ******************************************************************/
  21. #ifndef IPMI_CHASSIS_DEVICE_H
  22. #define IPMI_CHASSIS_DEVICE_H
  23. #include "Types.h"
  24. #pragma pack( 1 )
  25. /*** Definitions and Macros ***/
  26. #define MAX_BOOT_INIT_MAILBOX_BLOCKS 5
  27. #define MAX_BOOT_INIT_MAILBOX_BLOCK_SIZE 16
  28. #define CHASSIS_IDENTITY_STATE_INFO_SUPPORTED 0x40
  29. #define CHASSIS_IDENTITY_INDEFINITE_ON 0x20
  30. #define CHASSIS_IDENTITY_TIMED_ON 0x10
  31. #define CHASSIS_IDENTITY_OFF 0x00
  32. /**
  33. * @struct ChassisCapabilities_T
  34. * @brief Chassis capabilities
  35. **/
  36. typedef struct
  37. {
  38. INT8U CapabilitiesFlags;
  39. INT8U FRUInfoAddr;
  40. INT8U SDRDeviceAddr;
  41. INT8U SELDeviceAddr;
  42. INT8U SMDeviceAddr;
  43. INT8U ChassBridgeFn;
  44. } PACKED ChassisCapabilities_T;
  45. /**
  46. * @struct ChassisPowerState_T
  47. * @brief Chassis Power state
  48. **/
  49. typedef struct
  50. {
  51. INT8U PowerState;
  52. INT8U LastPowerEvent;
  53. INT8U MiscChassisState;
  54. INT8U FPBtnEnables;
  55. } PACKED ChassisPowerState_T;
  56. /**
  57. * @struct AMI_BootOpt_T
  58. * @brief AMI specific Boot options
  59. **/
  60. typedef struct
  61. {
  62. INT8U Data1;
  63. INT8U Data2;
  64. } PACKED AMI_BootOpt_T;
  65. /* GetChassisCapabilitiesRes_T */
  66. typedef struct
  67. {
  68. INT8U CompletionCode;
  69. ChassisCapabilities_T ChassisCapabilities;
  70. } PACKED GetChassisCapabilitiesRes_T;
  71. /* GetChassisStatusRes_T */
  72. typedef struct
  73. {
  74. INT8U CompletionCode;
  75. ChassisPowerState_T ChassisPowerState;
  76. } PACKED GetChassisStatusRes_T;
  77. /* ChassisControlReq_T */
  78. typedef struct
  79. {
  80. INT8U ChassisControl;
  81. } PACKED ChassisControlReq_T;
  82. /* ChassisControlRes_T */
  83. typedef struct
  84. {
  85. INT8U CompletionCode;
  86. } PACKED ChassisControlRes_T;
  87. /* ChassisIdentifyReq_T */
  88. typedef struct
  89. {
  90. INT8U IdentifyInterval;
  91. INT8U ForceIdentify;
  92. } PACKED ChassisIdentifyReq_T;
  93. /* ChassisIdentifyRes_T */
  94. typedef struct
  95. {
  96. INT8U CompletionCode;
  97. } PACKED ChassisIdentifyRes_T;
  98. /* SetChassisCapabilitiesReq_T */
  99. typedef struct
  100. {
  101. ChassisCapabilities_T ChassisCaps;
  102. } PACKED SetChassisCapabilitiesReq_T;
  103. /* SetChassisCapabilitiesRes_T */
  104. typedef struct
  105. {
  106. INT8U CompletionCode;
  107. } PACKED SetChassisCapabilitiesRes_T;
  108. /* SetPowerRestorePolicyReq_T */
  109. typedef struct
  110. {
  111. INT8U PowerRestorePolicy;
  112. } PACKED SetPowerRestorePolicyReq_T;
  113. /* SetPowerRestorePolicyRes_T */
  114. typedef struct
  115. {
  116. INT8U CompletionCode;
  117. INT8U PowerRestorePolicy;
  118. } PACKED SetPowerRestorePolicyRes_T;
  119. /* GetSystemRestartCauseRes_T */
  120. typedef struct
  121. {
  122. INT8U CompletionCode;
  123. INT8U SysRestartCause;
  124. INT8U ChannelID;
  125. } PACKED GetSystemRestartCauseRes_T;
  126. /* GetPOHCounterRes_T */
  127. typedef struct
  128. {
  129. INT8U CompletionCode;
  130. INT8U MinutesPerCount;
  131. INT32U POHCounterReading;
  132. } PACKED GetPOHCounterRes_T;
  133. /* BootInfoAck_T */
  134. typedef struct
  135. {
  136. INT8U WriteMask;
  137. INT8U BootInitiatorAckData;
  138. } PACKED BootInfoAck_T;
  139. /* BootFlags_T */
  140. typedef struct
  141. {
  142. INT8U BootFlagsValid;
  143. INT8U Data2;
  144. INT8U Data3;
  145. INT8U Data4;
  146. INT8U Data5;
  147. } PACKED BootFlags_T;
  148. /* BootInitiatorInfo_T */
  149. typedef struct
  150. {
  151. INT8U BootSource;
  152. INT8U SessionID [4];
  153. INT8U BootInfoTimestamp [4];
  154. } PACKED BootInitiatorInfo_T;
  155. /* BootInitiatorMailbox_T */
  156. typedef struct
  157. {
  158. INT8U BlockData [MAX_BOOT_INIT_MAILBOX_BLOCK_SIZE];
  159. } PACKED BootInitiatorMailbox_T;
  160. /* BootInitiatorMboxReq_T */
  161. typedef struct
  162. {
  163. INT8U BlockSel;
  164. BootInitiatorMailbox_T BootMBox;
  165. } PACKED BootInitiatorMboxReq_T;
  166. #define DEFAULT_BOT_DEV_NUM 0x1
  167. #define DEFAULT_BOT_DEV_INFO_SIZE 60
  168. #define ANCH_STR_LEN 4
  169. #define IP_ADDR_LEN 4
  170. #define CFG_SCR_NAME_LEN 48
  171. #define CHAS_GUID_LEN 16
  172. #define SCT_RSV_LEN 28
  173. /* OemParamBlkSizeTbl_T */
  174. typedef struct
  175. {
  176. INT8U AnchorStr[ANCH_STR_LEN]; /* Header */
  177. INT8U Checksum;
  178. INT8U MajorRev;
  179. INT8U MinorRev;
  180. INT16U Len;
  181. INT8U Reserved1;
  182. INT8U SysIfcBlkSize; /* Data */
  183. INT8U Reserved2;
  184. INT8U IPMBIfcBlkSize;
  185. INT8U Reserved3;
  186. INT8U LANIfcBlkSize;
  187. INT8U Reserved4;
  188. } PACKED OemParamBlkSizeTbl_T;
  189. /* BootOrderTbl_T */
  190. typedef struct
  191. {
  192. INT8U AnchorStr[ANCH_STR_LEN]; /* Header */
  193. INT8U BOTChecksum;
  194. INT8U BOTMajorRev;
  195. INT8U BOTMinorRev;
  196. INT16U Len;
  197. INT8U Reserved;
  198. INT8U UpdFlag; /* Data */
  199. INT8U *BootOrderInfo;
  200. INT8U OrderType;
  201. INT8U OrderLen;
  202. INT8U *DevOrderList;
  203. INT8U *DevNamePath;
  204. } PACKED BootOrderTbl_T;
  205. /* BootOrderTblReq_T */
  206. typedef struct
  207. {
  208. INT8U BlockSel;
  209. BootOrderTbl_T BootOrderTbl;
  210. } PACKED BootOrderTblReq_T;
  211. /* SlotConfigTbl_T */
  212. typedef struct
  213. {
  214. INT8U AnchorStr[ANCH_STR_LEN]; /* Header */
  215. INT8U SCTChecksum;
  216. INT8U SCTMajorRev;
  217. INT8U SCTMinorRev;
  218. INT16U Len;
  219. INT8U Reserved1;
  220. INT8U NICIP[IP_ADDR_LEN]; /* Data */
  221. INT8U NICNetmask[IP_ADDR_LEN];
  222. INT8U NICGateway[IP_ADDR_LEN];
  223. INT16U MgmtVLAN;
  224. INT8U MgmtIP[IP_ADDR_LEN];
  225. INT8U ConfigScriptName[CFG_SCR_NAME_LEN];
  226. INT8U ChassisGUID[CHAS_GUID_LEN];
  227. INT16U ConfigBootType;
  228. INT16U TFTPPort;
  229. INT16U SFTPPort;
  230. INT16U SCPort;
  231. INT8U Reserved2[SCT_RSV_LEN];
  232. } PACKED SlotConfigTbl_T;
  233. /* BootOptParams_T */
  234. typedef union
  235. {
  236. INT8U SetInProgress;
  237. INT8U ServicePartitionSelector;
  238. INT8U ServicePartitionScan;
  239. INT8U BootFlagValidBitClearing;
  240. BootInfoAck_T BootInfoAck;
  241. BootFlags_T BootFlags;
  242. BootInitiatorInfo_T BootInitiatorInfo;
  243. BootInitiatorMboxReq_T BootMailBox;
  244. AMI_BootOpt_T Oem;
  245. OemParamBlkSizeTbl_T OemParamBlkSizeTbl;
  246. BootOrderTblReq_T BootOrderTbl;
  247. INT8U BootDevSelector;
  248. SlotConfigTbl_T SlotConfigTbl;
  249. } BootOptParams_T;
  250. /* SetBootOptionsReq_T */
  251. typedef struct
  252. {
  253. INT8U ParamValidCumParam;
  254. BootOptParams_T BootParam;
  255. } PACKED SetBootOptionsReq_T;
  256. /* SetBootOptionsRes_T */
  257. typedef struct
  258. {
  259. INT8U CompletionCode;
  260. } PACKED SetBootOptionsRes_T;
  261. /* BootOptions_T */
  262. typedef struct
  263. {
  264. INT8U ParameterValid;
  265. INT8U u8SetInProgress; /**< Set in progess variable */
  266. INT8U ServicePartitionSelector;
  267. INT8U ServicePartitionScan;
  268. INT8U BootFlagValidBitClearing;
  269. BootInfoAck_T BootInfoAck;
  270. BootFlags_T BootFlags;
  271. BootInitiatorInfo_T BootInitiatorInfo;
  272. BootInitiatorMailbox_T BootMailBox[MAX_BOOT_INIT_MAILBOX_BLOCKS];
  273. AMI_BootOpt_T Oem;
  274. OemParamBlkSizeTbl_T OemParamBlkSizeTbl;
  275. BootOrderTbl_T *BootOrderTbl;
  276. INT8U BootDevSelector;
  277. SlotConfigTbl_T SlotConfigTbl;
  278. } PACKED BootOptions_T;
  279. /* GetBootOptionsReq_T */
  280. typedef struct
  281. {
  282. INT8U ParamSel;
  283. INT8U SetSel;
  284. INT8U BlockSel;
  285. } PACKED GetBootOptionsReq_T;
  286. /* GetBootOptParams_T */
  287. typedef union
  288. {
  289. INT8U SetInProgress;
  290. INT8U ServicePartitionSelector;
  291. INT8U ServicePartitionScan;
  292. INT8U BootFlagValidBitClearing;
  293. BootInfoAck_T BootInfoAck;
  294. BootFlags_T BootFlags;
  295. BootInitiatorInfo_T BootInitiatorInfo;
  296. BootInitiatorMboxReq_T BootMailBox;
  297. AMI_BootOpt_T Oem;
  298. OemParamBlkSizeTbl_T OemParamBlkSizeTbl;
  299. BootOrderTblReq_T BootOrderTbl;
  300. INT8U BootDevSelector;
  301. SlotConfigTbl_T SlotConfigTbl;
  302. } GetBootOptParams_T;
  303. /* GetBootOptionsRes_T */
  304. typedef struct
  305. {
  306. INT8U CompletionCode;
  307. INT8U ParamVersion;
  308. INT8U ParameterValid;
  309. GetBootOptParams_T BootParams;
  310. } PACKED GetBootOptionsRes_T;
  311. /* SetFPBtnEnablesReq_T */
  312. typedef struct
  313. {
  314. INT8U ButtonEnables;
  315. } PACKED SetFPBtnEnablesReq_T;
  316. /* SetFPBtnEnablesRes_T */
  317. typedef struct
  318. {
  319. INT8U CompletionCode;
  320. } PACKED SetFPBtnEnablesRes_T;
  321. /* SetPowerCycleInteval Req */
  322. typedef struct
  323. {
  324. INT8U PowerCycleInterval;
  325. } PACKED SetPowerCycleIntervalReq_T;
  326. /* SetPowerRestorePolicyRes_T */
  327. typedef struct
  328. {
  329. INT8U CompletionCode;
  330. } PACKED SetPowerCycleIntervalRes_T;
  331. #pragma pack( )
  332. #endif /* IPMI_CHASSIS_DEVICE*/