OpenBIC
OpenSource Bridge-IC
pldm_firmware_update.h File Reference
#include "pldm.h"
#include "plat_def.h"
#include "hal_i2c.h"
Include dependency graph for pldm_firmware_update.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pldm_fw_update_param
 
struct  pldm_fw_update_info
 
struct  pldm_fw_update_cfg
 
struct  pldm_request_update_req
 
struct  pldm_request_update_resp
 
struct  pldm_pass_component_table_req
 
struct  pldm_pass_component_table_resp
 
struct  pldm_update_component_req
 
struct  pldm_update_component_resp
 
struct  pldm_request_firmware_data_req
 
struct  pldm_activate_firmware_req
 
struct  pldm_activate_firmware_resp
 
struct  pldm_get_status_resp
 
struct  pldm_cancel_update_resp
 
struct  pldm_transfer_complete_req
 
struct  pldm_verify_complete_req
 
struct  pldm_apply_complete_req
 
struct  pldm_query_device_identifiers_resp
 
struct  pldm_descriptor_tlv
 
struct  pldm_vendor_defined_descriptor_tlv
 
struct  pldm_descriptor_string
 
struct  pldm_get_firmware_parameters_resp
 
struct  component_parameter_table
 
struct  pldm_query_downstream_devices_resp
 
struct  pldm_query_downstream_devices_resp::capabilities
 
struct  capabilities
 
struct  pldm_query_downstream_identifier_req
 
struct  pldm_query_downstream_identifier_resp
 
struct  pldm_downstream_device
 
struct  pldm_downstream_identifier_table
 
struct  pldm_get_downstream_firmware_parameters_req
 
struct  pldm_get_downstream_firmware_parameters_resp
 

Macros

#define MAX_IMAGE_MALLOC_SIZE   (1024 * 64)
 
#define RETIMER_IMAGE_PACKAGE_SIZE   64
 
#define KEYWORD_VR_ISL69259   "isl69259"
 
#define KEYWORD_VR_XDPE12284C   "xdpe12284c"
 
#define KEYWORD_VR_MP2856   "mp2856"
 
#define KEYWORD_VR_MP2857   "mp2857"
 
#define KEYWORD_VR_MP2971   "mp2971"
 
#define KEYWORD_VR_MP2988   "mp2988"
 
#define KEYWORD_VR_XDPE15284   "xdpe15284"
 
#define KEYWORD_VR_MP2985   "mp2985"
 
#define KEYWORD_VR_RAA229620   "raa229620"
 
#define KEYWORD_VR_RAA229621   "raa229621"
 
#define KEYWORD_VR_MPQ8746   "mpq8746"
 
#define KEYWORD_VR_MP2898   "mp2898"
 
#define KEYWORD_VR_MP2894   "mp2894"
 
#define KEYWORD_VR_TPS53685   "tps53685"
 
#define KEYWORD_VR_TPS536C5   "tps536c5"
 
#define KEYWORD_VR_TDA38741   "tda38741"
 
#define KEYWORD_VR_ISL69260   "isl69260"
 
#define KEYWORD_VR_MP29816A   "mp29816a"
 
#define KEYWORD_VR_RAA228249   "raa228249"
 
#define KEYWORD_RETIMER_PT5161L   "pt5161l"
 
#define KEYWORD_RETIMER_PT4080L   "pt4080l"
 
#define RETIMER_PT5161L_FW_VER_LEN   4
 
#define KEYWORD_RETIMER_DS160PT801   "ds160pt801"
 
#define PLDM_COMMON_ERR_STR   'E', 'R', 'R', 'O', 'R', ':'
 
#define PLDM_COMMON_ERR_CODE   0
 
#define PLDM_CREATE_ERR_STR_ARRAY(code)
 
#define CHECK_PLDM_FW_UPDATE_RESULT_WITH_RETURN(component_id, offset, length, val, ret_val)
 

Typedefs

typedef enum fd_update_interface fd_update_interface_t
 
typedef uint8_t(* pldm_fwupdate_func) (void *fw_update_param)
 
typedef uint8_t(* pldm_act_func) (void *arg)
 
typedef uint8_t(* pldm_apply_work) (void *arg)
 
typedef bool(* pldm_get_fw_version_fn) (void *info_p, uint8_t *buf, uint8_t *len)
 
typedef struct pldm_fw_update_param pldm_fw_update_param_t
 
typedef struct pldm_fw_update_info pldm_fw_update_info_t
 

Enumerations

enum  pldm_firmware_update_commands {
  PLDM_FW_UPDATE_CMD_CODE_QUERY_DEVICE_IDENTIFIERS = 0x01 , PLDM_FW_UPDATE_CMD_CODE_GET_FIRMWARE_PARAMETERS = 0x02 , PLDM_FW_UPDATE_CMD_CODE_QUERY_DOWNSTREAM_DEVICES = 0x03 , PLDM_FW_UPDATE_CMD_CODE_QUERY_DOWNSTREAM_IDENTIFIERS = 0x04 ,
  PLDM_FW_UPDATE_CMD_CODE_GET_DOWNSTREAM_FW_PARAMETERS = 0x05 , PLDM_FW_UPDATE_CMD_CODE_REQUEST_UPDATE = 0x10 , PLDM_FW_UPDATE_CMD_CODE_PASS_COMPONENT_TABLE = 0x13 , PLDM_FW_UPDATE_CMD_CODE_UPDATE_COMPONENT = 0x14 ,
  PLDM_FW_UPDATE_CMD_CODE_REQUEST_FIRMWARE_DATA = 0x15 , PLDM_FW_UPDATE_CMD_CODE_TRANSFER_COMPLETE = 0x16 , PLDM_FW_UPDATE_CMD_CODE_VERIFY_COMPLETE = 0x17 , PLDM_FW_UPDATE_CMD_CODE_APPLY_COMPLETE = 0x18 ,
  PLDM_FW_UPDATE_CMD_CODE_ACTIVE_FIRMWARE = 0x1A , PLDM_FW_UPDATE_CMD_CODE_GET_STATUS = 0x1B , PLDM_FW_UPDATE_CMD_CODE_CANCEL_UPDATE_COMPONENT = 0x1C , PLDM_FW_UPDATE_CMD_CODE_CANCEL_UPDATE = 0x1D
}
 
enum  pldm_firmware_update_completion_codes {
  PLDM_FW_UPDATE_CC_NOT_IN_UPDATE_MODE = 0x80 , PLDM_FW_UPDATE_CC_ALREADY_IN_UPDATE_MODE = 0x81 , PLDM_FW_UPDATE_CC_DATA_OUT_OF_RANGE = 0x82 , PLDM_FW_UPDATE_CC_INVALID_TRANSFER_LENGTH = 0x83 ,
  PLDM_FW_UPDATE_CC_INVALID_STATE_FOR_COMMAND = 0x84 , PLDM_FW_UPDATE_CC_INCOMPLETE_UPDATE = 0x85 , PLDM_FW_UPDATE_CC_BUSY_IN_BACKGROUND = 0x86 , PLDM_FW_UPDATE_CC_CANCEL_PENDING = 0x87 ,
  PLDM_FW_UPDATE_CC_COMMAND_NOT_EXPECTED = 0x88 , PLDM_FW_UPDATE_CC_RETRY_REQUEST_FW_DATA = 0x89 , PLDM_FW_UPDATE_CC_UNABLE_TO_INITIATE_UPDATE = 0x8A , PLDM_FW_UPDATE_CC_ACTIVATION_NOT_REQUIRED = 0x8B ,
  PLDM_FW_UPDATE_CC_SELF_CONTAINED_ACTIVATION_NOT_PERMITTED = 0x8C , PLDM_FW_UPDATE_CC_NO_DEVICE_METADATA = 0x8D , PLDM_FW_UPDATE_CC_RETRY_REQUEST_UPDATE = 0x8E , PLDM_FW_UPDATE_CC_NO_PACKAGE_DATA = 0x8F ,
  PLDM_FW_UPDATE_CC_INVALID_TRANSFER_HANDLE = 0x90 , PLDM_FW_UPDATE_CC_INVALID_TRANSFER_OPERATION_FLAG = 0x91 , PLDM_FW_UPDATE_CC_ACTIVATE_PENDING_IMAGE_NOT_PERMITTED = 0x92 , PLDM_FW_UPDATE_CC_PACKAGE_DATA_ERROR = 0x93
}
 
enum  pldm_firmware_update_string_type {
  PLDM_COMP_VER_STR_TYPE_UNKNOWN = 0 , PLDM_COMP_ASCII = 1 , PLDM_COMP_UTF_8 = 2 , PLDM_COMP_UTF_16 = 3 ,
  PLDM_COMP_UTF_16LE = 4 , PLDM_COMP_UTF_16BE = 5
}
 
enum  pldm_firmware_update_support_downstream_devices { PLDM_FW_UPDATE_NOT_SUPPORT_DOWNSTREAM_DEVICES = 0x00 , PLDM_FW_UPDATE_SUPPORT_DOWNSTREAM_DEVICES = 0x01 }
 
enum  pldm_firmware_update_state {
  STATE_IDLE , STATE_LEARN_COMP , STATE_RDY_XFER , STATE_DOWNLOAD ,
  STATE_VERIFY , STATE_APPLY , STATE_ACTIVATE
}
 
enum  pldm_firmware_update_aux_state { STATE_AUX_INPROGRESS , STATE_AUX_SUCCESS , STATE_AUX_FAILED , STATE_AUX_NOT_IN_UPDATE }
 
enum  {
  COMP_CLASS_TYPE_UNKNOWN = 0x0000 , COMP_CLASS_TYPE_OTHER , COMP_CLASS_TYPE_DRIVER , COMP_CLASS_TYPE_CFG_SW ,
  COMP_CLASS_TYPE_APP_SW , COMP_CLASS_TYPE_INSTR , COMP_CLASS_TYPE_FW_BIOS , COMP_CLASS_TYPE_DIAG_SW ,
  COMP_CLASS_TYPE_OS , COMP_CLASS_TYPE_MW , COMP_CLASS_TYPE_FW , COMP_CLASS_TYPE_BIOS_FC ,
  COMP_CLASS_TYPE_SP_SV_P , COMP_CLASS_TYPE_SW_BUNDLE , COMP_CLASS_TYPE_DOWNSTREAM = 0xFFFF , COMP_CLASS_TYPE_MAX = 0x10000
}
 
enum  pldm_firmware_update_common_error_codes { PLDM_FW_UPDATE_FD_ABORT = 0x03 , PLDM_FW_UPDATE_TIME_OUT = 0x09 , PLDM_FW_UPDATE_GENERIC_ERROR = 0x0A }
 
enum  pldm_firmware_update_transfer_result_values { PLDM_FW_UPDATE_TRANSFER_SUCCESS = 0x00 }
 
enum  pldm_firmware_update_verify_result_values { PLDM_FW_UPDATE_VERIFY_SUCCESS = 0x00 }
 
enum  pldm_firmware_update_apply_result_values {
  PLDM_FW_UPDATE_APPLY_SUCCESS = 0x00 , PLDM_FW_UPDATE_APPLY_SUCCESS_HAS_MODIFY_ACTIVATE_METHOD , PLDM_FW_UPDATE_APPLY_FAIL_WITH_MEMORY_WRITE_ISSUE , PLDM_FW_UPDATE_APPLY_TIMEOUT_OCCURRED = 0x09 ,
  PLDM_FW_UPDATE_APPLY_GENERIC_ERROR_OCCURRED
}
 
enum  pldm_firmware_update_transfer_operation_flag { PLDM_FW_UPDATE_GET_NEXT_PART , PLDM_FW_UPDATE_GET_FIRST_PART }
 
enum  pldm_firmware_update_transfer_flag { PLDM_FW_UPDATE_TRANSFER_START = 0x01 , PLDM_FW_UPDATE_TRANSFER_MIDDLE = 0x02 , PLDM_FW_UPDATE_TRANSFER_END = 0x04 , PLDM_FW_UPDATE_TRANSFER_START_AND_END = 0x05 }
 
enum  pldm_component_classification_values {
  PLDM_COMP_UNKNOWN = 0x0000 , PLDM_COMP_OTHER = 0x0001 , PLDM_COMP_DRIVER = 0x0002 , PLDM_COMP_CONFIGURATION_SOFTWARE = 0x0003 ,
  PLDM_COMP_APPLICATION_SOFTWARE = 0x0004 , PLDM_COMP_INSTRUMENTATION = 0x0005 , PLDM_COMP_FIRMWARE_OR_BIOS = 0x0006 , PLDM_COMP_DIAGNOSTIC_SOFTWARE = 0x0007 ,
  PLDM_COMP_OPERATING_SYSTEM = 0x0008 , PLDM_COMP_MIDDLEWARE = 0x0009 , PLDM_COMP_FIRMWARE = 0x000A , PLDM_COMP_BIOS_OR_FCODE = 0x000B ,
  PLDM_COMP_SUPPORT_OR_SERVICEPACK = 0x000C , PLDM_COMP_SOFTWARE_BUNDLE = 0x000D , PLDM_COMP_DOWNSTREAM_DEVICE = 0xFFFF
}
 
enum  pldm_firmware_update_descriptor_types {
  PLDM_PCI_VENDOR_ID = 0x0000 , PLDM_FWUP_IANA_ENTERPRISE_ID = 0x0001 , PLDM_PCI_DEVICE_ID = 0x0100 , PLDM_ASCII_MODEL_NUMBER_LONG_STRING = 0x0106 ,
  PLDM_ASCII_MODEL_NUMBER_SHORT_STRING = 0x0107 , PLDM_FWUP_VENDOR_DEFINED = 0xFFFF
}
 Descriptor types defined in PLDM firmware update specification DSP0267 Table 7 – Descriptor identifier table. More...
 
enum  pldm_firmware_update_descriptor_types_length {
  PLDM_PCI_VENDOR_ID_LENGTH = 2 , PLDM_FWUP_IANA_ENTERPRISE_ID_LENGTH = 4 , PLDM_PCI_DEVICE_ID_LENGTH = 2 , PLDM_ASCII_MODEL_NUMBER_LONG_STRING_LENGTH = 40 ,
  PLDM_ASCII_MODEL_NUMBER_SHORT_STRING_LENGTH = 10
}
 Descriptor types length defined in PLDM firmware update specification DSP0267 Table 7 – Descriptor identifier table. More...
 
enum  comp_rsp_code { COMP_RSP_CAN_UPDATE = 0x00 , COMP_RSP_FD_NOT_SUPPORT = 0x06 , COMP_RSP_UNKNOWN_ERR = 0xD0 }
 
enum  comp_act_mdthod {
  COMP_ACT_AUTO = 0x0001 , COMP_ACT_SELF = 0x0002 , COMP_ACT_MED_RESET = 0x0004 , COMP_ACT_SYS_REBOOT = 0x0008 ,
  COMP_ACT_DC_PWR_CYCLE = 0x0010 , COMP_ACT_AC_PWR_CYCLE = 0x0020 , COMP_ACT_SUPP_PEND_IMAGE = 0x0040 , COMP_ACT_SUPP_PEND_COMP_IMG_SET = 0x0080
}
 
enum  fd_update_interface { COMP_UPDATE_VIA_UNKNOWN , COMP_UPDATE_VIA_I2C , COMP_UPDATE_VIA_SPI , COMP_UPDATE_VIA_JTAG }
 
enum  pldm_self_contained_activation_req { PLDM_NOT_ACTIVATE_SELF_CONTAINED_COMPONENTS = false , PLDM_ACTIVATE_SELF_CONTAINED_COMPONENTS = true }
 

Functions

struct pldm_request_update_req __attribute__ ((packed))
 
uint8_t pldm_fw_update_handler_query (uint8_t code, void **ret_fn)
 
uint16_t pldm_fw_update_read (void *mctp_p, enum pldm_firmware_update_commands cmd, uint8_t *req, uint16_t req_len, uint8_t *rbuf, uint16_t rbuf_len, void *ext_params)
 
uint8_t pldm_bic_update (void *fw_update_param)
 
uint8_t pldm_vr_update (void *fw_update_param)
 
uint8_t pldm_cpld_update (void *fw_update_param)
 
uint8_t pldm_retimer_update (void *fw_update_param)
 
uint8_t pldm_retimer_recovery (void *fw_update_param)
 
uint8_t fw_recovery_eeprom (I2C_MSG *msg, uint32_t offset, uint16_t msg_len, uint8_t *msg_buf, uint8_t flag)
 
uint8_t pldm_bic_activate (void *arg)
 
uint8_t plat_pldm_query_device_identifiers (const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len)
 
uint8_t plat_pldm_query_downstream_devices (const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len)
 
uint8_t plat_pldm_query_downstream_identifiers (const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len)
 
int get_descriptor_type_length (uint16_t type)
 
int get_device_single_descriptor_length (struct pldm_descriptor_string data)
 
int get_device_descriptor_total_length (struct pldm_descriptor_string *table, uint8_t table_count)
 
uint8_t fill_descriptor_into_buf (struct pldm_descriptor_string *descriptor, uint8_t *buf, uint8_t *fill_length, uint16_t current_length)
 

Variables

pldm_fw_update_info_tcomp_config
 
uint8_t comp_config_count
 
struct pldm_fw_update_cfg fw_update_cfg
 
uint32_t max_transfer_size
 
uint16_t num_of_comp
 
uint8_t max_outstanding_transfer_req
 
uint16_t pkg_data_len
 
uint8_t comp_image_set_ver_str_type
 
uint8_t comp_image_set_ver_str_len
 
uint8_t completion_code
 
uint16_t fd_meta_data_len
 
uint8_t fd_will_send_pkg_data
 
uint8_t transfer_flag
 
uint16_t comp_classification
 
uint16_t comp_identifier
 
uint8_t comp_classification_index
 
uint32_t comp_comparison_stamp
 
uint8_t comp_ver_str_type
 
uint8_t comp_ver_str_len
 
uint8_t comp_resp
 
uint8_t comp_resp_code
 
uint32_t comp_image_size
 
uint32_t update_option_flags
 
uint8_t comp_compatability_resp
 
uint8_t comp_compatability_resp_code
 
uint32_t update_option_flags_enabled
 
uint16_t time_before_req_fw_data
 
uint32_t offset
 
uint32_t length
 
uint8_t selfContainedActivationRequest
 
uint16_t estimated
 
uint8_t cur_state
 
uint8_t pre_state
 
uint8_t aux_state
 
uint8_t aux_state_status
 
uint8_t prog_percent
 
uint8_t reason_code
 
uint32_t update_op_flag_en
 
uint8_t non_func_comp_ind
 
uint64_t non_func_comp_bitmap
 
enum pldm_self_contained_activation_req __attribute__
 
uint8_t transferResult
 
uint8_t verifyResult
 
uint8_t applyResult
 
uint16_t compActivationMethodsModification
 
uint32_t device_identifiers_len
 
uint8_t descriptor_count
 
uint16_t descriptor_type
 
uint16_t descriptor_length
 
uint8_t descriptor_data [1]
 
uint8_t vendor_define_title_type
 
uint8_t descriptor_title_length
 
char * title_string
 
union {
   struct {
      uint8_t   fail_recovery: 1
 
      uint8_t   fail_retry: 1
 
      uint8_t   func_during_update: 1
 
      uint8_t   partial_update: 1
 
      uint8_t   update_mode_restrict: 4
 
      uint8_t   __pad0__: 8
 
      uint16_t   __pad1__: 16
 
   } 
 
   uint32_t   capabilities_during_update
 
}; 
 
uint16_t comp_count
 
uint8_t active_comp_image_set_ver_str_type
 
uint8_t active_comp_image_set_ver_str_len
 
uint8_t pending_comp_image_set_ver_str_type
 
uint8_t pending_comp_image_set_ver_str_len
 
uint32_t active_comp_comparison_stamp
 
uint8_t active_comp_ver_str_type
 
uint8_t active_comp_ver_str_len
 
uint8_t active_comp_release_date [8]
 
uint32_t pending_comp_comparison_stamp
 
uint8_t pending_comp_ver_str_type
 
uint8_t pending_comp_ver_str_len
 
uint8_t pending_comp_release_date [8]
 
uint16_t comp_activation_methods
 
uint8_t downstream_device_update_supported
 
uint16_t number_of_downstream_devices
 
uint16_t max_number_of_downstream_devices
 
struct capabilities capabilities
 
uint32_t datatransferhandle
 
uint8_t transferoperationflag
 
uint32_t nextdatatransferhandle
 
uint8_t transferflag
 
uint32_t downstreamdevicelength
 
uint16_t numbwerofdownstreamdevice
 
uint16_t downstreamdeviceindex
 
uint8_t downstreamdescriptorcount
 
uint8_t downstreamdescriptors [0]
 
struct pldm_descriptor_stringdescriptor
 
uint32_t data_transfer_handle
 
uint8_t transfer_operation_flag
 
uint32_t next_data_transfer_handle
 
union {
   struct {
      uint8_t   fail_recovery: 1
 
      uint8_t   fail_retry: 1
 
      uint8_t   func_during_update: 1
 
      uint8_t   __pad0__: 1
 
      uint8_t   update_mode_restrict: 4
 
      uint8_t   downgrade_restrictions: 1
 
      uint8_t   __pad1__: 7
 
      uint16_t   __pad2__: 16
 
   } 
 
   uint32_t   fdp_capabilities_during_update
 
}; 
 
uint16_t downstream_device_count
 

Macro Definition Documentation

◆ CHECK_PLDM_FW_UPDATE_RESULT_WITH_RETURN

#define CHECK_PLDM_FW_UPDATE_RESULT_WITH_RETURN (   component_id,
  offset,
  length,
  val,
  ret_val 
)
Value:
if (val != 0) { \
LOG_ERR("Component id: 0x%x firmware update fail, status: %d, offset: 0x%x, length: 0x%x", \
component_id, val, offset, length); \
return ret_val; \
}
uint32_t val
Definition: plat_util.c:40
uint32_t offset
Definition: pldm_firmware_update.h:0
uint32_t length
Definition: pldm_firmware_update.h:1

◆ KEYWORD_RETIMER_DS160PT801

#define KEYWORD_RETIMER_DS160PT801   "ds160pt801"

◆ KEYWORD_RETIMER_PT4080L

#define KEYWORD_RETIMER_PT4080L   "pt4080l"

◆ KEYWORD_RETIMER_PT5161L

#define KEYWORD_RETIMER_PT5161L   "pt5161l"

◆ KEYWORD_VR_ISL69259

#define KEYWORD_VR_ISL69259   "isl69259"

◆ KEYWORD_VR_ISL69260

#define KEYWORD_VR_ISL69260   "isl69260"

◆ KEYWORD_VR_MP2856

#define KEYWORD_VR_MP2856   "mp2856"

◆ KEYWORD_VR_MP2857

#define KEYWORD_VR_MP2857   "mp2857"

◆ KEYWORD_VR_MP2894

#define KEYWORD_VR_MP2894   "mp2894"

◆ KEYWORD_VR_MP2898

#define KEYWORD_VR_MP2898   "mp2898"

◆ KEYWORD_VR_MP2971

#define KEYWORD_VR_MP2971   "mp2971"

◆ KEYWORD_VR_MP29816A

#define KEYWORD_VR_MP29816A   "mp29816a"

◆ KEYWORD_VR_MP2985

#define KEYWORD_VR_MP2985   "mp2985"

◆ KEYWORD_VR_MP2988

#define KEYWORD_VR_MP2988   "mp2988"

◆ KEYWORD_VR_MPQ8746

#define KEYWORD_VR_MPQ8746   "mpq8746"

◆ KEYWORD_VR_RAA228249

#define KEYWORD_VR_RAA228249   "raa228249"

◆ KEYWORD_VR_RAA229620

#define KEYWORD_VR_RAA229620   "raa229620"

◆ KEYWORD_VR_RAA229621

#define KEYWORD_VR_RAA229621   "raa229621"

◆ KEYWORD_VR_TDA38741

#define KEYWORD_VR_TDA38741   "tda38741"

◆ KEYWORD_VR_TPS53685

#define KEYWORD_VR_TPS53685   "tps53685"

◆ KEYWORD_VR_TPS536C5

#define KEYWORD_VR_TPS536C5   "tps536c5"

◆ KEYWORD_VR_XDPE12284C

#define KEYWORD_VR_XDPE12284C   "xdpe12284c"

◆ KEYWORD_VR_XDPE15284

#define KEYWORD_VR_XDPE15284   "xdpe15284"

◆ MAX_IMAGE_MALLOC_SIZE

#define MAX_IMAGE_MALLOC_SIZE   (1024 * 64)

◆ PLDM_COMMON_ERR_CODE

#define PLDM_COMMON_ERR_CODE   0

◆ PLDM_COMMON_ERR_STR

#define PLDM_COMMON_ERR_STR   'E', 'R', 'R', 'O', 'R', ':'

◆ PLDM_CREATE_ERR_STR_ARRAY

#define PLDM_CREATE_ERR_STR_ARRAY (   code)
Value:
{ \
PLDM_COMMON_ERR_STR, hex_to_ascii[code] \
}

◆ RETIMER_IMAGE_PACKAGE_SIZE

#define RETIMER_IMAGE_PACKAGE_SIZE   64

◆ RETIMER_PT5161L_FW_VER_LEN

#define RETIMER_PT5161L_FW_VER_LEN   4

Typedef Documentation

◆ fd_update_interface_t

◆ pldm_act_func

typedef uint8_t(* pldm_act_func) (void *arg)

◆ pldm_apply_work

typedef uint8_t(* pldm_apply_work) (void *arg)

◆ pldm_fw_update_info_t

◆ pldm_fw_update_param_t

◆ pldm_fwupdate_func

typedef uint8_t(* pldm_fwupdate_func) (void *fw_update_param)

◆ pldm_get_fw_version_fn

typedef bool(* pldm_get_fw_version_fn) (void *info_p, uint8_t *buf, uint8_t *len)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

PLDM component classification

Enumerator
COMP_CLASS_TYPE_UNKNOWN 
COMP_CLASS_TYPE_OTHER 
COMP_CLASS_TYPE_DRIVER 
COMP_CLASS_TYPE_CFG_SW 
COMP_CLASS_TYPE_APP_SW 
COMP_CLASS_TYPE_INSTR 
COMP_CLASS_TYPE_FW_BIOS 
COMP_CLASS_TYPE_DIAG_SW 
COMP_CLASS_TYPE_OS 
COMP_CLASS_TYPE_MW 
COMP_CLASS_TYPE_FW 
COMP_CLASS_TYPE_BIOS_FC 
COMP_CLASS_TYPE_SP_SV_P 
COMP_CLASS_TYPE_SW_BUNDLE 
COMP_CLASS_TYPE_DOWNSTREAM 
COMP_CLASS_TYPE_MAX 

◆ comp_act_mdthod

Component response for PassComponentTable and UpdateComponent commands

Enumerator
COMP_ACT_AUTO 
COMP_ACT_SELF 
COMP_ACT_MED_RESET 
COMP_ACT_SYS_REBOOT 
COMP_ACT_DC_PWR_CYCLE 
COMP_ACT_AC_PWR_CYCLE 
COMP_ACT_SUPP_PEND_IMAGE 
COMP_ACT_SUPP_PEND_COMP_IMG_SET 

◆ comp_rsp_code

Component response for PassComponentTable and UpdateComponent commands

Enumerator
COMP_RSP_CAN_UPDATE 
COMP_RSP_FD_NOT_SUPPORT 
COMP_RSP_UNKNOWN_ERR 

◆ fd_update_interface

Enumerator
COMP_UPDATE_VIA_UNKNOWN 
COMP_UPDATE_VIA_I2C 
COMP_UPDATE_VIA_SPI 
COMP_UPDATE_VIA_JTAG 

◆ pldm_component_classification_values

component classification values define in PLDM firmware update specification Table 27

Enumerator
PLDM_COMP_UNKNOWN 
PLDM_COMP_OTHER 
PLDM_COMP_DRIVER 
PLDM_COMP_CONFIGURATION_SOFTWARE 
PLDM_COMP_APPLICATION_SOFTWARE 
PLDM_COMP_INSTRUMENTATION 
PLDM_COMP_FIRMWARE_OR_BIOS 
PLDM_COMP_DIAGNOSTIC_SOFTWARE 
PLDM_COMP_OPERATING_SYSTEM 
PLDM_COMP_MIDDLEWARE 
PLDM_COMP_FIRMWARE 
PLDM_COMP_BIOS_OR_FCODE 
PLDM_COMP_SUPPORT_OR_SERVICEPACK 
PLDM_COMP_SOFTWARE_BUNDLE 
PLDM_COMP_DOWNSTREAM_DEVICE 

◆ pldm_firmware_update_apply_result_values

ApplyResult values in the request of ApplyComplete

Enumerator
PLDM_FW_UPDATE_APPLY_SUCCESS 
PLDM_FW_UPDATE_APPLY_SUCCESS_HAS_MODIFY_ACTIVATE_METHOD 
PLDM_FW_UPDATE_APPLY_FAIL_WITH_MEMORY_WRITE_ISSUE 
PLDM_FW_UPDATE_APPLY_TIMEOUT_OCCURRED 
PLDM_FW_UPDATE_APPLY_GENERIC_ERROR_OCCURRED 

◆ pldm_firmware_update_aux_state

PLDM Frimware update aux state

Enumerator
STATE_AUX_INPROGRESS 
STATE_AUX_SUCCESS 
STATE_AUX_FAILED 
STATE_AUX_NOT_IN_UPDATE 

◆ pldm_firmware_update_commands

PLDM Firmware update commands

Enumerator
PLDM_FW_UPDATE_CMD_CODE_QUERY_DEVICE_IDENTIFIERS 
PLDM_FW_UPDATE_CMD_CODE_GET_FIRMWARE_PARAMETERS 
PLDM_FW_UPDATE_CMD_CODE_QUERY_DOWNSTREAM_DEVICES 
PLDM_FW_UPDATE_CMD_CODE_QUERY_DOWNSTREAM_IDENTIFIERS 
PLDM_FW_UPDATE_CMD_CODE_GET_DOWNSTREAM_FW_PARAMETERS 
PLDM_FW_UPDATE_CMD_CODE_REQUEST_UPDATE 
PLDM_FW_UPDATE_CMD_CODE_PASS_COMPONENT_TABLE 
PLDM_FW_UPDATE_CMD_CODE_UPDATE_COMPONENT 
PLDM_FW_UPDATE_CMD_CODE_REQUEST_FIRMWARE_DATA 
PLDM_FW_UPDATE_CMD_CODE_TRANSFER_COMPLETE 
PLDM_FW_UPDATE_CMD_CODE_VERIFY_COMPLETE 
PLDM_FW_UPDATE_CMD_CODE_APPLY_COMPLETE 
PLDM_FW_UPDATE_CMD_CODE_ACTIVE_FIRMWARE 
PLDM_FW_UPDATE_CMD_CODE_GET_STATUS 
PLDM_FW_UPDATE_CMD_CODE_CANCEL_UPDATE_COMPONENT 
PLDM_FW_UPDATE_CMD_CODE_CANCEL_UPDATE 

◆ pldm_firmware_update_common_error_codes

Common error codes in TransferComplete, VerifyComplete and ApplyComplete request

Enumerator
PLDM_FW_UPDATE_FD_ABORT 
PLDM_FW_UPDATE_TIME_OUT 
PLDM_FW_UPDATE_GENERIC_ERROR 

◆ pldm_firmware_update_completion_codes

PLDM Firmware update completion codes

Enumerator
PLDM_FW_UPDATE_CC_NOT_IN_UPDATE_MODE 
PLDM_FW_UPDATE_CC_ALREADY_IN_UPDATE_MODE 
PLDM_FW_UPDATE_CC_DATA_OUT_OF_RANGE 
PLDM_FW_UPDATE_CC_INVALID_TRANSFER_LENGTH 
PLDM_FW_UPDATE_CC_INVALID_STATE_FOR_COMMAND 
PLDM_FW_UPDATE_CC_INCOMPLETE_UPDATE 
PLDM_FW_UPDATE_CC_BUSY_IN_BACKGROUND 
PLDM_FW_UPDATE_CC_CANCEL_PENDING 
PLDM_FW_UPDATE_CC_COMMAND_NOT_EXPECTED 
PLDM_FW_UPDATE_CC_RETRY_REQUEST_FW_DATA 
PLDM_FW_UPDATE_CC_UNABLE_TO_INITIATE_UPDATE 
PLDM_FW_UPDATE_CC_ACTIVATION_NOT_REQUIRED 
PLDM_FW_UPDATE_CC_SELF_CONTAINED_ACTIVATION_NOT_PERMITTED 
PLDM_FW_UPDATE_CC_NO_DEVICE_METADATA 
PLDM_FW_UPDATE_CC_RETRY_REQUEST_UPDATE 
PLDM_FW_UPDATE_CC_NO_PACKAGE_DATA 
PLDM_FW_UPDATE_CC_INVALID_TRANSFER_HANDLE 
PLDM_FW_UPDATE_CC_INVALID_TRANSFER_OPERATION_FLAG 
PLDM_FW_UPDATE_CC_ACTIVATE_PENDING_IMAGE_NOT_PERMITTED 
PLDM_FW_UPDATE_CC_PACKAGE_DATA_ERROR 

◆ pldm_firmware_update_descriptor_types

Descriptor types defined in PLDM firmware update specification DSP0267 Table 7 – Descriptor identifier table.

Enumerator
PLDM_PCI_VENDOR_ID 
PLDM_FWUP_IANA_ENTERPRISE_ID 
PLDM_PCI_DEVICE_ID 
PLDM_ASCII_MODEL_NUMBER_LONG_STRING 
PLDM_ASCII_MODEL_NUMBER_SHORT_STRING 
PLDM_FWUP_VENDOR_DEFINED 

◆ pldm_firmware_update_descriptor_types_length

Descriptor types length defined in PLDM firmware update specification DSP0267 Table 7 – Descriptor identifier table.

Enumerator
PLDM_PCI_VENDOR_ID_LENGTH 
PLDM_FWUP_IANA_ENTERPRISE_ID_LENGTH 
PLDM_PCI_DEVICE_ID_LENGTH 
PLDM_ASCII_MODEL_NUMBER_LONG_STRING_LENGTH 
PLDM_ASCII_MODEL_NUMBER_SHORT_STRING_LENGTH 

◆ pldm_firmware_update_state

PLDM Frimware update state

Enumerator
STATE_IDLE 
STATE_LEARN_COMP 
STATE_RDY_XFER 
STATE_DOWNLOAD 
STATE_VERIFY 
STATE_APPLY 
STATE_ACTIVATE 

◆ pldm_firmware_update_string_type

PLDM Frimware update string type

Enumerator
PLDM_COMP_VER_STR_TYPE_UNKNOWN 
PLDM_COMP_ASCII 
PLDM_COMP_UTF_8 
PLDM_COMP_UTF_16 
PLDM_COMP_UTF_16LE 
PLDM_COMP_UTF_16BE 

◆ pldm_firmware_update_support_downstream_devices

Table 15 - QueryDeviceIdentifiers command format in DSP0267 1.1.0

Enumerator
PLDM_FW_UPDATE_NOT_SUPPORT_DOWNSTREAM_DEVICES 
PLDM_FW_UPDATE_SUPPORT_DOWNSTREAM_DEVICES 

◆ pldm_firmware_update_transfer_flag

Enumerator
PLDM_FW_UPDATE_TRANSFER_START 
PLDM_FW_UPDATE_TRANSFER_MIDDLE 
PLDM_FW_UPDATE_TRANSFER_END 
PLDM_FW_UPDATE_TRANSFER_START_AND_END 

◆ pldm_firmware_update_transfer_operation_flag

Enumerator
PLDM_FW_UPDATE_GET_NEXT_PART 
PLDM_FW_UPDATE_GET_FIRST_PART 

◆ pldm_firmware_update_transfer_result_values

TransferResult values in the request of TransferComplete

Enumerator
PLDM_FW_UPDATE_TRANSFER_SUCCESS 

◆ pldm_firmware_update_verify_result_values

VerifyResult values in the request of VerifyComplete

Enumerator
PLDM_FW_UPDATE_VERIFY_SUCCESS 

◆ pldm_self_contained_activation_req

SelfContainedActivationRequest in the request of ActivateFirmware

Enumerator
PLDM_NOT_ACTIVATE_SELF_CONTAINED_COMPONENTS 
PLDM_ACTIVATE_SELF_CONTAINED_COMPONENTS 

Function Documentation

◆ __attribute__()

struct pldm_request_update_req __attribute__ ( (packed)  )

◆ fill_descriptor_into_buf()

uint8_t fill_descriptor_into_buf ( struct pldm_descriptor_string descriptor,
uint8_t *  buf,
uint8_t *  fill_length,
uint16_t  current_length 
)
Here is the call graph for this function:

◆ fw_recovery_eeprom()

uint8_t fw_recovery_eeprom ( I2C_MSG msg,
uint32_t  offset,
uint16_t  msg_len,
uint8_t *  msg_buf,
uint8_t  flag 
)
Here is the call graph for this function:

◆ get_descriptor_type_length()

int get_descriptor_type_length ( uint16_t  type)

◆ get_device_descriptor_total_length()

int get_device_descriptor_total_length ( struct pldm_descriptor_string table,
uint8_t  table_count 
)
Here is the call graph for this function:

◆ get_device_single_descriptor_length()

int get_device_single_descriptor_length ( struct pldm_descriptor_string  data)

◆ plat_pldm_query_device_identifiers()

uint8_t plat_pldm_query_device_identifiers ( const uint8_t *  buf,
uint16_t  len,
uint8_t *  resp,
uint16_t *  resp_len 
)
Here is the call graph for this function:

◆ plat_pldm_query_downstream_devices()

uint8_t plat_pldm_query_downstream_devices ( const uint8_t *  buf,
uint16_t  len,
uint8_t *  resp,
uint16_t *  resp_len 
)

◆ plat_pldm_query_downstream_identifiers()

uint8_t plat_pldm_query_downstream_identifiers ( const uint8_t *  buf,
uint16_t  len,
uint8_t *  resp,
uint16_t *  resp_len 
)
Here is the call graph for this function:

◆ pldm_bic_activate()

uint8_t pldm_bic_activate ( void *  arg)

◆ pldm_bic_update()

uint8_t pldm_bic_update ( void *  fw_update_param)
Here is the call graph for this function:

◆ pldm_cpld_update()

uint8_t pldm_cpld_update ( void *  fw_update_param)
Here is the call graph for this function:

◆ pldm_fw_update_handler_query()

uint8_t pldm_fw_update_handler_query ( uint8_t  code,
void **  ret_fn 
)
Here is the call graph for this function:

◆ pldm_fw_update_read()

uint16_t pldm_fw_update_read ( void *  mctp_p,
enum pldm_firmware_update_commands  cmd,
uint8_t *  req,
uint16_t  req_len,
uint8_t *  rbuf,
uint16_t  rbuf_len,
void *  ext_params 
)
Here is the call graph for this function:

◆ pldm_retimer_recovery()

uint8_t pldm_retimer_recovery ( void *  fw_update_param)
Here is the call graph for this function:

◆ pldm_retimer_update()

uint8_t pldm_retimer_update ( void *  fw_update_param)
Here is the call graph for this function:

◆ pldm_vr_update()

uint8_t pldm_vr_update ( void *  fw_update_param)
Here is the call graph for this function:

Variable Documentation

◆ 

union { ... }

◆ 

union { ... }

◆ __attribute__

◆ __pad0__

uint8_t __pad0__

◆ __pad1__

uint8_t __pad1__

◆ __pad2__

uint16_t __pad2__

◆ active_comp_comparison_stamp

uint32_t active_comp_comparison_stamp

◆ active_comp_image_set_ver_str_len

uint8_t active_comp_image_set_ver_str_len

◆ active_comp_image_set_ver_str_type

uint8_t active_comp_image_set_ver_str_type

◆ active_comp_release_date

uint8_t active_comp_release_date[8]

◆ active_comp_ver_str_len

uint8_t active_comp_ver_str_len

◆ active_comp_ver_str_type

uint8_t active_comp_ver_str_type

◆ applyResult

uint8_t applyResult

◆ aux_state

uint8_t aux_state

◆ aux_state_status

uint8_t aux_state_status

◆ capabilities

◆ capabilities_during_update

uint32_t capabilities_during_update

◆ comp_activation_methods

uint16_t comp_activation_methods

◆ comp_classification

uint16_t comp_classification

◆ comp_classification_index

uint8_t comp_classification_index

◆ comp_comparison_stamp

uint32_t comp_comparison_stamp

◆ comp_compatability_resp

uint8_t comp_compatability_resp

◆ comp_compatability_resp_code

uint8_t comp_compatability_resp_code

◆ comp_config

pldm_fw_update_info_t* comp_config
extern

◆ comp_config_count

uint8_t comp_config_count
extern

◆ comp_count

uint16_t comp_count

◆ comp_identifier

uint16_t comp_identifier

◆ comp_image_set_ver_str_len

uint8_t comp_image_set_ver_str_len

◆ comp_image_set_ver_str_type

uint8_t comp_image_set_ver_str_type

◆ comp_image_size

uint32_t comp_image_size

◆ comp_resp

uint8_t comp_resp

◆ comp_resp_code

uint8_t comp_resp_code

◆ comp_ver_str_len

uint8_t comp_ver_str_len

◆ comp_ver_str_type

uint8_t comp_ver_str_type

◆ compActivationMethodsModification

uint16_t compActivationMethodsModification

◆ completion_code

uint8_t completion_code

◆ cur_state

uint8_t cur_state

◆ data_transfer_handle

uint32_t data_transfer_handle

◆ datatransferhandle

uint32_t datatransferhandle

◆ descriptor

struct pldm_descriptor_string* descriptor

◆ descriptor_count

uint8_t descriptor_count

◆ descriptor_data

char * descriptor_data

◆ descriptor_length

uint16_t descriptor_length

◆ descriptor_title_length

uint8_t descriptor_title_length

◆ descriptor_type

uint16_t descriptor_type

◆ device_identifiers_len

uint32_t device_identifiers_len

◆ downgrade_restrictions

uint8_t downgrade_restrictions

◆ downstream_device_count

uint16_t downstream_device_count

◆ downstream_device_update_supported

uint8_t downstream_device_update_supported

◆ downstreamdescriptorcount

uint8_t downstreamdescriptorcount

◆ downstreamdescriptors

uint8_t downstreamdescriptors[0]

◆ downstreamdeviceindex

uint16_t downstreamdeviceindex

◆ downstreamdevicelength

uint32_t downstreamdevicelength

◆ estimated

uint16_t estimated

◆ fail_recovery

uint8_t fail_recovery

◆ fail_retry

uint8_t fail_retry

◆ fd_meta_data_len

uint16_t fd_meta_data_len

◆ fd_will_send_pkg_data

uint8_t fd_will_send_pkg_data

◆ fdp_capabilities_during_update

uint32_t fdp_capabilities_during_update

◆ func_during_update

uint8_t func_during_update

◆ fw_update_cfg

struct pldm_fw_update_cfg fw_update_cfg
extern

◆ length

uint32_t length

◆ max_number_of_downstream_devices

uint16_t max_number_of_downstream_devices

◆ max_outstanding_transfer_req

uint8_t max_outstanding_transfer_req

◆ max_transfer_size

uint32_t max_transfer_size

◆ next_data_transfer_handle

uint32_t next_data_transfer_handle

◆ nextdatatransferhandle

uint32_t nextdatatransferhandle

◆ non_func_comp_bitmap

uint64_t non_func_comp_bitmap

◆ non_func_comp_ind

uint8_t non_func_comp_ind

◆ num_of_comp

uint16_t num_of_comp

◆ number_of_downstream_devices

uint16_t number_of_downstream_devices

◆ numbwerofdownstreamdevice

uint16_t numbwerofdownstreamdevice

◆ offset

uint32_t offset

◆ partial_update

uint8_t partial_update

◆ pending_comp_comparison_stamp

uint32_t pending_comp_comparison_stamp

◆ pending_comp_image_set_ver_str_len

uint8_t pending_comp_image_set_ver_str_len

◆ pending_comp_image_set_ver_str_type

uint8_t pending_comp_image_set_ver_str_type

◆ pending_comp_release_date

uint8_t pending_comp_release_date[8]

◆ pending_comp_ver_str_len

uint8_t pending_comp_ver_str_len

◆ pending_comp_ver_str_type

uint8_t pending_comp_ver_str_type

◆ pkg_data_len

uint16_t pkg_data_len

◆ pre_state

uint8_t pre_state

◆ prog_percent

uint8_t prog_percent

◆ reason_code

uint8_t reason_code

◆ selfContainedActivationRequest

uint8_t selfContainedActivationRequest

◆ time_before_req_fw_data

uint16_t time_before_req_fw_data

◆ title_string

char* title_string

◆ transfer_flag

uint8_t transfer_flag

◆ transfer_operation_flag

uint8_t transfer_operation_flag

◆ transferflag

uint8_t transferflag

◆ transferoperationflag

uint8_t transferoperationflag

◆ transferResult

uint8_t transferResult

◆ update_mode_restrict

uint8_t update_mode_restrict

◆ update_op_flag_en

uint32_t update_op_flag_en

◆ update_option_flags

uint32_t update_option_flags

◆ update_option_flags_enabled

uint32_t update_option_flags_enabled

◆ vendor_define_title_type

uint8_t vendor_define_title_type

◆ verifyResult

uint8_t verifyResult