43#define IPMB_ADDR_DISCONNECTED 0xA2
48#define IPMB_TXQUEUE_LEN 10
53#define IPMB_CLIENT_QUEUE_LEN 10
58#define IPMB_MAX_RETRIES 3
63#define IPMB_MSG_TIMEOUT 250/portTICK_PERIOD_MS
68#define CLIENT_NOTIFY_TIMEOUT 5
73#define IPMI_HEADER_CHECKSUM_POSITION 2
78#define IPMI_MSG_MAX_LENGTH 32
92#define IPMB_REQ_HEADER_LENGTH 6
108#define IPMB_RESP_HEADER_LENGTH 7
110#define IPMB_NETFN_MASK 0xFC
111#define IPMB_DEST_LUN_MASK 0x03
112#define IPMB_SEQ_MASK 0xFC
113#define IPMB_SRC_LUN_MASK 0x03
118#define MCH_ADDRESS 0x20
123#define IS_RESPONSE(msg) (msg.netfn & 0x01)
128#define IPMBL_TABLE_SIZE 27
Board specific definitions used in IPMB Layer.
ipmb_error ipmb_register_rxqueue(QueueHandle_t *queue)
Creates and returns a queue in which the client can block to receive the incoming requests.
Definition ipmb.c:329
void ipmb_init(void)
Initializes the IPMB Layer.
Definition ipmb.c:236
uint8_t get_ipmb_addr(void)
Reads own I2C slave address using GA pins.
Definition board_ipmb.c:44
ipmb_error ipmb_assert_chksum(uint8_t *buffer, uint8_t buffer_len)
Asserts the input message checksums by comparing them with our calculated ones.
Definition ipmb.c:344
void IPMB_RXTask(void *pvParameters)
IPMB Receiver Task.
Definition ipmb.c:179
ipmb_error
IPMB errors enumeration.
Definition ipmb.h:181
@ ipmb_error_timeout
Definition ipmb.h:185
@ ipmb_error_invalid_req
Definition ipmb.h:186
@ ipmb_error_unknown
Definition ipmb.h:182
@ ipmb_error_queue_creation
Definition ipmb.h:189
@ ipmb_error_success
Definition ipmb.h:183
@ ipmb_error_hdr_chksum
Definition ipmb.h:187
@ ipmb_error_msg_chksum
Definition ipmb.h:188
@ ipmb_error_failure
Definition ipmb.h:184
#define IPMI_MSG_MAX_LENGTH
Maximum length in bytes of a IPMI message (including connection header)
Definition ipmb.h:78
void IPMB_TXTask(void *pvParameters)
IPMB Transmitter Task.
Definition ipmb.c:99
ipmb_error ipmb_send_request(ipmi_msg *req)
Format and send a request via IPMB channel.
Definition ipmb.c:250
ipmb_error ipmb_send_response(ipmi_msg *req, ipmi_msg *resp)
Format and send a response via IPMB channel.
Definition ipmb.c:277
GA_Pin_state
GA pins definition.
Definition ipmb.h:133
@ UNCONNECTED
Definition ipmb.h:136
@ POWERED
Definition ipmb.h:135
@ GROUNDED
Definition ipmb.h:134
uint8_t ipmb_addr
AMC IPMB Address.
Definition ipmb.c:91
struct ipmi_msg_cfg ipmi_msg_cfg
IPMI message configuration struct.
struct ipmi_msg ipmi_msg
IPMI message struct.
IPMI message configuration struct.
Definition ipmb.h:171
uint8_t retries
Definition ipmb.h:174
TaskHandle_t caller_task
Definition ipmb.h:173
ipmi_msg buffer
Definition ipmb.h:172
uint32_t timestamp
Definition ipmb.h:175
IPMI message struct.
Definition ipmb.h:142
uint8_t data[IPMI_MSG_MAX_LENGTH]
Definition ipmb.h:159
uint8_t src_addr
Definition ipmb.h:149
uint8_t dest_LUN
Definition ipmb.h:147
uint8_t netfn
Definition ipmb.h:144
uint8_t seq
Definition ipmb.h:150
uint8_t completion_code
Definition ipmb.h:155
uint8_t data_len
Definition ipmb.h:158
uint8_t dest_addr
Definition ipmb.h:143
uint8_t cmd
Definition ipmb.h:152
uint8_t hdr_chksum
Definition ipmb.h:148
uint8_t msg_chksum
Definition ipmb.h:163
uint8_t src_LUN
Definition ipmb.h:151