#include <stdint.h>
#include <sys/printk.h>
#include <zephyr.h>
Go to the source code of this file.
|
typedef struct _mctp_i3c_ext_params | mctp_i3c_ext_params |
|
typedef struct _mctp_smbus_ext_params | mctp_smbus_ext_params |
|
typedef struct _mctp_ext_params | mctp_ext_params |
|
typedef uint8_t(* | mctp_fn_cb) (void *mctp_p, uint8_t *buf, uint32_t len, mctp_ext_params ext_params) |
|
typedef uint16_t(* | medium_tx) (void *mctp_p, uint8_t *buf, uint32_t len, mctp_ext_params ext_params) |
|
typedef uint16_t(* | medium_rx) (void *mctp_p, uint8_t *buf, uint32_t len, mctp_ext_params *ext_params) |
|
typedef uint8_t(* | endpoint_resolve) (uint8_t dest_endpoint, void **mctp_inst, mctp_ext_params *ext_params) |
|
typedef struct _mctp_i3c_conf | mctp_i3c_conf |
|
typedef struct _mctp_smbus_conf | mctp_smbus_conf |
|
typedef struct _mctp | mctp |
|
typedef struct _mctp_smbus_port | mctp_port |
|
typedef struct _mctp_route_entry | mctp_route_entry |
|
typedef struct _mctp_msg_handler | mctp_msg_handler |
|
|
enum | MCTP_MSG_TYPE {
MCTP_MSG_TYPE_CTRL = 0x00
, MCTP_MSG_TYPE_PLDM
, MCTP_MSG_TYPE_NCSI
, MCTP_MSG_TYPE_ETH
,
MCTP_MSG_TYPE_NVME
, MCTP_MSG_TYPE_CCI = 0x08
, MCTP_MSG_TYPE_VEN_DEF_PCI = 0x7E
, MCTP_MSG_TYPE_VEN_DEF_IANA = 0x7F
} |
|
enum | MCTP_MEDIUM_TYPE {
MCTP_MEDIUM_TYPE_UNKNOWN = 0
, MCTP_MEDIUM_TYPE_SMBUS
, MCTP_MEDIUM_TYPE_CONTROLLER_I3C
, MCTP_MEDIUM_TYPE_TARGET_I3C
,
MCTP_MEDIUM_TYPE_MAX
} |
|
|
struct | __attribute__ ((aligned(4))) |
|
uint8_t | plat_get_mctp_port_count () |
|
mctp_port * | plat_get_mctp_port (uint8_t index) |
|
mctp * | mctp_init (void) |
|
uint8_t | mctp_deinit (mctp *mctp_inst) |
|
uint8_t | mctp_set_medium_configure (mctp *mctp_inst, MCTP_MEDIUM_TYPE medium_type, mctp_medium_conf medium_conf) |
|
uint8_t | mctp_get_medium_configure (mctp *mctp_inst, MCTP_MEDIUM_TYPE *medium_type, mctp_medium_conf *medium_conf) |
|
uint8_t | mctp_start (mctp *mctp_inst) |
|
uint8_t | mctp_stop (mctp *mctp_inst) |
|
uint8_t | mctp_send_msg (mctp *mctp_inst, uint8_t *buf, uint16_t len, mctp_ext_params ext_params) |
|
uint8_t | mctp_bridge_msg (mctp *mctp_inst, uint8_t *buf, uint16_t len, mctp_ext_params ext_params) |
|
uint8_t | mctp_smbus_init (mctp *mctp_inst, mctp_medium_conf medium_conf) |
|
uint8_t | mctp_smbus_deinit (mctp *mctp_inst) |
|
uint8_t | mctp_i3c_controller_init (mctp *mctp_instance, mctp_medium_conf medium_conf) |
|
uint8_t | mctp_i3c_target_init (mctp *mctp_instance, mctp_medium_conf medium_conf) |
|
uint8_t | mctp_i3c_deinit (mctp *mctp_instance) |
|
uint8_t | mctp_reg_endpoint_resolve_func (mctp *mctp_inst, endpoint_resolve resolve_fn) |
|
bool | get_mctp_info_by_eid (uint8_t port, mctp **mctp_inst, mctp_ext_params *ext_params) |
|
uint8_t | get_mctp_info (uint8_t dest_endpoint, mctp **mctp_inst, mctp_ext_params *ext_params) |
|
uint8_t | mctp_reg_msg_rx_func (mctp *mctp_inst, mctp_fn_cb rx_cb) |
|
mctp * | pal_get_mctp (uint8_t mctp_medium_type, uint8_t bus) |
|
int | pal_get_target (uint8_t interface) |
|
int | pal_get_medium_type (uint8_t interface) |
|
uint8_t | plat_get_eid () |
|
int | pal_find_bus_in_mctp_port (mctp_port *p) |
|
mctp * | pal_find_mctp_by_bus (uint8_t bus) |
|
mctp_port * | pal_find_mctp_port_by_channel_target (uint8_t target) |
|
bool | pal_is_need_mctp_interval (mctp *mctp_inst) |
|
int | pal_get_mctp_interval_ms (mctp *mctp_inst) |
|
◆ MCTP_DEBUG
◆ MCTP_DEFAULT_ENDPOINT
#define MCTP_DEFAULT_ENDPOINT 0x0A |
◆ MCTP_DEFAULT_MSG_MAX_SIZE
#define MCTP_DEFAULT_MSG_MAX_SIZE 64 |
◆ MCTP_ERROR
◆ MCTP_HDR_HDR_VER
#define MCTP_HDR_HDR_VER 0x01 |
◆ MCTP_HDR_SEQ_MASK
#define MCTP_HDR_SEQ_MASK 0x03 |
◆ MCTP_HDR_TAG_MASK
#define MCTP_HDR_TAG_MASK 0x07 |
◆ MCTP_IC_MASK
#define MCTP_IC_MASK 0x80 |
◆ MCTP_IC_SHIFT
◆ MCTP_MAX_MSG_TAG_NUM
#define MCTP_MAX_MSG_TAG_NUM 8 |
◆ MCTP_MEDIUM_META_SIZE_SMBUS
#define MCTP_MEDIUM_META_SIZE_SMBUS 3 |
◆ MCTP_META_INFO_SIZE
◆ MCTP_MSG_TYPE_MASK
#define MCTP_MSG_TYPE_MASK 0x7F |
◆ MCTP_MSG_TYPE_SHIFT
#define MCTP_MSG_TYPE_SHIFT 0 |
◆ MCTP_NULL_EID
#define MCTP_NULL_EID 0x00 |
◆ MCTP_PEC_SIZE
#define MCTP_PEC_SIZE 1 /* SMBUS/I3C */ |
◆ MCTP_POLL_TIME_MS
#define MCTP_POLL_TIME_MS 1 |
◆ MCTP_REQUEST
◆ MCTP_RESPONSE
◆ MCTP_RX_TASK_STACK_SIZE
#define MCTP_RX_TASK_STACK_SIZE 4096 |
◆ MCTP_SUCCESS
◆ MCTP_TASK_NAME_LEN
#define MCTP_TASK_NAME_LEN 32 |
◆ MCTP_TRANSPORT_HEADER_SIZE
#define MCTP_TRANSPORT_HEADER_SIZE 4 |
◆ MCTP_TX_QUEUE_SIZE
#define MCTP_TX_QUEUE_SIZE 16 |
◆ MCTP_TX_TASK_STACK_SIZE
#define MCTP_TX_TASK_STACK_SIZE 2048 |
◆ MSG_ASSEMBLY_BUF_SIZE
#define MSG_ASSEMBLY_BUF_SIZE 1024 |
◆ endpoint_resolve
typedef uint8_t(* endpoint_resolve) (uint8_t dest_endpoint, void **mctp_inst, mctp_ext_params *ext_params) |
◆ mctp
◆ mctp_ext_params
◆ mctp_fn_cb
typedef uint8_t(* mctp_fn_cb) (void *mctp_p, uint8_t *buf, uint32_t len, mctp_ext_params ext_params) |
◆ mctp_i3c_conf
◆ mctp_i3c_ext_params
◆ mctp_msg_handler
◆ mctp_port
◆ mctp_route_entry
◆ mctp_smbus_conf
◆ mctp_smbus_ext_params
◆ medium_rx
typedef uint16_t(* medium_rx) (void *mctp_p, uint8_t *buf, uint32_t len, mctp_ext_params *ext_params) |
◆ medium_tx
typedef uint16_t(* medium_tx) (void *mctp_p, uint8_t *buf, uint32_t len, mctp_ext_params ext_params) |
◆ MCTP_MEDIUM_TYPE
Enumerator |
---|
MCTP_MEDIUM_TYPE_UNKNOWN | |
MCTP_MEDIUM_TYPE_SMBUS | |
MCTP_MEDIUM_TYPE_CONTROLLER_I3C | |
MCTP_MEDIUM_TYPE_TARGET_I3C | |
MCTP_MEDIUM_TYPE_MAX | |
◆ MCTP_MSG_TYPE
Enumerator |
---|
MCTP_MSG_TYPE_CTRL | |
MCTP_MSG_TYPE_PLDM | |
MCTP_MSG_TYPE_NCSI | |
MCTP_MSG_TYPE_ETH | |
MCTP_MSG_TYPE_NVME | |
MCTP_MSG_TYPE_CCI | |
MCTP_MSG_TYPE_VEN_DEF_PCI | |
MCTP_MSG_TYPE_VEN_DEF_IANA | |
◆ __attribute__()
◆ get_mctp_info()
uint8_t get_mctp_info |
( |
uint8_t |
dest_endpoint, |
|
|
mctp ** |
mctp_inst, |
|
|
mctp_ext_params * |
ext_params |
|
) |
| |
◆ get_mctp_info_by_eid()
◆ mctp_bridge_msg()
uint8_t mctp_bridge_msg |
( |
mctp * |
mctp_inst, |
|
|
uint8_t * |
buf, |
|
|
uint16_t |
len, |
|
|
mctp_ext_params |
ext_params |
|
) |
| |
◆ mctp_deinit()
uint8_t mctp_deinit |
( |
mctp * |
mctp_inst | ) |
|
◆ mctp_get_medium_configure()
◆ mctp_i3c_controller_init()
◆ mctp_i3c_deinit()
uint8_t mctp_i3c_deinit |
( |
mctp * |
mctp_instance | ) |
|
◆ mctp_i3c_target_init()
◆ mctp_init()
mctp * mctp_init |
( |
void |
| ) |
|
◆ mctp_reg_endpoint_resolve_func()
◆ mctp_reg_msg_rx_func()
◆ mctp_send_msg()
uint8_t mctp_send_msg |
( |
mctp * |
mctp_inst, |
|
|
uint8_t * |
buf, |
|
|
uint16_t |
len, |
|
|
mctp_ext_params |
ext_params |
|
) |
| |
◆ mctp_set_medium_configure()
◆ mctp_smbus_deinit()
uint8_t mctp_smbus_deinit |
( |
mctp * |
mctp_inst | ) |
|
◆ mctp_smbus_init()
◆ mctp_start()
uint8_t mctp_start |
( |
mctp * |
mctp_inst | ) |
|
◆ mctp_stop()
uint8_t mctp_stop |
( |
mctp * |
mctp_inst | ) |
|
◆ pal_find_bus_in_mctp_port()
int pal_find_bus_in_mctp_port |
( |
mctp_port * |
p | ) |
|
◆ pal_find_mctp_by_bus()
mctp * pal_find_mctp_by_bus |
( |
uint8_t |
bus | ) |
|
◆ pal_find_mctp_port_by_channel_target()
mctp_port * pal_find_mctp_port_by_channel_target |
( |
uint8_t |
target | ) |
|
◆ pal_get_mctp()
mctp * pal_get_mctp |
( |
uint8_t |
mctp_medium_type, |
|
|
uint8_t |
bus |
|
) |
| |
◆ pal_get_mctp_interval_ms()
int pal_get_mctp_interval_ms |
( |
mctp * |
mctp_inst | ) |
|
◆ pal_get_medium_type()
int pal_get_medium_type |
( |
uint8_t |
interface | ) |
|
◆ pal_get_target()
int pal_get_target |
( |
uint8_t |
interface | ) |
|
◆ pal_is_need_mctp_interval()
bool pal_is_need_mctp_interval |
( |
mctp * |
mctp_inst | ) |
|
◆ plat_get_eid()
◆ plat_get_mctp_port()
mctp_port * plat_get_mctp_port |
( |
uint8_t |
index | ) |
|
◆ plat_get_mctp_port_count()
uint8_t plat_get_mctp_port_count |
( |
| ) |
|
◆ mctp_tx_msg