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

Go to the source code of this file.

Classes

struct  intel_peci_unit
 

Macros

#define RDPKG_IDX_PKG_TEMP   0x02
 
#define RDPKG_IDX_DIMM_TEMP   0x0E
 
#define WRPKG_IDX_DIMM_TEMP   0x0E
 
#define RDPKG_IDX_TJMAX_TEMP   0x10
 
#define RDPKG_IDX_PWR_SKU_UNIT_READ   0x1E
 
#define PECI_CC_SUCCESS   0x40
 

Enumerations

enum  {
  PECI_UNKNOWN = 0x00 , PECI_TEMP_CPU_MARGIN , PECI_TEMP_CPU , PECI_TEMP_CPU_TJMAX ,
  PECI_TEMP_CHANNEL0_DIMM0 , PECI_TEMP_CHANNEL0_DIMM1 , PECI_TEMP_CHANNEL1_DIMM0 , PECI_TEMP_CHANNEL1_DIMM1 ,
  PECI_TEMP_CHANNEL2_DIMM0 , PECI_TEMP_CHANNEL2_DIMM1 , PECI_TEMP_CHANNEL3_DIMM0 , PECI_TEMP_CHANNEL3_DIMM1 ,
  PECI_TEMP_CHANNEL4_DIMM0 , PECI_TEMP_CHANNEL4_DIMM1 , PECI_TEMP_CHANNEL5_DIMM0 , PECI_TEMP_CHANNEL5_DIMM1 ,
  PECI_TEMP_CHANNEL6_DIMM0 , PECI_TEMP_CHANNEL6_DIMM1 , PECI_TEMP_CHANNEL7_DIMM0 , PECI_TEMP_CHANNEL7_DIMM1 ,
  PECI_POWER_TOTAL_DIMM , PECI_PWR_CPU , PECI_MAX
}
 

Functions

bool check_dimm_present (uint8_t dimm_channel, uint8_t dimm_num, uint8_t *present_result)
 
bool pal_get_power_sku_unit (uint8_t addr)
 
bool pal_get_cpu_time (uint8_t addr, uint8_t cmd, uint8_t readlen, uint32_t *run_time)
 
bool pal_get_cpu_energy (uint8_t addr, uint32_t *pkg_energy, uint32_t *run_time)
 
void pal_cal_cpu_power (intel_peci_unit unit_info, uint32_t diff_energy, uint32_t diff_time, int *reading)
 

Macro Definition Documentation

◆ PECI_CC_SUCCESS

#define PECI_CC_SUCCESS   0x40

◆ RDPKG_IDX_DIMM_TEMP

#define RDPKG_IDX_DIMM_TEMP   0x0E

◆ RDPKG_IDX_PKG_TEMP

#define RDPKG_IDX_PKG_TEMP   0x02

◆ RDPKG_IDX_PWR_SKU_UNIT_READ

#define RDPKG_IDX_PWR_SKU_UNIT_READ   0x1E

◆ RDPKG_IDX_TJMAX_TEMP

#define RDPKG_IDX_TJMAX_TEMP   0x10

◆ WRPKG_IDX_DIMM_TEMP

#define WRPKG_IDX_DIMM_TEMP   0x0E

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PECI_UNKNOWN 
PECI_TEMP_CPU_MARGIN 
PECI_TEMP_CPU 
PECI_TEMP_CPU_TJMAX 
PECI_TEMP_CHANNEL0_DIMM0 
PECI_TEMP_CHANNEL0_DIMM1 
PECI_TEMP_CHANNEL1_DIMM0 
PECI_TEMP_CHANNEL1_DIMM1 
PECI_TEMP_CHANNEL2_DIMM0 
PECI_TEMP_CHANNEL2_DIMM1 
PECI_TEMP_CHANNEL3_DIMM0 
PECI_TEMP_CHANNEL3_DIMM1 
PECI_TEMP_CHANNEL4_DIMM0 
PECI_TEMP_CHANNEL4_DIMM1 
PECI_TEMP_CHANNEL5_DIMM0 
PECI_TEMP_CHANNEL5_DIMM1 
PECI_TEMP_CHANNEL6_DIMM0 
PECI_TEMP_CHANNEL6_DIMM1 
PECI_TEMP_CHANNEL7_DIMM0 
PECI_TEMP_CHANNEL7_DIMM1 
PECI_POWER_TOTAL_DIMM 
PECI_PWR_CPU 
PECI_MAX 

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:

◆ pal_cal_cpu_power()

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

◆ pal_get_cpu_energy()

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

◆ pal_get_cpu_time()

bool pal_get_cpu_time ( uint8_t  addr,
uint8_t  cmd,
uint8_t  readlen,
uint32_t *  run_time 
)

◆ pal_get_power_sku_unit()

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