com_IPMI_ChassisDevice.h 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  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. /* SetChassisCapabilitiesReq_T */
  102. typedef struct
  103. {
  104. ChassisCapabilities_T ChassisCaps;
  105. } SetChassisCapabilitiesReq_T;
  106. /* SetChassisCapabilitiesRes_T */
  107. typedef struct
  108. {
  109. uint8_t CompletionCode;
  110. } SetChassisCapabilitiesRes_T;
  111. /* SetPowerRestorePolicyReq_T */
  112. typedef struct
  113. {
  114. uint8_t PowerRestorePolicy;
  115. } SetPowerRestorePolicyReq_T;
  116. /* SetPowerRestorePolicyRes_T */
  117. typedef struct
  118. {
  119. uint8_t CompletionCode;
  120. uint8_t PowerRestorePolicy;
  121. } SetPowerRestorePolicyRes_T;
  122. /* GetSystemRestartCauseRes_T */
  123. typedef struct
  124. {
  125. uint8_t CompletionCode;
  126. uint8_t SysRestartCause;
  127. uint8_t ChannelID;
  128. } GetSystemRestartCauseRes_T;
  129. /* GetPOHCounterRes_T */
  130. typedef struct
  131. {
  132. uint8_t CompletionCode;
  133. uint8_t MinutesPerCount;
  134. uint32_t POHCounterReading;
  135. } GetPOHCounterRes_T;
  136. /* BootInfoAck_T */
  137. typedef struct
  138. {
  139. uint8_t WriteMask;
  140. uint8_t BootInitiatorAckData;
  141. } BootInfoAck_T;
  142. /* BootFlags_T */
  143. typedef struct
  144. {
  145. uint8_t BootFlagsValid;
  146. uint8_t Data2;
  147. uint8_t Data3;
  148. uint8_t Data4;
  149. uint8_t Data5;
  150. } BootFlags_T;
  151. /* BootInitiatorInfo_T */
  152. typedef struct
  153. {
  154. uint8_t BootSource;
  155. uint8_t SessionID [4];
  156. uint8_t BootInfoTimestamp [4];
  157. } BootInitiatorInfo_T;
  158. /* BootInitiatorMailbox_T */
  159. typedef struct
  160. {
  161. uint8_t BlockData [MAX_BOOT_INIT_MAILBOX_BLOCK_SIZE];
  162. } BootInitiatorMailbox_T;
  163. /* BootInitiatorMboxReq_T */
  164. typedef struct
  165. {
  166. uint8_t BlockSel;
  167. BootInitiatorMailbox_T BootMBox;
  168. } BootInitiatorMboxReq_T;
  169. #define DEFAULT_BOT_DEV_NUM 0x1
  170. #define DEFAULT_BOT_DEV_INFO_SIZE 60
  171. #define ANCH_STR_LEN 4
  172. #define IP_ADDR_LEN 4
  173. #define CFG_SCR_NAME_LEN 48
  174. #define CHAS_GUID_LEN 16
  175. #define SCT_RSV_LEN 28
  176. /* OemParamBlkSizeTbl_T */
  177. typedef struct
  178. {
  179. uint8_t AnchorStr[ANCH_STR_LEN]; /* Header */
  180. uint8_t Checksum;
  181. uint8_t MajorRev;
  182. uint8_t MinorRev;
  183. uint16_t Len;
  184. uint8_t Reserved1;
  185. uint8_t SysIfcBlkSize; /* Data */
  186. uint8_t Reserved2;
  187. uint8_t IPMBIfcBlkSize;
  188. uint8_t Reserved3;
  189. uint8_t LANIfcBlkSize;
  190. uint8_t Reserved4;
  191. } OemParamBlkSizeTbl_T;
  192. /* BootOrderTbl_T */
  193. typedef struct
  194. {
  195. uint8_t AnchorStr[ANCH_STR_LEN]; /* Header */
  196. uint8_t BOTChecksum;
  197. uint8_t BOTMajorRev;
  198. uint8_t BOTMinorRev;
  199. uint16_t Len;
  200. uint8_t Reserved;
  201. uint8_t UpdFlag; /* Data */
  202. uint8_t *BootOrderInfo;
  203. uint8_t OrderType;
  204. uint8_t OrderLen;
  205. uint8_t *DevOrderList;
  206. uint8_t *DevNamePath;
  207. } BootOrderTbl_T;
  208. /* BootOrderTblReq_T */
  209. typedef struct
  210. {
  211. uint8_t BlockSel;
  212. BootOrderTbl_T BootOrderTbl;
  213. } BootOrderTblReq_T;
  214. /* SlotConfigTbl_T */
  215. typedef struct
  216. {
  217. uint8_t AnchorStr[ANCH_STR_LEN]; /* Header */
  218. uint8_t SCTChecksum;
  219. uint8_t SCTMajorRev;
  220. uint8_t SCTMinorRev;
  221. uint16_t Len;
  222. uint8_t Reserved1;
  223. uint8_t NICIP[IP_ADDR_LEN]; /* Data */
  224. uint8_t NICNetmask[IP_ADDR_LEN];
  225. uint8_t NICGateway[IP_ADDR_LEN];
  226. uint16_t MgmtVLAN;
  227. uint8_t MgmtIP[IP_ADDR_LEN];
  228. uint8_t ConfigScriptName[CFG_SCR_NAME_LEN];
  229. uint8_t ChassisGUID[CHAS_GUID_LEN];
  230. uint16_t ConfigBootType;
  231. uint16_t TFTPPort;
  232. uint16_t SFTPPort;
  233. uint16_t SCPort;
  234. uint8_t Reserved2[SCT_RSV_LEN];
  235. } SlotConfigTbl_T;
  236. /* BootOptParams_T */
  237. typedef union
  238. {
  239. uint8_t SetInProgress;
  240. uint8_t ServicePartitionSelector;
  241. uint8_t ServicePartitionScan;
  242. uint8_t BootFlagValidBitClearing;
  243. BootInfoAck_T BootInfoAck;
  244. BootFlags_T BootFlags;
  245. BootInitiatorInfo_T BootInitiatorInfo;
  246. BootInitiatorMboxReq_T BootMailBox;
  247. AMI_BootOpt_T Oem;
  248. OemParamBlkSizeTbl_T OemParamBlkSizeTbl;
  249. BootOrderTblReq_T BootOrderTbl;
  250. uint8_t BootDevSelector;
  251. SlotConfigTbl_T SlotConfigTbl;
  252. } BootOptParams_T;
  253. /* SetBootOptionsReq_T */
  254. typedef struct
  255. {
  256. uint8_t ParamValidCumParam;
  257. BootOptParams_T BootParam;
  258. } SetBootOptionsReq_T;
  259. /* SetBootOptionsRes_T */
  260. typedef struct
  261. {
  262. uint8_t CompletionCode;
  263. } SetBootOptionsRes_T;
  264. /* BootOptions_T */
  265. typedef struct
  266. {
  267. uint8_t ParameterValid;
  268. uint8_t u8SetInProgress; /**< Set in progess variable */
  269. uint8_t ServicePartitionSelector;
  270. uint8_t ServicePartitionScan;
  271. uint8_t BootFlagValidBitClearing;
  272. BootInfoAck_T BootInfoAck;
  273. BootFlags_T BootFlags;
  274. BootInitiatorInfo_T BootInitiatorInfo;
  275. BootInitiatorMailbox_T BootMailBox[MAX_BOOT_INIT_MAILBOX_BLOCKS];
  276. AMI_BootOpt_T Oem;
  277. OemParamBlkSizeTbl_T OemParamBlkSizeTbl;
  278. BootOrderTbl_T *BootOrderTbl;
  279. uint8_t BootDevSelector;
  280. SlotConfigTbl_T SlotConfigTbl;
  281. } BootOptions_T;
  282. /* GetBootOptionsReq_T */
  283. typedef struct
  284. {
  285. uint8_t ParamSel;
  286. uint8_t SetSel;
  287. uint8_t BlockSel;
  288. } GetBootOptionsReq_T;
  289. /* GetBootOptParams_T */
  290. typedef union
  291. {
  292. uint8_t SetInProgress;
  293. uint8_t ServicePartitionSelector;
  294. uint8_t ServicePartitionScan;
  295. uint8_t BootFlagValidBitClearing;
  296. BootInfoAck_T BootInfoAck;
  297. BootFlags_T BootFlags;
  298. BootInitiatorInfo_T BootInitiatorInfo;
  299. BootInitiatorMboxReq_T BootMailBox;
  300. AMI_BootOpt_T Oem;
  301. OemParamBlkSizeTbl_T OemParamBlkSizeTbl;
  302. BootOrderTblReq_T BootOrderTbl;
  303. uint8_t BootDevSelector;
  304. SlotConfigTbl_T SlotConfigTbl;
  305. } GetBootOptParams_T;
  306. /* GetBootOptionsRes_T */
  307. typedef struct
  308. {
  309. uint8_t CompletionCode;
  310. uint8_t ParamVersion;
  311. uint8_t ParameterValid;
  312. GetBootOptParams_T BootParams;
  313. } GetBootOptionsRes_T;
  314. /* SetFPBtnEnablesReq_T */
  315. typedef struct
  316. {
  317. uint8_t ButtonEnables;
  318. } SetFPBtnEnablesReq_T;
  319. /* SetFPBtnEnablesRes_T */
  320. typedef struct
  321. {
  322. uint8_t CompletionCode;
  323. } SetFPBtnEnablesRes_T;
  324. /* SetPowerCycleInteval Req */
  325. typedef struct
  326. {
  327. uint8_t PowerCycleInterval;
  328. } SetPowerCycleIntervalReq_T;
  329. /* SetPowerRestorePolicyRes_T */
  330. typedef struct
  331. {
  332. uint8_t CompletionCode;
  333. } SetPowerCycleIntervalRes_T;
  334. #pragma pack( )
  335. #endif /* IPMI_CHASSIS_DEVICE*/