blob: c4994fd6b0d15bd0c53f5c13525e9ed17c749ad2 [file] [log] [blame]
Patrick Venture7dc46702018-08-08 09:43:33 -07001#pragma once
2
3/* The Aspeed AST2400 & AST2500 have 64 bytes of SRAM as the FIFO for each
4 * direction, of which 2 bytes are reserved for len and for seq by upper layer
5 * ipmi driver.
6 */
7#define MAX_PIPELINE_BANDWIDTH 62
8#define IPMI_BUF_SIZE 1024
9
10#include <stdint.h>
11
12struct IpmiResponse
13{
14 uint8_t ccode;
15 uint8_t data[IPMI_BUF_SIZE];
16 int dataLen;
17};
18
19/**
20 * Call into the ipmitool source to send the IPMI packet.
21 *
22 * @param[in] bytes - the IPMI packet contents.
23 * @param[in] length - the number of bytes.
24 * @param[in,out] resp - a pointer to write the response.
25 * @return 0 on success.
26 */
27int ipmiSendCommand(const uint8_t* bytes, int length,
28 struct IpmiResponse* resp);