OpenBIC
OpenSource Bridge-IC
pldm_base.h File Reference
#include "pldm.h"
#include <stdint.h>
Include dependency graph for pldm_base.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _set_tid_req
 
struct  _set_tid_resp
 
struct  _get_tid_resp
 
struct  _get_pldm_types_resp
 
struct  _get_pldm_commands_req
 
struct  _get_pldm_commands_resp
 

Macros

#define PLDM_BASE_CMD_CODE_SETTID   0x01
 
#define PLDM_BASE_CMD_CODE_GETTID   0x02
 
#define PLDM_BASE_CMD_CODE_GET_PLDM_VER   0x03
 
#define PLDM_BASE_CMD_CODE_GET_PLDM_TYPE   0x04
 
#define PLDM_BASE_CMD_CODE_GET_PLDM_CMDS   0x05
 
#define DEFAULT_TID   0x86
 
#define GET_PLDM_TYPE_BUF_SIZE   8
 
#define GET_PLDM_COMMAND_BUF_SIZE   32
 
#define INVALID_PLDM_TYPE_IN_REQUEST_DATA   0x83
 
#define INVALID_PLDM_VERSION_IN_REQUEST_DATA   0x84
 

Enumerations

enum  pldm_completion_codes {
  PLDM_SUCCESS = 0x00 , PLDM_ERROR = 0x01 , PLDM_ERROR_INVALID_DATA = 0x02 , PLDM_ERROR_INVALID_LENGTH = 0x03 ,
  PLDM_ERROR_NOT_READY = 0x04 , PLDM_ERROR_UNSUPPORTED_PLDM_CMD = 0x05 , PLDM_ERROR_INVALID_PLDM_TYPE = 0x20 , PLDM_INVALID_TRANSFER_OPERATION_FLAG = 0x21 ,
  PLDM_LATER_RESP = 0x30
}
 
enum  pldm_transport_protocol_type { PLDM_TRANSPORT_PROTOCOL_TYPE_MCTP = 0x00 , PLDM_TRANSPORT_PROTOCOL_TYPE_NCSI = 0x01 , PLDM_TRANSPORT_PROTOCOL_TYPE_OEM = 0xFF }
 
enum  pldm_transfer_flag { PLDM_START = 0x01 , PLDM_MIDDLE = 0x02 , PLDM_END = 0x04 , PLDM_START_AND_END = 0x05 }
 

Functions

struct _set_tid_req __attribute__ ((packed))
 
uint8_t pldm_base_handler_query (uint8_t code, void **ret_fn)
 
uint8_t plat_pldm_get_tid ()
 

Variables

uint8_t tid
 
uint8_t completion_code
 
uint8_t pldm_types [GET_PLDM_TYPE_BUF_SIZE]
 
uint8_t type
 
uint32_t version
 
uint8_t pldm_commands [GET_PLDM_COMMAND_BUF_SIZE]
 

Macro Definition Documentation

◆ DEFAULT_TID

#define DEFAULT_TID   0x86

◆ GET_PLDM_COMMAND_BUF_SIZE

#define GET_PLDM_COMMAND_BUF_SIZE   32

◆ GET_PLDM_TYPE_BUF_SIZE

#define GET_PLDM_TYPE_BUF_SIZE   8

◆ INVALID_PLDM_TYPE_IN_REQUEST_DATA

#define INVALID_PLDM_TYPE_IN_REQUEST_DATA   0x83

◆ INVALID_PLDM_VERSION_IN_REQUEST_DATA

#define INVALID_PLDM_VERSION_IN_REQUEST_DATA   0x84

◆ PLDM_BASE_CMD_CODE_GET_PLDM_CMDS

#define PLDM_BASE_CMD_CODE_GET_PLDM_CMDS   0x05

◆ PLDM_BASE_CMD_CODE_GET_PLDM_TYPE

#define PLDM_BASE_CMD_CODE_GET_PLDM_TYPE   0x04

◆ PLDM_BASE_CMD_CODE_GET_PLDM_VER

#define PLDM_BASE_CMD_CODE_GET_PLDM_VER   0x03

◆ PLDM_BASE_CMD_CODE_GETTID

#define PLDM_BASE_CMD_CODE_GETTID   0x02

◆ PLDM_BASE_CMD_CODE_SETTID

#define PLDM_BASE_CMD_CODE_SETTID   0x01

Enumeration Type Documentation

◆ pldm_completion_codes

Enumerator
PLDM_SUCCESS 
PLDM_ERROR 
PLDM_ERROR_INVALID_DATA 
PLDM_ERROR_INVALID_LENGTH 
PLDM_ERROR_NOT_READY 
PLDM_ERROR_UNSUPPORTED_PLDM_CMD 
PLDM_ERROR_INVALID_PLDM_TYPE 
PLDM_INVALID_TRANSFER_OPERATION_FLAG 
PLDM_LATER_RESP 

◆ pldm_transfer_flag

Enumerator
PLDM_START 
PLDM_MIDDLE 
PLDM_END 
PLDM_START_AND_END 

◆ pldm_transport_protocol_type

Enumerator
PLDM_TRANSPORT_PROTOCOL_TYPE_MCTP 
PLDM_TRANSPORT_PROTOCOL_TYPE_NCSI 
PLDM_TRANSPORT_PROTOCOL_TYPE_OEM 

Function Documentation

◆ __attribute__()

struct _set_tid_req __attribute__ ( (packed)  )

◆ plat_pldm_get_tid()

uint8_t plat_pldm_get_tid ( )
Here is the call graph for this function:

◆ pldm_base_handler_query()

uint8_t pldm_base_handler_query ( uint8_t  code,
void **  ret_fn 
)

Variable Documentation

◆ completion_code

uint8_t completion_code

◆ pldm_commands

uint8_t pldm_commands[GET_PLDM_COMMAND_BUF_SIZE]

◆ pldm_types

uint8_t pldm_types[GET_PLDM_TYPE_BUF_SIZE]

◆ tid

uint8_t tid

◆ type

uint8_t type

◆ version

uint32_t version