OpenBIC
OpenSource Bridge-IC
pldm.h File Reference
#include "mctp.h"
#include "pldm_base.h"
#include "pldm_oem.h"
#include "pldm_monitor.h"
#include "pldm_firmware_update.h"
#include "pldm_state_set.h"
#include "pldm_smbios.h"
#include "ipmb.h"
Include dependency graph for pldm.h:

Go to the source code of this file.

Classes

struct  _pldm_cmd_handler
 
struct  _pldm_msg
 
struct  _pldm
 
struct  pldm_variable_field
 
struct  _pldm_ipmi_cmd_resp
 

Macros

#define MONITOR_THREAD_STACK_SIZE   1024
 
#define PLDM_MAX_DATA_SIZE_DEFAULT   512
 

Typedefs

typedef uint8_t(* pldm_cmd_proc_fn) (void *, uint8_t *, uint16_t, uint8_t, uint8_t *, uint16_t *, void *)
 
typedef struct _pldm_cmd_handler pldm_cmd_handler
 
typedef struct _pldm_msg pldm_msg
 
typedef struct _pldm pldm_t
 

Enumerations

enum  PLDM_TYPE {
  PLDM_TYPE_BASE = 0x00 , PLDM_TYPE_SMBIOS = 0x01 , PLDM_TYPE_PLAT_MON_CTRL , PLDM_TYPE_BIOS_CTRL_CONF ,
  PLDM_TYPE_FW_UPDATE = 0x05 , PLDM_TYPE_OEM = 0x3F
}
 
enum  PLDM_MESSAGE_TYPE { PLDM_RESPONSE , PLDM_REQUEST }
 

Functions

struct __attribute__ ((packed))
 
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)
 
int pldm_send_ipmi_response (uint8_t interface, ipmi_msg *msg)
 
int pldm_send_ipmi_request (ipmi_msg *msg)
 
uint16_t mctp_pldm_read (void *mctp_p, pldm_msg *msg, uint8_t *rbuf, uint16_t rbuf_len)
 
pldm_tpldm_init (void *interface, uint8_t user_idx)
 
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)
 

Variables

 pldm_hdr
 
 pldm_resp_hdr
 
uint8_t completion_code
 
uint8_t netfn_lun
 
uint8_t cmd
 
uint8_t ipmi_comp_code
 
uint8_t first_data
 

Macro Definition Documentation

◆ MONITOR_THREAD_STACK_SIZE

#define MONITOR_THREAD_STACK_SIZE   1024

◆ PLDM_MAX_DATA_SIZE_DEFAULT

#define PLDM_MAX_DATA_SIZE_DEFAULT   512

Typedef Documentation

◆ pldm_cmd_handler

◆ pldm_cmd_proc_fn

typedef uint8_t(* pldm_cmd_proc_fn) (void *, uint8_t *, uint16_t, uint8_t, uint8_t *, uint16_t *, void *)

◆ pldm_msg

typedef struct _pldm_msg pldm_msg

◆ pldm_t

typedef struct _pldm pldm_t

Enumeration Type Documentation

◆ PLDM_MESSAGE_TYPE

Enumerator
PLDM_RESPONSE 
PLDM_REQUEST 

◆ PLDM_TYPE

enum PLDM_TYPE
Enumerator
PLDM_TYPE_BASE 
PLDM_TYPE_SMBIOS 
PLDM_TYPE_PLAT_MON_CTRL 
PLDM_TYPE_BIOS_CTRL_CONF 
PLDM_TYPE_FW_UPDATE 
PLDM_TYPE_OEM 

Function Documentation

◆ __attribute__()

struct __attribute__ ( (packed)  )

◆ get_supported_pldm_commands()

uint8_t get_supported_pldm_commands ( PLDM_TYPE  type,
uint8_t *  buf,
uint8_t  buf_size 
)

◆ get_supported_pldm_type()

uint8_t get_supported_pldm_type ( uint8_t *  buf,
uint8_t  buf_size 
)

Get the supported PLDM types.

Parameters
bufPointer to the buffer, which should have 8 bytes
buf_sizeNumber of buf's bytes
Return values
0if successful

◆ mctp_pldm_cmd_handler()

uint8_t mctp_pldm_cmd_handler ( void *  mctp_p,
uint8_t *  buf,
uint32_t  len,
mctp_ext_params  ext_params 
)

◆ mctp_pldm_read()

uint16_t mctp_pldm_read ( void *  mctp_p,
pldm_msg msg,
uint8_t *  rbuf,
uint16_t  rbuf_len 
)
Here is the call graph for this function:

◆ mctp_pldm_send_msg()

uint8_t mctp_pldm_send_msg ( void *  mctp_p,
pldm_msg msg 
)

◆ pldm_init()

pldm_t * pldm_init ( void *  interface,
uint8_t  user_idx 
)

◆ pldm_send_ipmi_request()

int pldm_send_ipmi_request ( ipmi_msg msg)
Here is the call graph for this function:

◆ pldm_send_ipmi_response()

int pldm_send_ipmi_response ( uint8_t  interface,
ipmi_msg msg 
)
Here is the call graph for this function:

Variable Documentation

◆ cmd

uint8_t cmd

◆ completion_code

uint8_t completion_code

◆ first_data

uint8_t first_data

◆ ipmi_comp_code

uint8_t ipmi_comp_code

◆ netfn_lun

uint8_t netfn_lun

◆ pldm_hdr

pldm_hdr

◆ pldm_resp_hdr

pldm_resp_hdr