OpenBIC
OpenSource Bridge-IC
plat_pmic.h File Reference
#include <stdint.h>
Include dependency graph for plat_pmic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MONITOR_PMIC_ERROR_STACK_SIZE   4096
 
#define MONITOR_PMIC_ERROR_TIME_MS   (3 * 1000)
 
#define MAX_LEN_GET_PMIC_ERROR_INFO   6
 
#define MAX_LEN_I3C_GET_PMIC_ERROR_INFO   7
 
#define MAX_COUNT_DIMM   6
 
#define MAX_COUNT_PMIC_ERROR_TYPE   17
 
#define I3C_MUX_TO_BIC   0x1
 
#define I3C_MUX_TO_CPU   0x0
 
#define DIMM_MUX_TO_DIMM_A0A1A3   0x0
 
#define DIMM_MUX_TO_DIMM_A4A6A7   0x1
 
#define CL_CPLD_BMC_CHANNEL_ADDR   0x1E
 
#define PMIC_FAULT_STATUS_OFFSET   0x0B
 
#define DIMM_I3C_MUX_CONTROL_OFFSET   0x0B
 

Enumerations

enum  DIMM_ID {
  DIMM_ID_A0 = 0 , DIMM_ID_A2 , DIMM_ID_A3 , DIMM_ID_A4 ,
  DIMM_ID_A6 , DIMM_ID_A7 , DIMM_ID_A0 = 0 , DIMM_ID_A2 ,
  DIMM_ID_A3 , DIMM_ID_A4 , DIMM_ID_A6 , DIMM_ID_A7 ,
  DIMM_ID_UNKNOWN = 0xff , DIMM_ID_A0 = 0 , DIMM_ID_A1 , DIMM_ID_A2 ,
  DIMM_ID_A3 , DIMM_ID_A4 , DIMM_ID_A5 , DIMM_ID_A6 ,
  DIMM_ID_A7 , DIMM_ID_UNKNOWN = 0xff , DIMM_ID_A , DIMM_ID_B ,
  DIMM_ID_C , DIMM_ID_D , DIMM_ID_E , DIMM_ID_F ,
  DIMM_ID_G , DIMM_ID_H , DIMM_ID_I , DIMM_ID_J ,
  DIMM_ID_K , DIMM_ID_L , DIMM_ID_MAX , DIMM_ID_UNKNOWN = 0xff
}
 
enum  READ_PMIC_ERROR_PATH { READ_PMIC_ERROR_VIA_ME , READ_PMIC_ERROR_VIA_I3C , READ_PMIC_ERROR_VIA_ME , READ_PMIC_ERROR_VIA_I3C }
 

Functions

void start_monitor_pmic_error_thread ()
 
void monitor_pmic_error_handler ()
 
int compare_pmic_error (uint8_t dimm_id, uint8_t *pmic_err_data, uint8_t pmic_err_data_len, uint8_t read_path)
 
int get_dimm_info (uint8_t dimm_id, uint8_t *bus, uint8_t *addr)
 
void add_pmic_error_sel (uint8_t dimm_id, uint8_t error_type)
 
int switch_i3c_dimm_mux (uint8_t i3c_mux_position, uint8_t dimm_mux_position)
 
void read_pmic_error_via_i3c ()
 
int get_pmic_fault_status ()
 

Macro Definition Documentation

◆ CL_CPLD_BMC_CHANNEL_ADDR

#define CL_CPLD_BMC_CHANNEL_ADDR   0x1E

◆ DIMM_I3C_MUX_CONTROL_OFFSET

#define DIMM_I3C_MUX_CONTROL_OFFSET   0x0B

◆ DIMM_MUX_TO_DIMM_A0A1A3

#define DIMM_MUX_TO_DIMM_A0A1A3   0x0

◆ DIMM_MUX_TO_DIMM_A4A6A7

#define DIMM_MUX_TO_DIMM_A4A6A7   0x1

◆ I3C_MUX_TO_BIC

#define I3C_MUX_TO_BIC   0x1

◆ I3C_MUX_TO_CPU

#define I3C_MUX_TO_CPU   0x0

◆ MAX_COUNT_DIMM

#define MAX_COUNT_DIMM   6

◆ MAX_COUNT_PMIC_ERROR_TYPE

#define MAX_COUNT_PMIC_ERROR_TYPE   17

◆ MAX_LEN_GET_PMIC_ERROR_INFO

#define MAX_LEN_GET_PMIC_ERROR_INFO   6

◆ MAX_LEN_I3C_GET_PMIC_ERROR_INFO

#define MAX_LEN_I3C_GET_PMIC_ERROR_INFO   7

◆ MONITOR_PMIC_ERROR_STACK_SIZE

#define MONITOR_PMIC_ERROR_STACK_SIZE   4096

◆ MONITOR_PMIC_ERROR_TIME_MS

#define MONITOR_PMIC_ERROR_TIME_MS   (3 * 1000)

◆ PMIC_FAULT_STATUS_OFFSET

#define PMIC_FAULT_STATUS_OFFSET   0x0B

Enumeration Type Documentation

◆ DIMM_ID

enum DIMM_ID
Enumerator
DIMM_ID_A0 
DIMM_ID_A2 
DIMM_ID_A3 
DIMM_ID_A4 
DIMM_ID_A6 
DIMM_ID_A7 
DIMM_ID_A0 
DIMM_ID_A2 
DIMM_ID_A3 
DIMM_ID_A4 
DIMM_ID_A6 
DIMM_ID_A7 
DIMM_ID_UNKNOWN 
DIMM_ID_A0 
DIMM_ID_A1 
DIMM_ID_A2 
DIMM_ID_A3 
DIMM_ID_A4 
DIMM_ID_A5 
DIMM_ID_A6 
DIMM_ID_A7 
DIMM_ID_UNKNOWN 
DIMM_ID_A 
DIMM_ID_B 
DIMM_ID_C 
DIMM_ID_D 
DIMM_ID_E 
DIMM_ID_F 
DIMM_ID_G 
DIMM_ID_H 
DIMM_ID_I 
DIMM_ID_J 
DIMM_ID_K 
DIMM_ID_L 
DIMM_ID_MAX 
DIMM_ID_UNKNOWN 

◆ READ_PMIC_ERROR_PATH

Enumerator
READ_PMIC_ERROR_VIA_ME 
READ_PMIC_ERROR_VIA_I3C 
READ_PMIC_ERROR_VIA_ME 
READ_PMIC_ERROR_VIA_I3C 

Function Documentation

◆ add_pmic_error_sel()

void add_pmic_error_sel ( uint8_t  dimm_id,
uint8_t  error_type 
)

◆ compare_pmic_error()

int compare_pmic_error ( uint8_t  dimm_id,
uint8_t *  pmic_err_data,
uint8_t  pmic_err_data_len,
uint8_t  read_path 
)

◆ get_dimm_info()

int get_dimm_info ( uint8_t  dimm_id,
uint8_t *  bus,
uint8_t *  addr 
)

◆ get_pmic_fault_status()

int get_pmic_fault_status ( )

◆ monitor_pmic_error_handler()

void monitor_pmic_error_handler ( )

◆ read_pmic_error_via_i3c()

void read_pmic_error_via_i3c ( )

◆ start_monitor_pmic_error_thread()

void start_monitor_pmic_error_thread ( )

◆ switch_i3c_dimm_mux()

int switch_i3c_dimm_mux ( uint8_t  i3c_mux_position,
uint8_t  dimm_mux_position 
)