OpenBIC
OpenSource Bridge-IC
plat_mctp.h
Go to the documentation of this file.
1#ifndef _PLAT_MCTP_h
2#define _PLAT_MCTP_h
3#include <kernel.h>
4#include "storage_handler.h"
5#include "pldm.h"
6
7/* mctp endpoint */
8#define MCTP_EID_BMC 0x08
9#define MCTP_EID_SATMC 0xF0
10
12 uint8_t iana[IANA_LEN];
13 uint8_t netfn_lun;
14 uint8_t ipmi_cmd;
15} __attribute__((__packed__));
16;
17
19 uint8_t completion_code;
20 uint8_t netfn_lun;
21 uint8_t ipmi_cmd;
22 uint8_t ipmi_comp_code;
23} __attribute__((__packed__));
24;
25
26enum {
29};
30
34} __attribute__((__packed__));
35
39} __attribute__((__packed__));
40
41/* init the mctp moduel for platform */
42void plat_mctp_init(void);
43void send_cmd_to_dev(struct k_timer *timer);
44void send_cmd_to_dev_handler(struct k_work *work);
45bool mctp_add_sel_to_ipmi(struct ipmi_storage_add_sel_req *sel_msg, uint8_t sel_type);
47mctp_port *plat_get_mctp_port(uint8_t index);
49
50#endif /* _PLAT_MCTP_h */
void plat_mctp_init(void)
Definition: plat_mctp.c:218
void send_cmd_to_dev(struct k_timer *timer)
Definition: plat_mctp.c:548
bool mctp_add_sel_to_ipmi(common_addsel_msg_t *sel_msg)
Definition: plat_mctp.c:259
void send_cmd_to_dev_handler(struct k_work *work)
Definition: plat_mctp.c:533
#define IANA_LEN
Definition: pldm_oem.h:27
Definition: mctp.h:204
Definition: storage_handler.h:56
Definition: storage_handler.h:63
Definition: plat_mctp.h:23
uint8_t netfn_lun
Definition: plat_mctp.h:25
uint8_t ipmi_cmd
Definition: plat_mctp.h:26
uint8_t iana[IANA_LEN]
Definition: plat_mctp.h:24
Definition: plat_mctp.h:30
uint8_t ipmi_comp_code
Definition: plat_mctp.h:35
uint8_t ipmi_cmd
Definition: plat_mctp.h:34
uint8_t netfn_lun
Definition: plat_mctp.h:33
uint8_t completion_code
Definition: plat_mctp.h:31
Definition: plat_mctp.h:39
struct ipmi_storage_add_sel_req req_data
Definition: plat_mctp.h:41
struct mctp_to_ipmi_header_req header
Definition: plat_mctp.h:40
Definition: plat_mctp.h:44
struct mctp_to_ipmi_header_resp header
Definition: plat_mctp.h:45
struct ipmi_storage_add_sel_resp resp_data
Definition: plat_mctp.h:46
uint8_t plat_get_mctp_port_count()
Definition: mctp.c:675
mctp_port * plat_get_mctp_port(uint8_t index)
Definition: mctp.c:680
enum @172 __attribute__
void satmc_status_update()
Definition: plat_mctp.c:106
@ ADD_COMMON_SEL
Definition: plat_mctp.h:27
@ ADD_OEM_SEL
Definition: plat_mctp.h:28