com_IPMI_ChassisDevice.h 10 KB

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