|
OpenBIC
OpenSource Bridge-IC
|
#include "pldm.h"#include "mctp.h"#include <logging/log.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/printk.h>#include <sys/slist.h>#include <zephyr.h>#include "libutil.h"#include "ipmi.h"#include "plat_def.h"
Classes | |
| struct | _wait_msg |
| struct | _pldm_handler_query_entry |
| struct | _pldm_recv_resp_arg |
Macros | |
| #define | PLDM_HDR_INST_ID_MASK 0x1F |
| #define | PLDM_MAX_INSTID_COUNT (PLDM_HDR_INST_ID_MASK + 1) |
| #define | PLDM_MSG_CHECK_PER_MS 1000 |
| #define | PLDM_MSG_TIMEOUT_MS 30000 |
| #define | PLDM_MSG_MAX_RETRY 3 |
| #define | PLDM_FW_UPDATE_TIMEOUT_MS 30000 |
| #define | PLDM_FW_UPDATE_MAX_RETRY 3 |
| #define | PLDM_RESP_MSG_PROC_MUTEX_TIMEOUT_MS 500 |
| #define | PLDM_TASK_NAME_MAX_SIZE 32 |
| #define | PLDM_READ_EVENT_SUCCESS BIT(0) |
| #define | PLDM_READ_EVENT_TIMEOUT BIT(1) |
Typedefs | |
| typedef struct _wait_msg | wait_msg |
| typedef struct _pldm_recv_resp_arg | pldm_recv_resp_arg |
Functions | |
| LOG_MODULE_REGISTER (pldm) | |
| void | pldm_read_resp_handler (void *args, uint8_t *rbuf, uint16_t rlen) |
| uint16_t | mctp_pldm_read (void *mctp_p, pldm_msg *msg, uint8_t *rbuf, uint16_t rbuf_len) |
| uint8_t | mctp_pldm_cmd_handler (void *mctp_p, uint8_t *buf, uint32_t len, mctp_ext_params ext_params) |
| uint8_t | mctp_pldm_send_msg (void *mctp_p, pldm_msg *msg) |
| uint8_t | get_supported_pldm_type (uint8_t *buf, uint8_t buf_size) |
| Get the supported PLDM types. More... | |
| uint8_t | get_supported_pldm_commands (PLDM_TYPE type, uint8_t *buf, uint8_t buf_size) |
| int | pldm_send_ipmi_response (uint8_t interface, ipmi_msg *msg) |
| int | pldm_send_ipmi_request (ipmi_msg *msg) |
| K_THREAD_DEFINE (pldm_wait_resp_to, 1024, pldm_msg_timeout_monitor, NULL, NULL, NULL, 7, 0, 0) | |
| #define PLDM_FW_UPDATE_MAX_RETRY 3 |
| #define PLDM_FW_UPDATE_TIMEOUT_MS 30000 |
| #define PLDM_HDR_INST_ID_MASK 0x1F |
| #define PLDM_MAX_INSTID_COUNT (PLDM_HDR_INST_ID_MASK + 1) |
| #define PLDM_MSG_CHECK_PER_MS 1000 |
| #define PLDM_MSG_MAX_RETRY 3 |
| #define PLDM_MSG_TIMEOUT_MS 30000 |
| #define PLDM_READ_EVENT_SUCCESS BIT(0) |
| #define PLDM_READ_EVENT_TIMEOUT BIT(1) |
| #define PLDM_RESP_MSG_PROC_MUTEX_TIMEOUT_MS 500 |
| #define PLDM_TASK_NAME_MAX_SIZE 32 |
| typedef struct _pldm_recv_resp_arg pldm_recv_resp_arg |
| uint8_t get_supported_pldm_commands | ( | PLDM_TYPE | type, |
| uint8_t * | buf, | ||
| uint8_t | buf_size | ||
| ) |
| uint8_t get_supported_pldm_type | ( | uint8_t * | buf, |
| uint8_t | buf_size | ||
| ) |
Get the supported PLDM types.
| buf | Pointer to the buffer, which should have 8 bytes |
| buf_size | Number of buf's bytes |
| 0 | if successful |
| K_THREAD_DEFINE | ( | pldm_wait_resp_to | , |
| 1024 | , | ||
| pldm_msg_timeout_monitor | , | ||
| NULL | , | ||
| NULL | , | ||
| NULL | , | ||
| 7 | , | ||
| 0 | , | ||
| 0 | |||
| ) |
| LOG_MODULE_REGISTER | ( | pldm | ) |
| uint8_t mctp_pldm_cmd_handler | ( | void * | mctp_p, |
| uint8_t * | buf, | ||
| uint32_t | len, | ||
| mctp_ext_params | ext_params | ||
| ) |
| uint16_t mctp_pldm_read | ( | void * | mctp_p, |
| pldm_msg * | msg, | ||
| uint8_t * | rbuf, | ||
| uint16_t | rbuf_len | ||
| ) |

| uint8_t mctp_pldm_send_msg | ( | void * | mctp_p, |
| pldm_msg * | msg | ||
| ) |
| void pldm_read_resp_handler | ( | void * | args, |
| uint8_t * | rbuf, | ||
| uint16_t | rlen | ||
| ) |
| int pldm_send_ipmi_request | ( | ipmi_msg * | msg | ) |

| int pldm_send_ipmi_response | ( | uint8_t | interface, |
| ipmi_msg * | msg | ||
| ) |
