OpenBIC
OpenSource Bridge-IC
plat_user_setting.h File Reference
#include "sensor.h"
#include "plat_pldm_sensor.h"
#include "plat_cpld.h"
Include dependency graph for plat_user_setting.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  temp_mapping_sensor
 
struct  temp_threshold_mapping_sensor
 
struct  thermaltrip_user_settings_struct
 
struct  temp_threshold_user_settings_struct
 

Macros

#define VR_MUTEX_LOCK_TIMEOUT_MS   1000
 
#define TEMP_THRESHOLD_USER_SETTINGS_OFFSET   0x8100
 
#define VR_VOUT_USER_SETTINGS_OFFSET   0x8000
 
#define ALERT_LEVEL_USER_SETTINGS_OFFSET   0x8200
 
#define DELAY_PCIE_PERST_USER_SETTINGS_OFFSET   0x8300
 
#define BOOTSTRAP_USER_SETTINGS_OFFSET   0x8400
 
#define THERMALTRIP_USER_SETTINGS_OFFSET   0x8500
 
#define THROTTLE_USER_SETTINGS_OFFSET   0x8600
 
#define DELAY_ASIC_RST_USER_SETTINGS_OFFSET   0x8700
 
#define DELAY_MODULE_PG_USER_SETTINGS_OFFSET   0x8800
 
#define CPLD_THROTTLE_SWITCH_ADDR   0x25
 
#define CPLD_THERMALTRIP_SWITCH_ADDR   0x3A
 

Typedefs

typedef struct temp_mapping_sensor temp_mapping_sensor
 
typedef struct temp_threshold_mapping_sensor temp_threshold_mapping_sensor
 
typedef struct thermaltrip_user_settings_struct thermaltrip_user_settings_struct
 
typedef struct temp_threshold_user_settings_struct temp_threshold_user_settings_struct
 

Enumerations

enum  USER_SETTING_OFFSET_E { THERMALTRIP }
 
enum  PLAT_TEMP_INDEX_E {
  TEMP_INDEX_ON_DIE_ATH_0_N_OWL , TEMP_INDEX_ON_DIE_ATH_1_S_OWL , TEMP_INDEX_TOP_INLET , TEMP_INDEX_TOP_OUTLET ,
  TEMP_INDEX_BOT_INLET , TEMP_INDEX_BOT_OUTLET , TEMP_INDEX_MAX , TEMP_INDEX_TOP_INLET ,
  TEMP_INDEX_BOT_INLET , TEMP_INDEX_BOT_OUTLET , TEMP_INDEX_ASIC_MEDHA0_SENSOR0 , TEMP_INDEX_ASIC_MEDHA0_SENSOR1 ,
  TEMP_INDEX_ASIC_OWL_W , TEMP_INDEX_ASIC_OWL_E , TEMP_INDEX_ASIC_MEDHA1_SENSOR0 , TEMP_INDEX_ASIC_MEDHA1_SENSOR1 ,
  TEMP_INDEX_ASIC_HAMSA_CRM , TEMP_INDEX_ASIC_HAMSA_LS , TEMP_INDEX_MAX , TEMP_INDEX_THERMAL_SENSOR_1_TEMP_C ,
  TEMP_INDEX_THERMAL_SENSOR_2_TEMP_C , TEMP_INDEX_MAX
}
 
enum  PLAT_TEMP_INDEX_THRESHOLD_TYPE_E {
  DIE_ATH_0_N_OWL_REMOTE_1_HIGH_LIMIT , DIE_ATH_0_N_OWL_REMOTE_1_LOW_LIMIT , DIE_ATH_1_S_OWL_REMOTE_1_HIGH_LIMIT , DIE_ATH_1_S_OWL_REMOTE_1_LOW_LIMIT ,
  DIE_ATH_0_N_OWL_REMOTE_2_HIGH_LIMIT , DIE_ATH_0_N_OWL_REMOTE_2_LOW_LIMIT , DIE_ATH_1_S_OWL_REMOTE_2_HIGH_LIMIT , DIE_ATH_1_S_OWL_REMOTE_2_LOW_LIMIT ,
  TOP_INLET_LOW_LIMIT , TOP_INLET_HIGH_LIMIT , TOP_OUTLET_LOW_LIMIT , TOP_OUTLET_HIGH_LIMIT ,
  BOT_INLET_LOW_LIMIT , BOT_INLET_HIGH_LIMIT , BOT_OUTLET_LOW_LIMIT , BOT_OUTLET_HIGH_LIMIT ,
  PLAT_TEMP_INDEX_THRESHOLD_TYPE_MAX , TOP_INLET_LOW_LIMIT , TOP_INLET_HIGH_LIMIT , BOT_INLET_LOW_LIMIT ,
  BOT_INLET_HIGH_LIMIT , BOT_OUTLET_LOW_LIMIT , BOT_OUTLET_HIGH_LIMIT , ASIC_MEDHA0_SENSOR0_LOW_LIMIT ,
  ASIC_MEDHA0_SENSOR0_HIGH_LIMIT , ASIC_MEDHA0_SENSOR1_LOW_LIMIT , ASIC_MEDHA0_SENSOR1_HIGH_LIMIT , ASIC_OWL_W_LOW_LIMIT ,
  ASIC_OWL_W_HIGH_LIMIT , ASIC_OWL_E_LOW_LIMIT , ASIC_OWL_E_HIGH_LIMIT , ASIC_MEDHA1_SENSOR0_LOW_LIMIT ,
  ASIC_MEDHA1_SENSOR0_HIGH_LIMIT , ASIC_MEDHA1_SENSOR1_LOW_LIMIT , ASIC_MEDHA1_SENSOR1_HIGH_LIMIT , ASIC_HAMSA_CRM_LOW_LIMIT ,
  ASIC_HAMSA_CRM_HIGH_LIMIT , ASIC_HAMSA_LS_LOW_LIMIT , ASIC_HAMSA_LS_HIGH_LIMIT , PLAT_TEMP_INDEX_THRESHOLD_TYPE_MAX
}
 

Functions

bool set_thermaltrip_user_settings (bool thermaltrip_enable, bool is_perm)
 
bool get_temp_sensor_rail_name (uint8_t rail, uint8_t **name)
 
bool get_temp_sensor_rail_enum (uint8_t *name, uint8_t *num)
 
bool plat_get_temp_status (uint8_t rail, uint8_t *temp_status)
 
bool get_temp_threshold_type_enum (uint8_t *name, uint8_t *num)
 
bool get_temp_index_threshold_type_name (uint8_t type, uint8_t **name)
 
bool get_plat_temp_threshold (uint8_t temp_index_threshold_type, int32_t *millidegree_celsius)
 
bool set_plat_temp_threshold (uint8_t temp_index_threshold_type, uint32_t *millidegree_celsius, bool is_default, bool is_perm)
 
bool plat_clear_temp_status (uint8_t rail)
 
void user_settings_init (void)
 
bool temp_threshold_user_settings_init (void)
 
bool temp_threshold_default_settings_init (void)
 
void set_uart_power_event_is_enable (bool is_enable)
 
int power_level_send_event (bool is_assert, int ubc1_current, int ubc2_current)
 
void set_alert_level_to_default_or_user_setting (bool is_default, int32_t user_setting)
 
int set_user_settings_alert_level_to_eeprom (void *user_settings, uint8_t data_length)
 
int get_alert_level_info (bool *is_assert, int32_t *default_value, int32_t *setting_value)
 
int get_user_settings_alert_level_from_eeprom (void *user_settings, uint8_t data_length)
 
bool get_user_settings_delay_pcie_perst_from_eeprom (void *user_settings, uint8_t data_length)
 
bool get_user_settings_delay_asic_rst_from_eeprom (void *user_settings, uint8_t data_length)
 
bool get_user_settings_delay_module_pg_from_eeprom (void *user_settings, uint8_t data_length)
 
bool get_user_settings_thermaltrip_from_eeprom (void *user_settings, uint8_t data_length)
 
bool get_user_settings_throttle_from_eeprom (void *user_settings, uint8_t data_length)
 
bool perm_config_clear ()
 
bool get_average_power (uint8_t rail, uint32_t *milliwatt)
 
bool post_vr_read (sensor_cfg *cfg, void *args, int *const reading)
 
bool ubc_vr_rail_name_get (uint8_t rail, uint8_t **name)
 
bool ubc_vr_rail_enum_get (uint8_t *name, uint8_t *num)
 
void pwr_level_mutex_init (void)
 
bool set_user_settings_delay_pcie_perst_to_eeprom (void *user_settings, uint8_t data_length, uint8_t user_settings_offset)
 
bool set_user_settings_delay_asic_rst_to_eeprom (void *user_settings, uint8_t data_length)
 
bool set_user_settings_delay_module_pg_to_eeprom (void *user_settings, uint8_t data_length)
 

Variables

temp_mapping_sensor temp_index_table [TEMP_INDEX_MAX]
 
temp_threshold_user_settings_struct temp_threshold_user_settings
 

Macro Definition Documentation

◆ ALERT_LEVEL_USER_SETTINGS_OFFSET

#define ALERT_LEVEL_USER_SETTINGS_OFFSET   0x8200

◆ BOOTSTRAP_USER_SETTINGS_OFFSET

#define BOOTSTRAP_USER_SETTINGS_OFFSET   0x8400

◆ CPLD_THERMALTRIP_SWITCH_ADDR

#define CPLD_THERMALTRIP_SWITCH_ADDR   0x3A

◆ CPLD_THROTTLE_SWITCH_ADDR

#define CPLD_THROTTLE_SWITCH_ADDR   0x25

◆ DELAY_ASIC_RST_USER_SETTINGS_OFFSET

#define DELAY_ASIC_RST_USER_SETTINGS_OFFSET   0x8700

◆ DELAY_MODULE_PG_USER_SETTINGS_OFFSET

#define DELAY_MODULE_PG_USER_SETTINGS_OFFSET   0x8800

◆ DELAY_PCIE_PERST_USER_SETTINGS_OFFSET

#define DELAY_PCIE_PERST_USER_SETTINGS_OFFSET   0x8300

◆ TEMP_THRESHOLD_USER_SETTINGS_OFFSET

#define TEMP_THRESHOLD_USER_SETTINGS_OFFSET   0x8100

◆ THERMALTRIP_USER_SETTINGS_OFFSET

#define THERMALTRIP_USER_SETTINGS_OFFSET   0x8500

◆ THROTTLE_USER_SETTINGS_OFFSET

#define THROTTLE_USER_SETTINGS_OFFSET   0x8600

◆ VR_MUTEX_LOCK_TIMEOUT_MS

#define VR_MUTEX_LOCK_TIMEOUT_MS   1000

◆ VR_VOUT_USER_SETTINGS_OFFSET

#define VR_VOUT_USER_SETTINGS_OFFSET   0x8000

Typedef Documentation

◆ temp_mapping_sensor

◆ temp_threshold_mapping_sensor

◆ temp_threshold_user_settings_struct

◆ thermaltrip_user_settings_struct

Enumeration Type Documentation

◆ PLAT_TEMP_INDEX_E

Enumerator
TEMP_INDEX_ON_DIE_ATH_0_N_OWL 
TEMP_INDEX_ON_DIE_ATH_1_S_OWL 
TEMP_INDEX_TOP_INLET 
TEMP_INDEX_TOP_OUTLET 
TEMP_INDEX_BOT_INLET 
TEMP_INDEX_BOT_OUTLET 
TEMP_INDEX_MAX 
TEMP_INDEX_TOP_INLET 
TEMP_INDEX_BOT_INLET 
TEMP_INDEX_BOT_OUTLET 
TEMP_INDEX_ASIC_MEDHA0_SENSOR0 
TEMP_INDEX_ASIC_MEDHA0_SENSOR1 
TEMP_INDEX_ASIC_OWL_W 
TEMP_INDEX_ASIC_OWL_E 
TEMP_INDEX_ASIC_MEDHA1_SENSOR0 
TEMP_INDEX_ASIC_MEDHA1_SENSOR1 
TEMP_INDEX_ASIC_HAMSA_CRM 
TEMP_INDEX_ASIC_HAMSA_LS 
TEMP_INDEX_MAX 
TEMP_INDEX_THERMAL_SENSOR_1_TEMP_C 
TEMP_INDEX_THERMAL_SENSOR_2_TEMP_C 
TEMP_INDEX_MAX 

◆ PLAT_TEMP_INDEX_THRESHOLD_TYPE_E

Enumerator
DIE_ATH_0_N_OWL_REMOTE_1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MP_INDEX_THRESHOLD_TYPE_MAX 

◆ USER_SETTING_OFFSET_E

Enumerator
THERMALTRIP 

Function Documentation

◆ get_alert_level_info()

int get_alert_level_info ( bool *  is_assert,
int32_t *  default_value,
int32_t *  setting_value 
)

◆ get_average_power()

bool get_average_power ( uint8_t  rail,
uint32_t *  milliwatt 
)

◆ get_plat_temp_threshold()

bool get_plat_temp_threshold ( uint8_t  temp_index_threshold_type,
int32_t *  millidegree_celsius 
)
Here is the call graph for this function:

◆ get_temp_index_threshold_type_name()

bool get_temp_index_threshold_type_name ( uint8_t  type,
uint8_t **  name 
)

◆ get_temp_sensor_rail_enum()

bool get_temp_sensor_rail_enum ( uint8_t *  name,
uint8_t *  num 
)

◆ get_temp_sensor_rail_name()

bool get_temp_sensor_rail_name ( uint8_t  rail,
uint8_t **  name 
)

◆ get_temp_threshold_type_enum()

bool get_temp_threshold_type_enum ( uint8_t *  name,
uint8_t *  num 
)

◆ get_user_settings_alert_level_from_eeprom()

int get_user_settings_alert_level_from_eeprom ( void *  user_settings,
uint8_t  data_length 
)
Here is the call graph for this function:

◆ get_user_settings_delay_asic_rst_from_eeprom()

bool get_user_settings_delay_asic_rst_from_eeprom ( void *  user_settings,
uint8_t  data_length 
)
Here is the call graph for this function:

◆ get_user_settings_delay_module_pg_from_eeprom()

bool get_user_settings_delay_module_pg_from_eeprom ( void *  user_settings,
uint8_t  data_length 
)
Here is the call graph for this function:

◆ get_user_settings_delay_pcie_perst_from_eeprom()

bool get_user_settings_delay_pcie_perst_from_eeprom ( void *  user_settings,
uint8_t  data_length 
)
Here is the call graph for this function:

◆ get_user_settings_thermaltrip_from_eeprom()

bool get_user_settings_thermaltrip_from_eeprom ( void *  user_settings,
uint8_t  data_length 
)
Here is the call graph for this function:

◆ get_user_settings_throttle_from_eeprom()

bool get_user_settings_throttle_from_eeprom ( void *  user_settings,
uint8_t  data_length 
)
Here is the call graph for this function:

◆ perm_config_clear()

bool perm_config_clear ( )
Here is the call graph for this function:

◆ plat_clear_temp_status()

bool plat_clear_temp_status ( uint8_t  rail)
Here is the call graph for this function:

◆ plat_get_temp_status()

bool plat_get_temp_status ( uint8_t  rail,
uint8_t *  temp_status 
)
Here is the call graph for this function:

◆ post_vr_read()

bool post_vr_read ( sensor_cfg cfg,
void *  args,
int *const  reading 
)

◆ power_level_send_event()

int power_level_send_event ( bool  is_assert,
int  ubc1_current,
int  ubc2_current 
)

◆ pwr_level_mutex_init()

void pwr_level_mutex_init ( void  )

◆ set_alert_level_to_default_or_user_setting()

void set_alert_level_to_default_or_user_setting ( bool  is_default,
int32_t  user_setting 
)

◆ set_plat_temp_threshold()

bool set_plat_temp_threshold ( uint8_t  temp_index_threshold_type,
uint32_t *  millidegree_celsius,
bool  is_default,
bool  is_perm 
)
Here is the call graph for this function:

◆ set_thermaltrip_user_settings()

bool set_thermaltrip_user_settings ( bool  thermaltrip_enable,
bool  is_perm 
)
Here is the call graph for this function:

◆ set_uart_power_event_is_enable()

void set_uart_power_event_is_enable ( bool  is_enable)

◆ set_user_settings_alert_level_to_eeprom()

int set_user_settings_alert_level_to_eeprom ( void *  user_settings,
uint8_t  data_length 
)
Here is the call graph for this function:

◆ set_user_settings_delay_asic_rst_to_eeprom()

bool set_user_settings_delay_asic_rst_to_eeprom ( void *  user_settings,
uint8_t  data_length 
)
Here is the call graph for this function:

◆ set_user_settings_delay_module_pg_to_eeprom()

bool set_user_settings_delay_module_pg_to_eeprom ( void *  user_settings,
uint8_t  data_length 
)
Here is the call graph for this function:

◆ set_user_settings_delay_pcie_perst_to_eeprom()

bool set_user_settings_delay_pcie_perst_to_eeprom ( void *  user_settings,
uint8_t  data_length,
uint8_t  user_settings_offset 
)
Here is the call graph for this function:

◆ temp_threshold_default_settings_init()

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

◆ temp_threshold_user_settings_init()

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

◆ ubc_vr_rail_enum_get()

bool ubc_vr_rail_enum_get ( uint8_t *  name,
uint8_t *  num 
)

◆ ubc_vr_rail_name_get()

bool ubc_vr_rail_name_get ( uint8_t  rail,
uint8_t **  name 
)

◆ user_settings_init()

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

Variable Documentation

◆ temp_index_table

temp_mapping_sensor temp_index_table[TEMP_INDEX_MAX]
extern

◆ temp_threshold_user_settings

temp_threshold_user_settings_struct temp_threshold_user_settings
extern