OpenBIC
OpenSource Bridge-IC
plat_log.c File Reference
#include <kernel.h>
#include <stdlib.h>
#include <logging/log.h>
#include <libutil.h>
#include "plat_sensor_table.h"
#include "fru.h"
#include "plat_fru.h"
#include "plat_i2c.h"
#include "plat_log.h"
#include "plat_cpld.h"
#include "plat_hook.h"
#include "plat_class.h"
#include "plat_pldm_sensor.h"
Include dependency graph for plat_log.c:

Classes

struct  _vr_device_match_sensor_num
 
struct  _vr_error_callback_info_
 
struct  vr_smbus_alrt_sensor_map
 

Macros

#define LOG_MAX_INDEX   0x0FFF
 
#define LOG_MAX_NUM   100
 
#define FRU_LOG_START   0x0000
 
#define EEPROM_MAX_WRITE_TIME   5
 
#define CPLD_VR_VENDOR_TYPE_REG   0x1C
 
#define ERROR_CODE_TYPE_SHIFT   13
 
#define SENSOR_NUMBER_DONT_CARE   0xFF
 

Typedefs

typedef struct _vr_device_match_sensor_num vr_device_match_sensor_num
 
typedef struct _vr_error_callback_info_ vr_error_callback_info
 
typedef struct vr_smbus_alrt_sensor_map vr_smbus_alrt_sensor_map
 

Functions

 LOG_MODULE_REGISTER (plat_log)
 
void plat_log_read (uint8_t *log_data, uint8_t cmd_size, uint16_t order)
 
void plat_clear_log ()
 
bool vr_fault_get_error_data (uint8_t sensor_id, uint8_t *data)
 
bool get_multi_vr_status (uint8_t alrt_index, uint8_t *data)
 
bool get_error_data (uint16_t error_code, uint8_t *data)
 
void error_log_event (uint16_t error_code, bool log_status)
 
void reset_error_log_event (uint8_t err_type)
 
uint8_t plat_log_get_num (void)
 
void find_last_log_position ()
 
void init_load_eeprom_log (void)
 
bool check_temp_status_bit (uint8_t bit_num)
 

Variables

vr_device_match_sensor_num vr_error_fault_table []
 
vr_error_callback_info vr_error_callback_info_table []
 
vr_smbus_alrt_sensor_map vr_smbus_alrt_sensor_map_table []
 

Macro Definition Documentation

◆ CPLD_VR_VENDOR_TYPE_REG

#define CPLD_VR_VENDOR_TYPE_REG   0x1C

◆ EEPROM_MAX_WRITE_TIME

#define EEPROM_MAX_WRITE_TIME   5

◆ ERROR_CODE_TYPE_SHIFT

#define ERROR_CODE_TYPE_SHIFT   13

◆ FRU_LOG_START

#define FRU_LOG_START   0x0000

◆ LOG_MAX_INDEX

#define LOG_MAX_INDEX   0x0FFF

◆ LOG_MAX_NUM

#define LOG_MAX_NUM   100

◆ SENSOR_NUMBER_DONT_CARE

#define SENSOR_NUMBER_DONT_CARE   0xFF

Typedef Documentation

◆ vr_device_match_sensor_num

◆ vr_error_callback_info

◆ vr_smbus_alrt_sensor_map

Function Documentation

◆ check_temp_status_bit()

bool check_temp_status_bit ( uint8_t  bit_num)
Here is the call graph for this function:

◆ error_log_event()

void error_log_event ( uint16_t  error_code,
bool  log_status 
)

◆ find_last_log_position()

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

◆ get_error_data()

bool get_error_data ( uint16_t  error_code,
uint8_t *  data 
)
Here is the call graph for this function:

◆ get_multi_vr_status()

bool get_multi_vr_status ( uint8_t  alrt_index,
uint8_t *  data 
)
Here is the call graph for this function:

◆ init_load_eeprom_log()

void init_load_eeprom_log ( void  )

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_log  )

◆ plat_clear_log()

void plat_clear_log ( )

◆ plat_log_get_num()

uint8_t plat_log_get_num ( void  )

◆ plat_log_read()

void plat_log_read ( uint8_t *  log_data,
uint8_t  cmd_size,
uint16_t  order 
)

◆ reset_error_log_event()

void reset_error_log_event ( uint8_t  err_type)

◆ vr_fault_get_error_data()

bool vr_fault_get_error_data ( uint8_t  sensor_id,
uint8_t *  data 
)
Here is the call graph for this function:

Variable Documentation

◆ vr_error_callback_info_table

vr_error_callback_info vr_error_callback_info_table[]

◆ vr_error_fault_table

vr_device_match_sensor_num vr_error_fault_table[]

◆ vr_smbus_alrt_sensor_map_table

vr_smbus_alrt_sensor_map vr_smbus_alrt_sensor_map_table[]
Initial value:
= {
{ 0 },
{
4,
},
}
@ VR_RAIL_E_ASIC_P0V85_HAMSA_VDD
Definition: plat_hook.h:58
@ VR_RAIL_E_ASIC_P0V75_MAX_S_VDD
Definition: plat_hook.h:64
@ VR_RAIL_E_ASIC_P0V4_VDDQL_HBM0246
Definition: plat_hook.h:61
@ VR_RAIL_E_ASIC_P1V2_HAMSA_VDDHRXTX_PCIE
Definition: plat_hook.h:57
@ VR_RAIL_E_ASIC_P0V75_VDDPHY_HBM1357
Definition: plat_hook.h:50
@ VR_RAIL_E_ASIC_P0V75_OWL_E_VDD
Definition: plat_hook.h:51
@ VR_RAIL_E_ASIC_P1V8_VPP_HBM0246
Definition: plat_hook.h:60
@ VR_RAIL_E_ASIC_P0V4_VDDQL_HBM1357
Definition: plat_hook.h:52
@ VR_RAIL_E_ASIC_P0V9_OWL_E_TRVDD
Definition: plat_hook.h:47
@ VR_RAIL_E_ASIC_P1V8_VPP_HBM1357
Definition: plat_hook.h:54
@ VR_RAIL_E_ASIC_P0V85_MEDHA0_VDD
Definition: plat_hook.h:45
@ VR_RAIL_E_ASIC_P0V75_VDDPHY_HBM0246
Definition: plat_hook.h:62
@ VR_RAIL_E_ASIC_P0V75_OWL_W_VDD
Definition: plat_hook.h:63
@ VR_RAIL_E_ASIC_P0V75_OWL_E_TRVDD
Definition: plat_hook.h:48
@ VR_RAIL_E_ASIC_P1V1_VDDQC_HBM1357
Definition: plat_hook.h:53
@ VR_RAIL_E_ASIC_P0V85_MEDHA1_VDD
Definition: plat_hook.h:46
@ VR_RAIL_E_ASIC_P0V75_MAX_M_VDD
Definition: plat_hook.h:49
@ VR_RAIL_E_ASIC_P0V75_OWL_W_TRVDD
Definition: plat_hook.h:66
@ VR_RAIL_E_ASIC_P0V8_HAMSA_AVDD_PCIE
Definition: plat_hook.h:56
@ VR_RAIL_E_ASIC_P1V1_VDDQC_HBM0246
Definition: plat_hook.h:59
@ VR_RAIL_E_ASIC_P0V75_MAX_N_VDD
Definition: plat_hook.h:55
@ VR_RAIL_E_ASIC_P0V9_OWL_W_TRVDD
Definition: plat_hook.h:65