OpenBIC
OpenSource Bridge-IC
plat_cpu.c File Reference
#include "plat_cpu.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include <drivers/peci.h>
#include "intel_peci.h"
#include "ipmi.h"
#include "libipmi.h"
#include "libutil.h"
#include "hal_peci.h"
#include <logging/log.h>
#include <plat_sensor_table.h>
#include "power_status.h"
#include "hal_vw_gpio.h"
#include "fru.h"
#include "plat_fru.h"
#include "eeprom.h"
#include "hal_gpio.h"
#include "plat_gpio.h"
Include dependency graph for plat_cpu.c:

Macros

#define DAM_PIN_DISABLE   0
 
#define DAM_PIN_ENABLE   1
 

Functions

 LOG_MODULE_REGISTER (plat_cpu)
 
 K_THREAD_STACK_DEFINE (monitor_cpu_stack, MONITOR_CPU_STACK_SIZE)
 
 K_THREAD_STACK_DEFINE (monitor_smiout_stack, MONITOR_SMIOUT_STACK_SIZE)
 
void start_monitor_cpu_thread ()
 
void monitor_cpu_handler ()
 
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)
 
void start_monitor_smi_thread ()
 
void monitor_smiout_handler ()
 
int pal_get_set_dam_status (uint8_t options, uint8_t *status)
 
void set_dam_pin ()
 
void OEM_1S_RECORD_DAM_PIN_STATUS (uint8_t gpio_num, uint8_t status)
 

Variables

struct k_thread monitor_cpu_thread
 
k_tid_t monitor_cpu_tid
 
struct k_thread monitor_smiout_thread
 
k_tid_t monitor_smiout_tid
 

Macro Definition Documentation

◆ DAM_PIN_DISABLE

#define DAM_PIN_DISABLE   0

◆ DAM_PIN_ENABLE

#define DAM_PIN_ENABLE   1

Function Documentation

◆ K_THREAD_STACK_DEFINE() [1/2]

K_THREAD_STACK_DEFINE ( monitor_cpu_stack  ,
MONITOR_CPU_STACK_SIZE   
)

◆ K_THREAD_STACK_DEFINE() [2/2]

K_THREAD_STACK_DEFINE ( monitor_smiout_stack  ,
MONITOR_SMIOUT_STACK_SIZE   
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_cpu  )

◆ monitor_cpu_handler()

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

◆ monitor_smiout_handler()

void monitor_smiout_handler ( )

◆ OEM_1S_RECORD_DAM_PIN_STATUS()

void OEM_1S_RECORD_DAM_PIN_STATUS ( uint8_t  gpio_num,
uint8_t  status 
)
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_set_dam_status()

int pal_get_set_dam_status ( uint8_t  options,
uint8_t *  status 
)
Here is the call graph for this function:

◆ set_dam_pin()

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

◆ start_monitor_cpu_thread()

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

◆ start_monitor_smi_thread()

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

Variable Documentation

◆ monitor_cpu_thread

struct k_thread monitor_cpu_thread

◆ monitor_cpu_tid

k_tid_t monitor_cpu_tid

◆ monitor_smiout_thread

struct k_thread monitor_smiout_thread

◆ monitor_smiout_tid

k_tid_t monitor_smiout_tid