com_IPMIDefs.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  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. ******************************************************************
  16. *
  17. * ipmi_defs.h
  18. * IPMI Definitions
  19. *
  20. * Author: Govind Kothandapani <govindk@ami.com>
  21. *
  22. ******************************************************************/
  23. #ifndef IPMI_DEFS_H
  24. #define IPMI_DEFS_H
  25. #ifndef uint8_t
  26. #define uint8_t unsigned char
  27. #endif
  28. #ifndef uint16_t
  29. #define uint16_t unsigned short
  30. #endif
  31. #ifndef uint32_t
  32. #define uint32_t unsigned long
  33. #endif
  34. // #ifndef bool
  35. // #define bool uint8_t
  36. // #endif
  37. #ifndef TRUE
  38. #define TRUE 1
  39. #endif
  40. #ifndef FALSE
  41. #define FALSE 0
  42. #endif
  43. #define USERTBL_FLASH_ADDR 0x800000
  44. #define MAX_STR_LENGTH 128
  45. #define SOCKET_PATH_LEN 108
  46. #define SESSION_TIMEOUT 10
  47. #define MAX_PYLDS_SUPPORT 2
  48. #define MAX_SENSOR_NUMBERS 32
  49. #define DEFAULT_TIMEOUT 10
  50. #define MAX_USER_NUM (10)
  51. #define MAX_SEL_RECORD (100)
  52. #define MAX_ID_STR_LEN 16
  53. #define MAX_FRU_SDR_STR_SIZE 40
  54. #define MAX_SENSOR_INFO_SIZE (1024)
  55. #define IP4_VERSION 4
  56. #define IP6_VERSION 6
  57. #define IP4_ADDR_LEN 4
  58. #define IP6_ADDR_LEN 16
  59. #define MAX_USERNAME_LEN (16+1)
  60. #define MAX_PASSWORD_LEN (20+1)
  61. #define AUTH_FILE_PATH "/etc/goahead/auth.txt"
  62. // /*------------------------
  63. // * Privilege Levels
  64. // *------------------------*/
  65. // #define PRIV_NONE 0x00
  66. // #define PRIV_CALLBACK 0x01
  67. // #define PRIV_USER 0x02
  68. // #define PRIV_OPERATOR 0x03
  69. // #define PRIV_ADMIN 0x04
  70. // #define PRIV_OEM 0x05
  71. // #define PRIV_LOCAL 0x81
  72. // #define PRIV_SYS_IFC 0x82
  73. /*----------------------------------------------
  74. * UDS
  75. *----------------------------------------------*/
  76. #define UDS_SOCKET_PATH "/var/UDS_SOCKET"
  77. #define UDS_IFC_Q "/var/UDS_IFC_Q"
  78. #define UDS_RES_Q "/var/UDS_RES_Q"
  79. #define UDS_SUCCESS 0
  80. #define UDS_CMD_FAILURE 1
  81. #define UDS_FAILURE -1
  82. #define UDS_PARAM_FAILURE -2
  83. #define UDS_SOCKET_QUE_LEN 1024
  84. #define MAX_UDS_BUFFER_SIZE 1024
  85. #define MAX_REQUEST_SIZE 1024
  86. #define MAX_RESPONSE_SIZE 1024
  87. #define WAIT_NONE 0
  88. #define WAIT_INFINITE (-1)
  89. /* ---------------------------------------------
  90. * Lan
  91. * ---------------------------------------------*/
  92. #define MAC_ADDR_LEN 6
  93. #define IP_ADDR_LEN 4
  94. #define MAX_AUTH_PARAM_SIZE 296
  95. #define LAN_IFC_Q "/var/LAN_IFC_Q"
  96. #define LAN_RES_Q "/var/LAN_RES_Q"
  97. /* ---------------------------------------------
  98. * IPMB
  99. * ---------------------------------------------*/
  100. #define PRIMARY_IPMB_IFC_Q "/var/Primary_IPMB_IFC_Q"
  101. #define PRIMARY_IPMB_RES_Q "/var/Primary_IPMB_RES_Q"
  102. #define SECONDARY_IPMB_IFC_Q "/var/Secondary_IPMB_IFC_Q"
  103. #define SECONDARY_IPMB_RES_Q "/var/Secondary_IPMB_RES_Q"
  104. #define MIN_IPMB_MSG_LENGTH 7
  105. /* ---------------------------------------------
  106. * MsgHndlr
  107. * ---------------------------------------------*/
  108. #define MSG_HNDLR_Q "/var/MSG_HNDLR_Q"
  109. /* ---------------------------------------------
  110. * ChassisTimer
  111. * ---------------------------------------------*/
  112. #define CHASSIS_PWR_HNDLR_Q "/var/CHASSIS_PWR_HNDLR_Q"
  113. /*----------------------------------------------
  114. * Channel
  115. *----------------------------------------------*/
  116. #define PRIMARY_IPMB_CHANNEL (0)
  117. #define LAN_RMCP_CHANNEL (1)
  118. #define SECONDARY_IPMB_CHANNEL (6)
  119. #define USB_CHANNEL (0x0B)
  120. #define UDS_CHANNEL (0x0D)
  121. #define SYS_IFC_CHANNEL (0x0F)
  122. /*----------------------------------------------
  123. * Parameters
  124. *----------------------------------------------*/
  125. #define PARAM_IFC 0x01
  126. #define LAN_SMB_REQUEST 0x01
  127. #define UDS_SMB_PARAM 0x01
  128. #define PARAM_REQUEST 0x03
  129. #define PARAM_CHASSIS 0x07
  130. #define PARAM_MC 0x09
  131. #define PARAM_NO_RESPONSE 0x10
  132. #define PARAM_NORMAL_RESPONSE 0x11
  133. #define PARAM_BRIDGE 0x12
  134. #define BRIDGING_REQUEST PARAM_BRIDGE
  135. /* Authentication Types */
  136. #define AUTHTYPE_NONE 0x00
  137. #define AUTHTYPE_MD2 0x01
  138. #define AUTHTYPE_MD5 0x02
  139. #define AUTHTYPE_RESERVED 0x03
  140. #define AUTHTYPE_STRAIGHT_PASSWORD 0x04
  141. #define AUTHTYPE_OEM_PROPRIETARY 0x05
  142. #define AUTHTYPE_RMCP_PLUS_FORMAT 0x06
  143. /* Privilege levels */
  144. #define PRIV_LEVEL_NO_ACCESS 0x0F
  145. #define PRIV_LEVEL_PROPRIETARY 0x05
  146. #define PRIV_LEVEL_ADMIN 0x04
  147. #define PRIV_LEVEL_OPERATOR 0x03
  148. #define PRIV_LEVEL_USER 0x02
  149. #define PRIV_LEVEL_CALLBACK 0x01
  150. #define PRIV_LEVEL_RESERVED 0x00
  151. /* Authentication Algorithms */
  152. #define AUTH_ALG_RAKP_NONE 0x00
  153. #define AUTH_ALG_RAKP_HMAC_SHA1 0x01
  154. #define AUTH_ALG_RAKP_HMAC_MD5 0x02
  155. /* Integrity Algorithms */
  156. #define INTEGRITY_ALG_NONE 0x00
  157. #define INTEGRITY_ALG_HMAC_SHA1_96 0x01
  158. #define INTEGRITY_ALG_HMAC_SHA1_128 0x02
  159. #define INTEGRITY_ALG_MD5_128 0x03
  160. /* Confidentiality Algorithms */
  161. #define CONFIDENTIALITY_ALG_NONE 0x00
  162. #define CONFIDENTIALITY_ALG_AES_CBC_128 0x01
  163. #define CONFIDENTIALITY_ALG_XRC4_128 0x02
  164. #define CONFIDENTIALITY_ALG_XRC4_40 0x03
  165. /* Payload Types */
  166. #define PAYLOAD_TYPE_IPMI 0
  167. #define PAYLOAD_TYPE_SOL 1
  168. #define PAYLOAD_TYPE_RSSP_OPEN_SES_REQ 0x10
  169. #define PAYLOAD_TYPE_RSSP_OPEN_SES_RES 0x11
  170. #define PAYLOAD_TYPE_RAKP_MSG_1 0x12
  171. #define PAYLOAD_TYPE_RAKP_MSG_2 0x13
  172. #define PAYLOAD_TYPE_RAKP_MSG_3 0x14
  173. #define PAYLOAD_TYPE_RAKP_MSG_4 0x15
  174. #define MAX_KEY1_SIZE 20
  175. #define MAX_KEY2_SIZE 20
  176. #define MAX_GUID_SIZE 16
  177. //#define MAX_USER_NAME_LEN (16+1) //1 for stroing the null character
  178. //#define MAX_USER_PWD_LEN (20+1) //1 for storing the null character
  179. #define MAX_RAND_NO_LEN 16
  180. #define THRESHOLD_RESERVED_BIT 0xC0
  181. #define DISCRETE_RESERVED_BIT 0x80
  182. /* (0x6 << 2) == 0x18 */
  183. #define DEFAULT_NET_FN_LUN 0x18
  184. #define NETFNLUN_IPMI_APP 0x18
  185. #define NETFNLUN_IPMI_SENSOR 0x10
  186. #define NETFNLUN_IPMI_STORAGE 0x28
  187. #define NETFNLUN_IPMI_CHASSIS 0x00
  188. #define NETFNLUN_IPMI_OEM 0xB8
  189. #define NETFNLUN_IPMI_STORLEAD 0xC8
  190. /*----------------------------------------------
  191. * Session type
  192. *----------------------------------------------*/
  193. #define LAN_SESSION_TYPE 1
  194. #define SERIAL_SESSION_TYPE 2
  195. #define SERIAL_TERMINAL_SESSION_TYPE 3
  196. #define KCS_SESSION_TYPE 4
  197. #define BT_SESSION_TYPE 5
  198. #define IPMB_SESSION_TYPE 6
  199. #define UDS_SESSION_TYPE 7
  200. #define USB_SESSION_TYPE 8
  201. #define BLADE_CHMC 0
  202. #define BLADE_IPMC 1
  203. #define CH_NOT_USED 0xFF
  204. /*----------------------------------------------
  205. * Bit fields
  206. *----------------------------------------------*/
  207. #define BIT0 0x0001
  208. #define BIT1 0x0002
  209. #define BIT2 0x0004
  210. #define BIT3 0x0008
  211. #define BIT4 0x0010
  212. #define BIT5 0x0020
  213. #define BIT6 0x0040
  214. #define BIT7 0x0080
  215. #define BIT8 0x0100
  216. #define BIT9 0x0200
  217. #define BIT10 0x0400
  218. #define BIT11 0x0800
  219. #define BIT12 0x1000
  220. #define BIT13 0x2000
  221. #define BIT14 0x4000
  222. #define BIT15 0x8000
  223. /*------- Net Functions -------------------*/
  224. #define NETFN_CHASSIS 0x00
  225. #define NETFN_BRIDGE 0x02
  226. #define NETFN_SENSOR 0x04
  227. #define NETFN_APP 0x06
  228. #define NETFN_FIRMWARE 0x08
  229. #define NETFN_STORAGE 0x0A
  230. #define NETFN_TRANSPORT 0x0C
  231. #define NETFN_PICMG 0x2C
  232. #define NETFN_STORLEAD 0x32
  233. #define NETFN_OEM 0x2E
  234. #define NETFN_OPMA1 0x30
  235. #define NETFN_OPMA2 0x3E
  236. #ifdef CFG_PROJ_SHMC_TEST_SUPPORT_YES
  237. #define NETFN_TEST_OEM 0x34
  238. #endif
  239. #define NETFN_UNKNOWN 0xFF
  240. #define IPMI_CMD_UNKNOWN 0xFF
  241. #define NETFN_GROUP_EXTN 0x2C
  242. #define IPMI_GROUP_EXTN_CODE_DCMI 0xDC
  243. /**** Command Completion Codes ****/
  244. #define CC_NORMAL 0x00
  245. #define CC_SUCCESS 0x00
  246. #define CC_NODE_BUSY 0xC0
  247. #define CC_INV_CMD 0xC1
  248. #define CC_INV_CMD_FOR_LUN 0xC2
  249. #define CC_TIMEOUT 0xC3
  250. #define CC_OUT_OF_SPACE 0xC4
  251. #define CC_INV_RESERVATION_ID 0xC5
  252. #define CC_REQ_TRUNCATED 0xC6
  253. #define CC_REQ_INV_LEN 0xC7
  254. #define CC_REQ_FIELD_LEN_EXCEEDED 0xC8
  255. #define CC_PARAM_OUT_OF_RANGE 0xC9
  256. #define CC_CANNOT_RETURN_REQ_BYTES 0xCA
  257. #define CC_SEL_REC_NOT_PRESENT 0xCB
  258. #define CC_SDR_REC_NOT_PRESENT 0xCB
  259. #define CC_FRU_REC_NOT_PRESENT 0xCB
  260. #define CC_INV_DATA_FIELD 0xCC
  261. #define CC_ILLEGAL_CMD_FOR_SENSOR_REC 0xCD
  262. #define CC_COULD_NOT_PROVIDE_RESP 0xCE
  263. #define CC_CANNOT_EXEC_DUPL_REQ 0xCF
  264. #define CC_SDR_REP_IN_UPDATE_MODE 0xD0
  265. #define CC_DEV_IN_FIRMWARE_UPDATE_MODE 0xD1
  266. #define CC_INIT_AGENT_IN_PROGRESS 0xD2
  267. #define CC_DEST_UNAVAILABLE 0xD3
  268. #define CC_INSUFFIENT_PRIVILEGE 0xD4
  269. #define CC_PARAM_NOT_SUP_IN_CUR_STATE 0xD5
  270. #define CC_ERR_HANDLING_COMMAND_FAILURE 0xD6
  271. #define CC_UNSPECIFIED_ERR 0xFF
  272. #define CC_GET_MSG_QUEUE_EMPTY 0x80
  273. #define CC_EVT_MSG_QUEUE_EMPTY 0x80
  274. #define CC_GET_SESSION_INVALID_USER 0x81
  275. #define CC_GET_SESSION_NULL_USER_DISABLED 0x82
  276. #define CC_ACTIVATE_SESS_NO_SESSION_SLOT_AVAILABLE 0x81
  277. #define CC_ACTIVATE_SESS_NO_SLOT_AVAILABLE_USER 0x82
  278. #define CC_ACTIVATE_SESS_REQ_LEVEL_EXCEEDS_LIMIT 0x83
  279. #define CC_ACTIVATE_SESS_SEQ_OUT_OF_RANGE 0x84
  280. #define CC_ACTIVATE_SESS_INVALID_SESSION_ID 0x85
  281. #define CC_ACTIVATE_SESS_MAX_PRIVILEGE_EXCEEDS_LIMIT 0x86
  282. #define CC_PASSWORD_TEST_FAILED 0x80
  283. #define CC_PASSWORD_TEST_FAILED_WRONG_SIZE 0x81
  284. #define CC_SETPASSWORD_INVALID_USERID 0x81
  285. #define CC_SETPASSWORD_CANNOT_DISABLE_USER 0x82
  286. #define CC_NO_ACK_FROM_SLAVE 0x83
  287. #define CC_GET_CH_COMMAND_NOT_SUPPORTED 0x82
  288. #define CC_SET_CH_COMMAND_NOT_SUPPORTED 0x82
  289. #define CC_SET_CH_ACCES_MODE_NOT_SUPPORTED 0x83
  290. #define CC_SET_SESS_PREV_REQ_LEVEL_NOT_AVAILABLE 0x80
  291. #define CC_SET_SESS_PREV_REQ_PRIVILEGE_EXCEEDS_LIMIT 0x81
  292. #define CC_SET_SESS_PREV_INVALID_SESSION_ID 0x82
  293. #define CC_ACTIVATE_SESS_NO_SLOT_AVAILABLE_USER 0x82
  294. #define CC_CLOSE_INVALID_SESSION_ID 0x87
  295. #define CC_CLOSE_INVALID_SESSION_ID_HANDLE 0x88
  296. #define CC_PEF_PARAM_NOT_SUPPORTED 0x80
  297. #define CC_PEF_SET_IN_PROGRESS 0x81
  298. #define CC_SESSION_IN_PROGRESS 0x82
  299. #define CC_PEF_ATTEMPT_TO_SET_READ_ONLY_PARAM 0x82
  300. #define CC_SET_IN_PROGRESS 0x81
  301. #define CC_ATTEMPT_TO_SET_RO_PARAM 0x82
  302. #define CC_PARAM_NOT_SUPPORTED 0x80
  303. #define CC_BIOS_NOT_READY 0x82
  304. #define CC_IFC_NOT_SUPPORTED 0x81
  305. #define CC_DISABLE_SM 0x81
  306. #define CC_BIOS_IS_BUSY 0x81
  307. #define CC_CMD_UNSUPPORTED_UNCONFIGURABLE 0x80
  308. #define CC_NTP_RESTART_ERROR 0x80
  309. #define CC_CALLBACK_REJ_SESSION_ACTIVE 0x82
  310. #define CC_WRITE_ONLY_PARAM 0x83
  311. #define CC_INST_ALREADY_ACTIVE 0x80
  312. #define CC_CANNOT_ACTIVATE_WITH_ENCR 0x83
  313. #define CC_PAYLOAD_NOT_ENABLED 0x81
  314. #define CC_INST_EXCEEDED 0x82
  315. #define CC_INST_ALREADY_INACTIVE 0x80
  316. #define CC_PAYLOAD_NOT_AVAILABLE 0x80
  317. #define CC_ENCRYPT_NOT_AVAILABLE 0x82
  318. #define CC_INST_NOT_ACTIVE 0x83
  319. #define CC_KEYS_LOCKED 0x80
  320. #define CC_INSUF_KEY_BYTES 0x81
  321. #define CC_TOO_MANY_KEY_BYTES 0x82
  322. #define CC_KEY_MISMATCH 0x83
  323. #define CC_INVALID_KEY 0x80
  324. #define CC_OP_NOT_SUPPORTED 0x80
  325. #define CC_OP_NOT_ALLOWED 0x81
  326. #define CC_ENC_NOT_AVAILABLE 0x82
  327. #define CC_CANNOT_ACTIVATE_WITH_ENCR 0x83
  328. #define CC_CANNOT_ACTIVATE_WITHOUT_ENCR 0x84
  329. #define CC_ATTEMPT_TO_RESET_UNIN_WATCHDOG 0x80
  330. #define CC_ILLEGAL_CONNECTOR_ID 0x81
  331. #define CC_SEL_ERASE_IN_PROGRESS 0x81
  332. #define CC_SAME_PAM_ORDER 0x90
  333. #define CC_PAM_ORDER_SEC_DIFERS 0x91
  334. #define CC_PAM_ORDER_FILE_DIFERS 0x92
  335. #define CC_INSUFFICIENT_SLAVE_COUNT 0x84
  336. #define CC_IFC_ALREADY_SLAVEDTO_BOND 0x85
  337. #define CC_BOND_DISABLED_TOCONF_DNS 0x86
  338. #define CC_DNS_CURRENTLY_NOT_SUPPORTED_FOR_IPV6 0x87
  339. #define CC_INV_DOMAIN_NAME 0x88
  340. #define CC_TSIGPRIVATEKEY_VALIDATION_FAILED 0x89
  341. #define CC_DNS_CURRENTLY_NOT_ENABLED 0x90
  342. #define CC_NULL_USERID_NOT_SUPPORTED 0x80
  343. #define CC_DEVICE_NOT_SUPPORTED 0X80
  344. #define CC_INCOMPLETE_WRITTEN_BYTES 0x80
  345. /* Completion code for Set system info parameter command */
  346. #define CC_SYS_INFO_PARAM_NOT_SUPPORTED 0x80
  347. #define CC_SYS_INFO_SET_IN_PROGRESS 0x81
  348. #define CC_SYS_INFO_READ_ONLY_PARAM 0x82
  349. #define IPMI_EVM_REVISION 0x04
  350. #define IPMI_SENSOR_TEMP_TYPE 0x01
  351. #define IPMI_SENSOR_VOLT_TYPE 0x02
  352. #define IPMI_SENSOR_FAN_TYPE 0x04
  353. #define IPMI_SENSOR_PHYSICAL_SECURITY_TYPE 0x05
  354. #define IPMI_SENSOR_POWER_SUPPLY_TYPE 0x08
  355. #define IPMI_SENSOR_MEMORY_TYPE 0x0C
  356. #define IPMI_SENSOR_DRIVE_TYPE 0x0D
  357. #define IPMI_SENSOR_BUTTON_TYPE 0x14
  358. #define IPMI_SENSOR_ENTITY_PRESENCE_TYPE 0x25
  359. #define IPMI_SENSOR_OEM_TYPE 0xC0
  360. /******************OEM Completion codes*********************/
  361. #define OEMCC_INVALID_USERNAME 0x01
  362. #define OEMCC_PASSWD_MISMATCH 0x02
  363. #define OEMCC_INVALID_PASSWD 0x03
  364. #define OEMCC_DUPLICATE_USERNAME 0x04
  365. #define OEMCC_USER_EXISTS_AT_SLOT 0x05
  366. #define OEMCC_NOMEM 0x06
  367. #define OEMCC_FILE_ERR 0x07
  368. #define OEMCC_SSHKEY_UPDATE_FAILURE 0x08
  369. #define OEMCC_SENSOR_DISABLED 0x09
  370. #define OEMCC_INVALID_SDR_ENTRY 0x0a
  371. #define OEMCC_CORRUPT_FLASH_DATA 0x0b
  372. #define OEMCC_CORRUPT_DATA_CHKSUM 0x0c
  373. #define OEMCC_FLASH_UPGRADE_FAILURE 0x0d
  374. #define OEMCC_VERSION_MISMATCH 0x0e
  375. #define OEMCC_USER_NOT_EXISTS 0x0f
  376. #define OEMCC_SAL_INVALID_TARGET 0x0f //CMM sal completion code
  377. #define OEMCC_EMAIL_NOT_CONFIGURED 0x10
  378. #define OEMCC_SMTP_DISABLED 0x11
  379. #define OEMCC_UNSUPPORTED_AUTH_TYPE 0x12
  380. #define OEMCC_SEND_EMAIL_AUTH_FAILED 0x13
  381. #define OEMCC_UNABLE_TO_CONNECT_SMTPSERVER 0x14
  382. #define OEMCC_SEND_EMAIL_FAILED 0x15
  383. #define OEMCC_USER_DISABLED 0x16
  384. #define OEMCC_RESERVED_USER_NAME 0x17
  385. #define OEMCC_INSUFFIENT_LANIFC_COUNT 0x80
  386. #define OEMCC_UNSUPPORTED_BOND_MODE 0x81
  387. #define OEMCC_VLAN_ENABLED_ON_SLAVE 0x82
  388. #define OEMCC_BOND_ALREADY_DISABLED 0x83
  389. #define OEMCC_INV_PARAM_ONLY_FOR_NON_BONDING 0x81
  390. #define OEMCC_INV_IP4_NOT_ENABLED 0x82
  391. #define OEMCC_INV_MIN_IFC_COUNT_DISABLED 0x83
  392. #define OEMCC_BOND_NOT_ENABLED 0x80
  393. #define OEMCC_ACTIVE_SLAVE_LINK_DOWN 0x81
  394. #define OEMCC_ETH_IFACE_DISABLED 0x85
  395. #define OEMCC_SEL_EMPTY_REPOSITORY 0x86
  396. #define OEMCC_SEL_CLEARED 0x85
  397. #define OEMCC_SENSOR_INFO_EMPTY 0x87
  398. #define OEMCC_ATTEMPT_TO_GET_WO_PARAM 0x82
  399. #define CC_POWER_LIMIT_OUT_OF_RANGE 0x84
  400. #define CC_CORRECTION_TIME_OUT_OF_RANGE 0x85
  401. #define CC_STAT_REPORTING_OUT_OF_RANGE 0x89
  402. #define CC_THERMAL_LIMIT_OUT_OF_RANGE 0x84
  403. #define CC_THERMAL_EXCEPTION_TIME_OUT_OF_RANGE 0x85
  404. #define OEMCC_INV_DATE_TIME 0x93
  405. /* HPM related Completion codes */
  406. #define CC_UPG_NOT_SUPPORTED_OVER_IFC 0x81
  407. #define CC_INV_COMPONENT_ID 0x82
  408. #define CC_INV_COMPONENT_PROP_SELECTOR 0x83
  409. #define CC_INV_COMPONENT 0x81
  410. #define CC_IMAGE_LEN_MISMATCH 0x81
  411. #define CC_INV_FW_CHECKSUM 0x82
  412. #define CC_IMAGE_NOT_MATCH 0x83
  413. #define CC_UPG_NOT_ABORTED_AT_THIS_MOMENT 0x80
  414. #define CC_UPG_ABORTED_FW_NOT_RESUMABLE 0x81
  415. #define CC_CMD_INPROGRESS 0x80
  416. /* Remote Images Service completion code*/
  417. #define CC_SERVICE_NOT_ENABLED 0x90
  418. #define CC_INVALID_MEDIA_TYPE 0x91
  419. #define CC_INVALID_SHARE_TYPE 0x92
  420. #define CC_INVALID_IP_ADDR 0x93
  421. #define CC_INVALID_COMMAND 0x94
  422. #define CC_INVALID_IMAGE_FILE_NAME 0x95
  423. #define CC_INVALID_DOMAIN 0x96
  424. #define CC_INVALID_CONFIGURATION 0x97
  425. #define CC_INVALID_IMG_PATH 0x98
  426. #define CC_INVALID_USR_NAME 0x99
  427. #define CC_INVALID_PASSWD 0x9A
  428. #define CC_INVALID_BLOCK_SELECTOR 0x9B
  429. #define CC_INV_PROGRESS_BIT 0x9C
  430. #define CC_PROGRESS_BIT_NOT_SET 0x9D
  431. #define CC_PUBLICKEY_VALIDATION_FAILED 0x80
  432. /*Host Lock Feature*/
  433. #define CC_FEATURE_NOT_ENABLED 0x80
  434. #define CC_INV_FEATURE_CMD 0x81
  435. #define CC_INV_LOCK_CMD 0x82
  436. /*--------------------------------------------
  437. * Macro to extract the net function.
  438. *--------------------------------------------*/
  439. #define NET_FN(NetFnLUN) ((uint8_t)((NetFnLUN & 0xFC) >> 2))
  440. #pragma pack( 1 )
  441. /*-------------------------
  442. * Disable Message Filter Table
  443. *-------------------------*/
  444. typedef struct
  445. {
  446. uint8_t NetFn;
  447. uint8_t Command;
  448. } DisableMsgFilterTbl_T;
  449. typedef struct
  450. {
  451. uint8_t NetFn;
  452. uint8_t Cmd;
  453. } FlashModeFilterTbl_T;
  454. /*----------------------------------
  455. * IPMI Commands Filter List Structure
  456. *----------------------------------*/
  457. typedef struct
  458. {
  459. uint8_t NetFn;
  460. uint8_t Cmd;
  461. } IPMICmdsFilterTbl_T;
  462. /* IPMI Message Header */
  463. typedef struct
  464. {
  465. uint8_t ResAddr;
  466. uint8_t NetFnLUN;
  467. uint8_t ChkSum;
  468. uint8_t ReqAddr;
  469. uint8_t RqSeqLUN;
  470. uint8_t Cmd;
  471. } IPMIMsgHdr_T;
  472. typedef struct
  473. {
  474. uint32_t SessionID;
  475. // uint8_t Privilege;
  476. uint16_t IPMIMsgLen;
  477. uint8_t NetFnLUN;
  478. uint8_t Cmd;
  479. uint8_t ChannelNum;
  480. // uint8_t AuthFlag;
  481. // uint8_t UserName[MAX_USERNAME_LEN];
  482. // uint8_t IPAddr[IP6_ADDR_LEN];
  483. // uint32_t ProcessID;
  484. // uint32_t ThreadID;
  485. }IPMIUDSMsg_T;
  486. #pragma pack( )
  487. #endif /* IPMI_DEFS_H */