OpenBIC
OpenSource Bridge-IC
plat_pldm_sensor.c File Reference
#include <logging/log.h>
#include "pmbus.h"
#include "ast_adc.h"
#include "pdr.h"
#include "tmp431.h"
#include "sensor.h"
#include "pldm_sensor.h"
#include "pldm_monitor.h"
#include "plat_hook.h"
#include "plat_i2c.h"
#include "plat_pldm_sensor.h"
#include "plat_class.h"
#include "plat_gpio.h"
#include "emc1413.h"
Include dependency graph for plat_pldm_sensor.c:

Classes

struct  plat_sensor_vr_extend_info
 
struct  plat_sensor_tmp_extend_info
 

Typedefs

typedef struct plat_sensor_vr_extend_info plat_sensor_vr_extend_info
 
typedef struct plat_sensor_tmp_extend_info plat_sensor_tmp_extend_info
 

Functions

 LOG_MODULE_REGISTER (plat_pldm_sensor)
 
void plat_pldm_sensor_change_ubc_dev ()
 
void plat_pldm_sensor_change_vr_dev ()
 
void plat_pldm_sensor_change_vr_addr ()
 
void plat_pldm_sensor_change_vr_init_args ()
 
void plat_pldm_sensor_change_temp_addr ()
 
void plat_pldm_sensor_change_temp_dev ()
 
void find_vr_addr_by_sensor_id (uint8_t sensor_id, uint8_t *vr_addr)
 
uint32_t plat_get_pdr_size (uint8_t pdr_type)
 
pldm_sensor_threadplat_pldm_sensor_load_thread ()
 
pldm_sensor_infoplat_pldm_sensor_load (int thread_id)
 
int plat_pldm_sensor_get_sensor_count (int thread_id)
 
void plat_pldm_sensor_get_pdr_numeric_sensor (int thread_id, int sensor_num, PDR_numeric_sensor *numeric_sensor_table)
 
void plat_load_numeric_sensor_pdr_table (PDR_numeric_sensor *numeric_sensor_table)
 
void plat_load_aux_sensor_names_pdr_table (PDR_sensor_auxiliary_names *aux_sensor_name_table)
 
size_t char16_strlen (const char16_t *str)
 
char16_tchar16_strcpy (char16_t *dest, const char16_t *src)
 
char16_tchar16_strcat_char (char16_t *dest)
 
void plat_init_entity_aux_names_pdr_table ()
 
void plat_load_entity_aux_names_pdr_table (PDR_entity_auxiliary_names *entity_aux_name_table)
 
uint16_t plat_get_pdr_entity_aux_names_size ()
 
void find_tmp_addr_and_offset_by_sensor_id (uint8_t sensor_id, uint8_t *tmp_addr, uint16_t *tmp_offset)
 
void find_init_args_by_sensor_id (uint16_t sensor_id, void **init_args)
 
bool is_dc_access (uint8_t sensor_num)
 
void set_plat_sensor_polling_enable_flag (bool value)
 
void set_plat_sensor_ubc_polling_enable_flag (bool value)
 
void set_plat_sensor_temp_polling_enable_flag (bool value)
 
void set_plat_sensor_vr_polling_enable_flag (bool value)
 
bool get_plat_sensor_polling_enable_flag ()
 
bool get_plat_sensor_ubc_polling_enable_flag ()
 
bool get_plat_sensor_temp_polling_enable_flag ()
 
bool get_plat_sensor_vr_polling_enable_flag ()
 
bool is_ubc_access (uint8_t sensor_num)
 
bool is_temp_access (uint8_t cfg_idx)
 
bool is_vr_access (uint8_t sensor_num)
 
bool get_sensor_info_by_sensor_id (uint8_t sensor_id, uint8_t *vr_bus, uint8_t *vr_addr, uint8_t *sensor_dev)
 
sensor_cfgget_sensor_cfg_by_sensor_id (uint8_t sensor_id)
 
bool is_osfp_3v3_access (uint8_t sensor_num)
 

Variables

plat_sensor_vr_extend_info plat_sensor_vr_extend_table []
 
plat_sensor_tmp_extend_info plat_sensor_tmp_extend_table []
 
pldm_sensor_info plat_pldm_sensor_ubc_table []
 
pldm_sensor_info plat_pldm_sensor_vr_table []
 
pldm_sensor_info plat_pldm_sensor_temp_table []
 
PDR_sensor_auxiliary_names plat_pdr_sensor_aux_names_table []
 
PDR_entity_auxiliary_names plat_pdr_entity_aux_names_table []
 
uint16_t plat_pdr_entity_aux_names_table_size = 0
 

Typedef Documentation

◆ plat_sensor_tmp_extend_info

◆ plat_sensor_vr_extend_info

Function Documentation

◆ char16_strcat_char()

char16_t * char16_strcat_char ( char16_t dest)
Here is the call graph for this function:

◆ char16_strcpy()

char16_t * char16_strcpy ( char16_t dest,
const char16_t src 
)

◆ char16_strlen()

size_t char16_strlen ( const char16_t str)

◆ find_init_args_by_sensor_id()

void find_init_args_by_sensor_id ( uint16_t  sensor_id,
void **  init_args 
)

◆ find_tmp_addr_and_offset_by_sensor_id()

void find_tmp_addr_and_offset_by_sensor_id ( uint8_t  sensor_id,
uint8_t *  tmp_addr,
uint16_t *  tmp_offset 
)

◆ find_vr_addr_by_sensor_id()

void find_vr_addr_by_sensor_id ( uint8_t  sensor_id,
uint8_t *  vr_addr 
)

◆ get_plat_sensor_polling_enable_flag()

bool get_plat_sensor_polling_enable_flag ( )

◆ get_plat_sensor_temp_polling_enable_flag()

bool get_plat_sensor_temp_polling_enable_flag ( )

◆ get_plat_sensor_ubc_polling_enable_flag()

bool get_plat_sensor_ubc_polling_enable_flag ( )

◆ get_plat_sensor_vr_polling_enable_flag()

bool get_plat_sensor_vr_polling_enable_flag ( )

◆ get_sensor_cfg_by_sensor_id()

sensor_cfg * get_sensor_cfg_by_sensor_id ( uint8_t  sensor_id)
Here is the call graph for this function:

◆ get_sensor_info_by_sensor_id()

bool get_sensor_info_by_sensor_id ( uint8_t  sensor_id,
uint8_t *  vr_bus,
uint8_t *  vr_addr,
uint8_t *  sensor_dev 
)
Here is the call graph for this function:

◆ is_dc_access()

bool is_dc_access ( uint8_t  sensor_num)
Here is the call graph for this function:

◆ is_osfp_3v3_access()

bool is_osfp_3v3_access ( uint8_t  sensor_num)
Here is the call graph for this function:

◆ is_temp_access()

bool is_temp_access ( uint8_t  cfg_idx)
Here is the call graph for this function:

◆ is_ubc_access()

bool is_ubc_access ( uint8_t  sensor_num)
Here is the call graph for this function:

◆ is_vr_access()

bool is_vr_access ( uint8_t  sensor_num)
Here is the call graph for this function:

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_pldm_sensor  )

◆ plat_get_pdr_entity_aux_names_size()

uint16_t plat_get_pdr_entity_aux_names_size ( )

◆ plat_get_pdr_size()

uint32_t plat_get_pdr_size ( uint8_t  pdr_type)
Here is the call graph for this function:

◆ plat_init_entity_aux_names_pdr_table()

void plat_init_entity_aux_names_pdr_table ( )
Here is the call graph for this function:

◆ plat_load_aux_sensor_names_pdr_table()

void plat_load_aux_sensor_names_pdr_table ( PDR_sensor_auxiliary_names aux_sensor_name_table)

◆ plat_load_entity_aux_names_pdr_table()

void plat_load_entity_aux_names_pdr_table ( PDR_entity_auxiliary_names entity_aux_name_table)

◆ plat_load_numeric_sensor_pdr_table()

void plat_load_numeric_sensor_pdr_table ( PDR_numeric_sensor numeric_sensor_table)
Here is the call graph for this function:

◆ plat_pldm_sensor_change_temp_addr()

void plat_pldm_sensor_change_temp_addr ( )
Here is the call graph for this function:

◆ plat_pldm_sensor_change_temp_dev()

void plat_pldm_sensor_change_temp_dev ( )
Here is the call graph for this function:

◆ plat_pldm_sensor_change_ubc_dev()

void plat_pldm_sensor_change_ubc_dev ( )

◆ plat_pldm_sensor_change_vr_addr()

void plat_pldm_sensor_change_vr_addr ( )

◆ plat_pldm_sensor_change_vr_dev()

void plat_pldm_sensor_change_vr_dev ( )

◆ plat_pldm_sensor_change_vr_init_args()

void plat_pldm_sensor_change_vr_init_args ( )
Here is the call graph for this function:

◆ plat_pldm_sensor_get_pdr_numeric_sensor()

void plat_pldm_sensor_get_pdr_numeric_sensor ( int  thread_id,
int  sensor_num,
PDR_numeric_sensor numeric_sensor_table 
)

◆ plat_pldm_sensor_get_sensor_count()

int plat_pldm_sensor_get_sensor_count ( int  thread_id)

◆ plat_pldm_sensor_load()

pldm_sensor_info * plat_pldm_sensor_load ( int  thread_id)

◆ plat_pldm_sensor_load_thread()

pldm_sensor_thread * plat_pldm_sensor_load_thread ( )

◆ set_plat_sensor_polling_enable_flag()

void set_plat_sensor_polling_enable_flag ( bool  value)

◆ set_plat_sensor_temp_polling_enable_flag()

void set_plat_sensor_temp_polling_enable_flag ( bool  value)

◆ set_plat_sensor_ubc_polling_enable_flag()

void set_plat_sensor_ubc_polling_enable_flag ( bool  value)

◆ set_plat_sensor_vr_polling_enable_flag()

void set_plat_sensor_vr_polling_enable_flag ( bool  value)

Variable Documentation

◆ plat_pdr_entity_aux_names_table

PDR_entity_auxiliary_names plat_pdr_entity_aux_names_table[]
Initial value:
= { {
{
.record_handle = 0x00000000,
.PDR_header_version = 0x01,
.record_change_number = 0x0000,
.data_length = 0x0000,
},
.entity_type = 0x0000,
.entity_instance_number = 0x0001,
.container_id = 0x0000,
.shared_name_count = 0x0,
.nameStringCount = 0x1,
.nameLanguageTag = "en",
} }
@ PLDM_ENTITY_AUXILIARY_NAMES_PDR
Definition: pdr.h:51

◆ plat_pdr_entity_aux_names_table_size

uint16_t plat_pdr_entity_aux_names_table_size = 0

◆ plat_pdr_sensor_aux_names_table

PDR_sensor_auxiliary_names plat_pdr_sensor_aux_names_table[]

◆ plat_pldm_sensor_temp_table

pldm_sensor_info plat_pldm_sensor_temp_table[]

◆ plat_pldm_sensor_ubc_table

pldm_sensor_info plat_pldm_sensor_ubc_table[]

◆ plat_pldm_sensor_vr_table

pldm_sensor_info plat_pldm_sensor_vr_table[]

◆ plat_sensor_tmp_extend_table

plat_sensor_tmp_extend_info plat_sensor_tmp_extend_table[]
Initial value:
= {
}
@ EMC1413_REMOTE_TEMPERATRUE_1
Definition: emc1413.h:22
@ EMC1413_REMOTE_TEMPERATRUE_2
Definition: emc1413.h:23
#define SENSOR_NUM_ON_DIE_2_TEMP_C
Definition: plat_pldm_sensor.h:121
#define ON_DIE_4_TEMP_EMC1413_ADDR
Definition: plat_pldm_sensor.h:41
#define ON_DIE_3_TEMP_EMC1413_ADDR
Definition: plat_pldm_sensor.h:40
#define ON_DIE_2_TEMP_EMC1413_ADDR
Definition: plat_pldm_sensor.h:39
#define SENSOR_NUM_ON_DIE_4_TEMP_C
Definition: plat_pldm_sensor.h:123
#define ON_DIE_1_TEMP_EMC1413_ADDR
Definition: plat_pldm_sensor.h:38
#define SENSOR_NUM_ON_DIE_3_TEMP_C
Definition: plat_pldm_sensor.h:122
#define SENSOR_NUM_ON_DIE_1_TEMP_C
Definition: plat_pldm_sensor.h:120

◆ plat_sensor_vr_extend_table

plat_sensor_vr_extend_info plat_sensor_vr_extend_table[]