OpenBIC
OpenSource Bridge-IC
intel_peci.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <drivers/peci.h>
#include "sensor.h"
#include "hal_peci.h"
#include "libutil.h"
#include "intel_peci.h"
#include "ipmi.h"
#include "util_sys.h"
#include "intel_dimm.h"
#include <logging/log.h>
#include "time.h"
Include dependency graph for intel_peci.c:

Macros

#define DIMM_TEMP_OFS_0   0x01
 
#define DIMM_TEMP_OFS_1   0x02
 

Functions

 LOG_MODULE_REGISTER (dev_intel_peci)
 
__weak bool pal_get_power_sku_unit (uint8_t addr)
 
bool check_dimm_present (uint8_t dimm_channel, uint8_t dimm_num, uint8_t *present_result)
 
__weak bool pal_get_cpu_energy (uint8_t addr, uint32_t *pkg_energy, uint32_t *run_time)
 
__weak void pal_cal_cpu_power (intel_peci_unit unit_info, uint32_t diff_energy, uint32_t diff_time, int *reading)
 
bool read_cpu_power (uint8_t addr, int *reading)
 
__weak bool pal_get_dimm_energy (uint8_t addr, uint32_t *pkg_energy)
 
__weak void pal_cal_total_dimm_power (intel_peci_unit unit_info, uint32_t diff_energy, uint32_t diff_time, int *reading)
 
bool read_total_dimm_power (uint8_t addr, int *reading)
 
uint8_t intel_peci_read (sensor_cfg *cfg, int *reading)
 
uint8_t intel_peci_init (sensor_cfg *cfg)
 

Macro Definition Documentation

◆ DIMM_TEMP_OFS_0

#define DIMM_TEMP_OFS_0   0x01

◆ DIMM_TEMP_OFS_1

#define DIMM_TEMP_OFS_1   0x02

Function Documentation

◆ check_dimm_present()

bool check_dimm_present ( uint8_t  dimm_channel,
uint8_t  dimm_num,
uint8_t *  present_result 
)
Here is the call graph for this function:

◆ intel_peci_init()

uint8_t intel_peci_init ( sensor_cfg cfg)
Here is the call graph for this function:

◆ intel_peci_read()

uint8_t intel_peci_read ( sensor_cfg cfg,
int *  reading 
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( dev_intel_peci  )

◆ pal_cal_cpu_power()

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

◆ pal_cal_total_dimm_power()

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

◆ pal_get_cpu_energy()

__weak bool pal_get_cpu_energy ( uint8_t  addr,
uint32_t *  pkg_energy,
uint32_t *  run_time 
)

◆ pal_get_dimm_energy()

__weak bool pal_get_dimm_energy ( uint8_t  addr,
uint32_t *  pkg_energy 
)
Here is the call graph for this function:

◆ pal_get_power_sku_unit()

__weak bool pal_get_power_sku_unit ( uint8_t  addr)
Here is the call graph for this function:

◆ read_cpu_power()

bool read_cpu_power ( uint8_t  addr,
int *  reading 
)
Here is the call graph for this function:

◆ read_total_dimm_power()

bool read_total_dimm_power ( uint8_t  addr,
int *  reading 
)
Here is the call graph for this function: