OpenBIC
OpenSource Bridge-IC
plat_dimm.c File Reference
#include "plat_dimm.h"
#include <stdio.h>
#include <stdlib.h>
#include <zephyr.h>
#include <logging/log.h>
#include <errno.h>
#include "plat_sensor_table.h"
#include "ipmb.h"
#include "ipmi.h"
#include "kcs.h"
#include "sensor.h"
#include "pmic.h"
#include "power_status.h"
#include "plat_i2c.h"
#include "plat_isr.h"
#include "plat_class.h"
#include "libutil.h"
#include "rg3mxxb12.h"
#include "p3h284x.h"
#include "intel_peci.h"
Include dependency graph for plat_dimm.c:

Functions

 LOG_MODULE_REGISTER (plat_dimm)
 
 K_THREAD_STACK_DEFINE (get_dimm_info_stack, GET_DIMM_INFO_STACK_SIZE)
 
void start_get_dimm_info_thread ()
 
bool is_dimm_prsnt_inited ()
 
bool is_dimm_ready_monitor (uint8_t dimm_id)
 
void get_dimm_info_handler ()
 
void init_i3c_dimm_prsnt_status ()
 
bool get_dimm_presence_status (uint8_t dimm_id)
 
void set_dimm_presence_status (uint8_t index, uint8_t status)
 
uint8_t sensor_num_map_dimm_id (uint8_t sensor_num)
 
int switch_i3c_dimm_mux (uint8_t i3c_mux_position)
 
int all_brocast_ccc (I3C_MSG *i3c_msg)
 
int get_pmic_error_raw_data (int dimm_index, uint8_t *data)
 
void get_pmic_power_raw_data (int dimm_index, uint8_t *data)
 
void get_spd_temp_raw_data (int dimm_index, uint8_t *data)
 
int pal_get_pmic_pwr (uint8_t sensor_num, uint8_t *data)
 
int pal_get_spd_temp (uint8_t sensor_num, uint8_t *data)
 
void clear_unaccessible_dimm_data (uint8_t dimm_id)
 
void pal_cal_total_dimm_power (intel_peci_unit unit_info, uint32_t diff_energy, uint32_t diff_time, int *reading)
 

Variables

struct k_thread get_dimm_info_thread
 
k_tid_t get_dimm_info_tid
 
struct k_mutex i3c_dimm_mutex
 
uint8_t pmic_i3c_addr_list [MAX_COUNT_DIMM/2]
 
uint8_t spd_i3c_addr_list [MAX_COUNT_DIMM/2]
 
dimm_info dimm_data [MAX_COUNT_DIMM]
 

Function Documentation

◆ all_brocast_ccc()

int all_brocast_ccc ( I3C_MSG i3c_msg)
Here is the call graph for this function:

◆ clear_unaccessible_dimm_data()

void clear_unaccessible_dimm_data ( uint8_t  dimm_id)

◆ get_dimm_info_handler()

void get_dimm_info_handler ( )

◆ get_dimm_presence_status()

bool get_dimm_presence_status ( uint8_t  dimm_id)

◆ get_pmic_error_raw_data()

int get_pmic_error_raw_data ( int  dimm_index,
uint8_t *  data 
)

◆ get_pmic_power_raw_data()

void get_pmic_power_raw_data ( int  dimm_index,
uint8_t *  data 
)

◆ get_spd_temp_raw_data()

void get_spd_temp_raw_data ( int  dimm_index,
uint8_t *  data 
)

◆ init_i3c_dimm_prsnt_status()

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

◆ is_dimm_prsnt_inited()

bool is_dimm_prsnt_inited ( )

◆ is_dimm_ready_monitor()

bool is_dimm_ready_monitor ( uint8_t  dimm_id)

◆ K_THREAD_STACK_DEFINE()

K_THREAD_STACK_DEFINE ( get_dimm_info_stack  ,
GET_DIMM_INFO_STACK_SIZE   
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_dimm  )

◆ pal_cal_total_dimm_power()

void pal_cal_total_dimm_power ( intel_peci_unit  unit_info,
uint32_t  diff_energy,
uint32_t  diff_time,
int *  reading 
)

◆ pal_get_pmic_pwr()

int pal_get_pmic_pwr ( uint8_t  sensor_num,
uint8_t *  data 
)
Here is the call graph for this function:

◆ pal_get_spd_temp()

int pal_get_spd_temp ( uint8_t  sensor_num,
uint8_t *  data 
)
Here is the call graph for this function:

◆ sensor_num_map_dimm_id()

uint8_t sensor_num_map_dimm_id ( uint8_t  sensor_num)

◆ set_dimm_presence_status()

void set_dimm_presence_status ( uint8_t  index,
uint8_t  status 
)

◆ start_get_dimm_info_thread()

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

◆ switch_i3c_dimm_mux()

int switch_i3c_dimm_mux ( uint8_t  i3c_mux_position)
Here is the call graph for this function:

Variable Documentation

◆ dimm_data

◆ get_dimm_info_thread

struct k_thread get_dimm_info_thread

◆ get_dimm_info_tid

k_tid_t get_dimm_info_tid

◆ i3c_dimm_mutex

struct k_mutex i3c_dimm_mutex

◆ pmic_i3c_addr_list

uint8_t pmic_i3c_addr_list[MAX_COUNT_DIMM/2]
Initial value:
@ PMIC_A3_A7_ADDR
Definition: plat_dimm.h:56
@ PMIC_A0_A4_ADDR
Definition: plat_dimm.h:54
@ PMIC_A2_A6_ADDR
Definition: plat_dimm.h:55
@ PMIC_A1_A5_ADDR
Definition: plat_dimm.h:61

◆ spd_i3c_addr_list

uint8_t spd_i3c_addr_list[MAX_COUNT_DIMM/2]
Initial value:
@ DIMM_SPD_A2_A6_ADDR
Definition: plat_dimm.h:61
@ DIMM_SPD_A0_A4_ADDR
Definition: plat_dimm.h:60
@ DIMM_SPD_A3_A7_ADDR
Definition: plat_dimm.h:62
@ DIMM_SPD_A1_A5_ADDR
Definition: plat_dimm.h:68