IPMI_HPMCmds.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. /* ***************************************************************
  2. ****************************************************************
  3. ** **
  4. ** (C)Copyright 2012, American Megatrends Inc. **
  5. ** **
  6. ** All Rights Reserved. **
  7. ** **
  8. ** 5555, Oakbrook Parkway, Suite 200, Norcross, **
  9. ** **
  10. ** Georgia - 30093, USA. Phone-(770)-246-8600. **
  11. ** **
  12. ****************************************************************
  13. ****************************************************************
  14. ****************************************************************
  15. *
  16. * IPMI_HPMCmds.h
  17. * IPMI HPM.1 Type Definitions.
  18. *
  19. * Author: Joey Chen <JoeyChen@ami.com.tw>
  20. * Rajaganesh R <rajaganeshr@amiindia.co.in>
  21. *
  22. *****************************************************************/
  23. #ifndef IPMI_HPMCMDS_H
  24. #define IPMI_HPMCMDS_H
  25. #include "Types.h"
  26. /* PICMG defined Group Extension Command */
  27. #define PICMG_IDENTIFIER 0x00
  28. /* HPM1 Revision per PICMG HPM.1 R1.0 SPEC */
  29. #define HPM1_REV 0x00
  30. #define DESC_STRING_LEN 12
  31. #define INIT_UPLOAD_FOR_COMPARE 3
  32. #define INIT_UPLOAD_FOR_UPGRADE 2
  33. #define INIT_PREPARE_COMPONENTS 1
  34. #define INIT_BACKUP_COMPONENTS 0
  35. #define HPM_LONG_DURATION_CMD 1
  36. #define HPM_SHORT_DURATION_CMD 2
  37. typedef enum {
  38. COMPONENT_ID_0 = 0x00,
  39. COMPONENT_ID_1,
  40. COMPONENT_ID_2,
  41. COMPONENT_ID_3,
  42. COMPONENT_ID_4,
  43. COMPONENT_ID_5,
  44. COMPONENT_ID_6,
  45. COMPONENT_ID_7,
  46. COMPONENT_ID_MAX
  47. } Component_ID_E;
  48. typedef enum {
  49. GENERAL_COMPONENT_PROPERTIES,
  50. CURRENT_VERSION,
  51. DESCRIPTION_STRING,
  52. ROLLBACK_FW_VERSION,
  53. DEFERRED_UPG_FW_VERSION,
  54. RESERVED,
  55. OEM_COMPONENT_PROPERTIES = 192
  56. } Component_Prop_Selector_E;
  57. #pragma pack(1)
  58. typedef struct {
  59. INT8U Identifier; /* 00h for PICMG */
  60. } PACKED GetTargetUpgradeCapablitiesReq_T;
  61. typedef struct {
  62. INT8U CompletionCode;
  63. INT8U Identifier;
  64. INT8U HPM1Ver;
  65. INT8U IPMCGlobalCapablities;
  66. INT8U UpgradeTimeout; /* in 5s interval,00h if not supported */
  67. INT8U SelfTestTimeout; /* in 5s interval,00h if not supported */
  68. INT8U Rollbackimeout; /* in 5s interval,00h if not supported */
  69. INT8U InaccessiblityTimeout; /* in 5s interval,00h if not supported */
  70. INT8U ComponentsPresent;
  71. } PACKED GetTargetUpgradeCapablitiesRes_T;
  72. typedef struct {
  73. INT8U Identifier;
  74. INT8U ComponentID;
  75. INT8U ComponentPropSelector;
  76. } PACKED GetComponentPropertiesReq_T;
  77. typedef struct {
  78. INT8U FWRev1;
  79. INT8U FWRev2;
  80. INT32U AuxillaryFWRevInfo;
  81. } PACKED FirmwareVersion_T;
  82. typedef struct {
  83. INT8U CompletionCode;
  84. INT8U Identifier;
  85. FirmwareVersion_T CurrFW;
  86. } PACKED GetCompPropFWRes_T;
  87. typedef struct {
  88. INT8U CompletionCode;
  89. INT8U Identifier;
  90. INT8U DescString[DESC_STRING_LEN];
  91. } PACKED GetCompPropDescStrRes_T;
  92. typedef struct {
  93. INT8U CompletionCode;
  94. INT8U Identifier;
  95. INT8U GeneralCompProp;
  96. } PACKED GetCompPropGeneralRes_T;
  97. typedef struct {
  98. INT8U Identifier;
  99. INT8U Components;
  100. INT8U UpgradeAction;
  101. } PACKED InitiateUpgActionReq_T;
  102. typedef struct {
  103. INT8U CompletionCode;
  104. INT8U Identifier;
  105. } PACKED InitiateUpgActionRes_T;
  106. typedef struct {
  107. INT8U Identifier;
  108. } PACKED QuerySelfTestResultsReq_T;
  109. typedef struct {
  110. INT8U CompletionCode;
  111. INT8U Identifier;
  112. INT8U SelfTestResult1;
  113. INT8U SelfTestResult2;
  114. } PACKED QuerySelfTestResultsRes_T;
  115. typedef struct {
  116. INT8U Identifier;
  117. INT8U BlkNumber;
  118. INT8U FWData[64];
  119. } PACKED UploadFirmwareBlkReq_T;
  120. typedef struct {
  121. INT8U CompletionCode;
  122. INT8U Identifier;
  123. } PACKED UploadFirmwareBlkRes_T;
  124. typedef struct {
  125. INT8U Identifier;
  126. INT8U Component;
  127. INT32U ImageSize;
  128. } PACKED FinishFWUploadReq_T;
  129. typedef struct {
  130. INT8U CompletionCode;
  131. INT8U Identifier;
  132. } PACKED FinishFWUploadRes_T;
  133. typedef struct {
  134. INT8U Identifier;
  135. } PACKED ActivateFWReq_T;
  136. typedef struct {
  137. INT8U CompletionCode;
  138. INT8U Identifier;
  139. } PACKED ActivateFWRes_T;
  140. typedef struct {
  141. INT8U Identifier;
  142. } PACKED AbortFirmwareUpgradeReq_T;
  143. typedef struct {
  144. INT8U CompletionCode;
  145. INT8U Identifier;
  146. } PACKED AbortFirmwareUpgradeRes_T;
  147. typedef struct {
  148. INT8U Identifier;
  149. } PACKED GetUpgradeStatusReq_T;
  150. typedef struct {
  151. INT8U CompletionCode;
  152. INT8U Identifier;
  153. INT8U CmdInProgress;
  154. INT8U LastCmdCC;
  155. } PACKED GetUpgradeStatusRes_T;
  156. typedef struct {
  157. INT8U Identifier;
  158. } PACKED QueryRollbackStatusReq_T;
  159. typedef struct {
  160. INT8U CompletionCode;
  161. INT8U Identifier;
  162. INT8U RollbackStatus;
  163. } PACKED QueryRollbackStatusRes_T;
  164. typedef struct {
  165. INT8U Identifier;
  166. } PACKED InitiateManualRollbackReq_T;
  167. typedef struct {
  168. INT8U CompletionCode;
  169. INT8U Identifier;
  170. } PACKED InitiateManualRollbackRes_T;
  171. typedef struct
  172. {
  173. INT8U CmdCC; /* Completion Code of Last Executed Command */
  174. INT8U CmdInProgress; /* Cmd no in progress if its long duration cmd */
  175. /* also to be used for identifying previous cmd */
  176. INT8U CmdDuration; /* flag for long | short duration commands */
  177. } PACKED HPMCmdStatus_T;
  178. typedef enum
  179. {
  180. HPM_EMPTY = 0x00,
  181. INIT_UPLOAD,
  182. UPLOAD_FW_BLK,
  183. FLASHING,
  184. VERIFYING,
  185. UPG_DONE,
  186. ACTIVATION_PENDING
  187. } HPMStates_E;
  188. typedef struct
  189. {
  190. HPMStates_E State;
  191. INT8U UpAction;
  192. INT8U Abort;
  193. } PACKED FWUpgState_T;
  194. typedef enum {
  195. FWVER_TYPE_CURRENT = 0x00,
  196. FWVER_TYPE_ROLLBACK,
  197. FWVER_TYPE_DEFER,
  198. FWVER_TYPE_MAX
  199. } FwVersionType_E;
  200. #pragma pack()
  201. #endif /* IPMI_HPMCMDS_H */