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

Classes

struct  addr_map_t
 

Macros

#define SENSOR_CFG_NO_CHANGE   0xFF
 

Functions

 LOG_MODULE_REGISTER (plat_pldm_sensor)
 
uint8_t convert_vr_addr (uint8_t addr, uint8_t vr_change_mode)
 
uint8_t check_sensor_type (uint8_t sensor_num)
 
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, char16_t ch)
 
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 ()
 
sensor_cfgget_sensor_cfg_by_sensor_id (uint8_t sensor_id)
 
bool get_raw_data_from_sensor_id (uint8_t sensor_id, uint8_t offset, uint8_t *val, uint8_t len)
 
void change_sensor_cfg (uint8_t asic_board_id, uint8_t vr_module, uint8_t ubc_module, uint8_t board_rev_id)
 
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)
 
void set_ioe_value (uint8_t ioe_addr, uint8_t ioe_reg, uint8_t value)
 
int get_ioe_value (uint8_t ioe_addr, uint8_t ioe_reg, uint8_t *value)
 
uint8_t get_ioe_init_flag ()
 
void set_ioe_init_flag (uint8_t flag)
 
 K_KERNEL_STACK_MEMBER (quick_sensor_poll_stack, 1024)
 
void init_U200051_IO ()
 
void quick_sensor_poll_handler (void *arug0, void *arug1, void *arug2)
 
void quick_sensor_poll_init ()
 

Variables

vr_pre_proc_arg vr_pre_read_args []
 
mpc12109_init_arg mpc12109_init_args []
 
uint8_t ioe_init_flag = 0
 
pldm_sensor_info plat_pldm_sensor_temp_table []
 
pldm_sensor_info plat_pldm_sensor_vr_table []
 
pldm_sensor_info plat_pldm_sensor_quick_vr_table []
 
pldm_sensor_info plat_pldm_sensor_ubc_table []
 
pldm_sensor_info plat_pldm_sensor_evb_table []
 
PDR_sensor_auxiliary_names plat_pdr_sensor_aux_names_table []
 
PDR_sensor_auxiliary_names plat_evb_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
 
struct k_thread quick_sensor_poll
 
k_tid_t quick_sensor_tid
 

Macro Definition Documentation

◆ SENSOR_CFG_NO_CHANGE

#define SENSOR_CFG_NO_CHANGE   0xFF

Function Documentation

◆ change_sensor_cfg()

void change_sensor_cfg ( uint8_t  asic_board_id,
uint8_t  vr_module,
uint8_t  ubc_module,
uint8_t  board_rev_id 
)

◆ char16_strcat_char()

char16_t * char16_strcat_char ( char16_t dest,
char16_t  ch 
)
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)

◆ check_sensor_type()

uint8_t check_sensor_type ( uint8_t  sensor_num)

◆ convert_vr_addr()

uint8_t convert_vr_addr ( uint8_t  addr,
uint8_t  vr_change_mode 
)

◆ get_ioe_init_flag()

uint8_t get_ioe_init_flag ( )

◆ get_ioe_value()

int get_ioe_value ( uint8_t  ioe_addr,
uint8_t  ioe_reg,
uint8_t *  value 
)
Here is the call graph for this function:

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

bool get_raw_data_from_sensor_id ( uint8_t  sensor_id,
uint8_t  offset,
uint8_t *  val,
uint8_t  len 
)
Here is the call graph for this function:

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

◆ init_U200051_IO()

void init_U200051_IO ( )
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_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:

◆ K_KERNEL_STACK_MEMBER()

K_KERNEL_STACK_MEMBER ( quick_sensor_poll_stack  ,
1024   
)

◆ 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)
Here is the call graph for this function:

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

void plat_pldm_sensor_get_pdr_numeric_sensor ( int  thread_id,
int  sensor_num,
PDR_numeric_sensor numeric_sensor_table 
)
Here is the call graph for this function:

◆ plat_pldm_sensor_get_sensor_count()

int plat_pldm_sensor_get_sensor_count ( int  thread_id)
Here is the call graph for this function:

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

◆ quick_sensor_poll_handler()

void quick_sensor_poll_handler ( void *  arug0,
void *  arug1,
void *  arug2 
)
Here is the call graph for this function:

◆ quick_sensor_poll_init()

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

◆ set_ioe_init_flag()

void set_ioe_init_flag ( uint8_t  flag)

◆ set_ioe_value()

void set_ioe_value ( uint8_t  ioe_addr,
uint8_t  ioe_reg,
uint8_t  value 
)
Here is the call graph for this function:

◆ 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

◆ ioe_init_flag

uint8_t ioe_init_flag = 0

◆ mpc12109_init_args

◆ plat_evb_pdr_sensor_aux_names_table

PDR_sensor_auxiliary_names plat_evb_pdr_sensor_aux_names_table[]

◆ 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:70

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

pldm_sensor_info plat_pldm_sensor_evb_table[]

◆ plat_pldm_sensor_quick_vr_table

pldm_sensor_info plat_pldm_sensor_quick_vr_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[]

◆ quick_sensor_poll

struct k_thread quick_sensor_poll

◆ quick_sensor_tid

k_tid_t quick_sensor_tid

◆ vr_pre_read_args

vr_pre_proc_arg vr_pre_read_args[]
extern