OpenBIC
OpenSource Bridge-IC
plat_pldm_fw_update.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <logging/log.h>
#include "pldm_firmware_update.h"
#include "plat_pldm_fw_update.h"
#include "plat_pldm_sensor.h"
#include "plat_class.h"
#include "plat_hook.h"
#include "mp2971.h"
#include "mp29816a.h"
#include "raa228249.h"
Include dependency graph for plat_pldm_fw_update.c:

Classes

struct  compnt_mapping_sensor
 

Macros

#define VR_COMPONENT_DEF(comp_id)
 

Functions

 LOG_MODULE_REGISTER (plat_fwupdate)
 
uint8_t plat_pldm_query_device_identifiers (const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len)
 
void load_pldmupdate_comp_config (void)
 
bool find_sensor_id_and_name_by_firmware_comp_id (uint8_t comp_identifier, uint8_t *sensor_id, char *sensor_name)
 

Variables

compnt_mapping_sensor vr_compnt_mapping_sensor_table []
 
pldm_fw_update_info_t PLDMUPDATE_FW_CONFIG_TABLE []
 

Macro Definition Documentation

◆ VR_COMPONENT_DEF

#define VR_COMPONENT_DEF (   comp_id)
Value:
{ \
.enable = true, \
.comp_classification = COMP_CLASS_TYPE_DOWNSTREAM, \
.comp_identifier = comp_id, \
.comp_classification_index = 0x00, \
.pre_update_func = pldm_pre_vr_update, \
.update_func = pldm_vr_update, \
.pos_update_func = pldm_post_vr_update, \
.activate_method = COMP_ACT_AC_PWR_CYCLE, \
.self_act_func = NULL, \
.get_fw_version_fn = get_vr_fw_version, \
.self_apply_work_func = NULL, \
.comp_version_str = NULL, \
}
uint8_t pldm_vr_update(void *fw_update_param)
Definition: pldm_firmware_update.c:203
@ COMP_ACT_AC_PWR_CYCLE
Definition: pldm_firmware_update.h:314
@ COMP_CLASS_TYPE_DOWNSTREAM
Definition: pldm_firmware_update.h:192
@ COMP_UPDATE_VIA_I2C
Definition: pldm_firmware_update.h:321

Function Documentation

◆ find_sensor_id_and_name_by_firmware_comp_id()

bool find_sensor_id_and_name_by_firmware_comp_id ( uint8_t  comp_identifier,
uint8_t *  sensor_id,
char *  sensor_name 
)

◆ load_pldmupdate_comp_config()

void load_pldmupdate_comp_config ( void  )

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_fwupdate  )

◆ 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 
)

Variable Documentation

◆ PLDMUPDATE_FW_CONFIG_TABLE

pldm_fw_update_info_t PLDMUPDATE_FW_CONFIG_TABLE[]
Initial value:
= {
{
.enable = true,
.comp_classification = COMP_CLASS_TYPE_DOWNSTREAM,
.comp_identifier = COMPNT_BIC,
.comp_classification_index = 0x00,
.pre_update_func = NULL,
.update_func = pldm_bic_update,
.pos_update_func = NULL,
.activate_method = COMP_ACT_SELF,
.self_act_func = pldm_bic_activate,
.get_fw_version_fn = NULL,
.self_apply_work_func = NULL,
.comp_version_str = NULL,
},
}
@ COMPNT_BIC
Definition: oem_1s_handler.h:31
uint8_t pldm_bic_update(void *fw_update_param)
Definition: pldm_firmware_update.c:172
uint8_t pldm_bic_activate(void *arg)
Definition: pldm_firmware_update.c:553
@ COMP_ACT_SELF
Definition: pldm_firmware_update.h:310
@ COMP_UPDATE_VIA_SPI
Definition: pldm_firmware_update.h:322
#define VR_COMPONENT_DEF(comp_id)
Definition: plat_pldm_fw_update.c:60
@ COMPNT_VR_7
Definition: plat_pldm_fw_update.h:28
@ COMPNT_VR_3
Definition: plat_pldm_fw_update.h:24
@ COMPNT_VR_12
Definition: plat_pldm_fw_update.h:33
@ COMPNT_VR_1
Definition: plat_pldm_fw_update.h:22
@ COMPNT_VR_2
Definition: plat_pldm_fw_update.h:23
@ COMPNT_VR_8
Definition: plat_pldm_fw_update.h:29
@ COMPNT_VR_4
Definition: plat_pldm_fw_update.h:25
@ COMPNT_VR_5
Definition: plat_pldm_fw_update.h:26
@ COMPNT_VR_6
Definition: plat_pldm_fw_update.h:27
@ COMPNT_VR_11
Definition: plat_pldm_fw_update.h:32
@ COMPNT_VR_10
Definition: plat_pldm_fw_update.h:31
@ COMPNT_VR_9
Definition: plat_pldm_fw_update.h:30

◆ vr_compnt_mapping_sensor_table

compnt_mapping_sensor vr_compnt_mapping_sensor_table[]
Initial value:
= {
{ COMPNT_VR_6, SENSOR_NUM_ASIC_P1V1_VDDQC_HBM1357_TEMP_C, "ASIC_P1V1_VDDQC_HBM1357" },
"ASIC_P1V2_HAMSA_VDDHRXTX_PCIE" },
{ COMPNT_VR_9, SENSOR_NUM_ASIC_P1V1_VDDQC_HBM0246_TEMP_C, "ASIC_P1V1_VDDQC_HBM0246" },
}
#define SENSOR_NUM_ASIC_P0V75_OWL_E_VDD_TEMP_C
Definition: plat_pldm_sensor.h:124
#define SENSOR_NUM_ASIC_P0V75_MAX_M_VDD_TEMP_C
Definition: plat_pldm_sensor.h:144
#define SENSOR_NUM_ASIC_P0V9_OWL_E_TRVDD_TEMP_C
Definition: plat_pldm_sensor.h:114
#define SENSOR_NUM_ASIC_P0V9_OWL_W_TRVDD_TEMP_C
Definition: plat_pldm_sensor.h:129
#define SENSOR_NUM_ASIC_P1V1_VDDQC_HBM1357_TEMP_C
Definition: plat_pldm_sensor.h:204
#define SENSOR_NUM_ASIC_P1V1_VDDQC_HBM0246_TEMP_C
Definition: plat_pldm_sensor.h:184
#define SENSOR_NUM_ASIC_P0V85_MEDHA0_VDD_TEMP_C
Definition: plat_pldm_sensor.h:104
#define SENSOR_NUM_ASIC_P0V85_MEDHA1_VDD_TEMP_C
Definition: plat_pldm_sensor.h:109
#define SENSOR_NUM_ASIC_P0V4_VDDQL_HBM0246_TEMP_C
Definition: plat_pldm_sensor.h:179
#define SENSOR_NUM_ASIC_P0V75_MAX_N_VDD_TEMP_C
Definition: plat_pldm_sensor.h:149
#define SENSOR_NUM_ASIC_P0V75_OWL_W_VDD_TEMP_C
Definition: plat_pldm_sensor.h:139
#define SENSOR_NUM_ASIC_P1V2_HAMSA_VDDHRXTX_PCIE_TEMP_C
Definition: plat_pldm_sensor.h:164