|
OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>#include <string.h>#include "libutil.h"#include <logging/log.h>#include "plat_hook.h"#include "pmbus.h"#include "plat_gpio.h"#include "plat_pldm_sensor.h"#include "plat_cpld.h"#include "plat_i2c.h"#include "plat_fru.h"#include "plat_user_setting.h"#include "sensor.h"#include "tmp75.h"#include "tmp431.h"#include "plat_class.h"#include "shell_plat_average_power.h"#include "shell_plat_throttle_switch.h"#include "pldm_monitor.h"#include "pldm_sensor.h"
Macros | |
| #define | EEPROM_MAX_WRITE_TIME 5 |
| #define | TMP75_ALERT_CPLD_OFFSET 0x2F |
Variables | |
| int32_t | alert_level_mA_default = 180000 |
| int32_t | alert_level_mA_user_setting = 180000 |
| bool | alert_level_is_assert = false |
| thermaltrip_user_settings_struct | thermaltrip_user_settings = { 0xFF } |
| temp_mapping_sensor | temp_index_table [] |
| temp_threshold_mapping_sensor | temp_index_threshold_type_table [] |
| temp_threshold_user_settings_struct | temp_threshold_user_settings = { 0 } |
| struct temp_threshold_user_settings_struct | temp_threshold_default_settings = { 0 } |
| ubc_vr_power_mapping_sensor | ubc_vr_power_table [] |
| #define EEPROM_MAX_WRITE_TIME 5 |
| #define TMP75_ALERT_CPLD_OFFSET 0x2F |
| int get_alert_level_info | ( | bool * | is_assert, |
| int32_t * | default_value, | ||
| int32_t * | setting_value | ||
| ) |
| bool get_average_power | ( | uint8_t | rail, |
| uint32_t * | milliwatt | ||
| ) |
| bool get_plat_temp_threshold | ( | uint8_t | temp_index_threshold_type, |
| int32_t * | millidegree_celsius | ||
| ) |

| bool get_temp_index_threshold_type_name | ( | uint8_t | type, |
| uint8_t ** | name | ||
| ) |
| bool get_temp_sensor_rail_enum | ( | uint8_t * | name, |
| uint8_t * | num | ||
| ) |
| bool get_temp_sensor_rail_name | ( | uint8_t | rail, |
| uint8_t ** | name | ||
| ) |
| bool get_temp_threshold_type_enum | ( | uint8_t * | name, |
| uint8_t * | num | ||
| ) |
| int get_user_settings_alert_level_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_delay_pcie_perst_from_eeprom | ( | void * | user_settings, |
| uint8_t | data_length | ||
| ) |

| bool get_user_settings_thermaltrip_from_eeprom | ( | void * | thermaltrip_user_settings, |
| uint8_t | data_length | ||
| ) |

| bool get_user_settings_throttle_from_eeprom | ( | void * | user_settings, |
| uint8_t | data_length | ||
| ) |

| LOG_MODULE_REGISTER | ( | plat_user_setting | ) |
| bool perm_config_clear | ( | void | ) |

| bool plat_clear_temp_status | ( | uint8_t | rail | ) |

| bool plat_get_temp_status | ( | uint8_t | rail, |
| uint8_t * | temp_status | ||
| ) |

| bool plat_get_temp_threshold | ( | uint8_t | temp_index_threshold_type, |
| uint32_t * | millidegree_celsius | ||
| ) |

| bool plat_set_temp_threshold | ( | uint8_t | temp_index_threshold_type, |
| uint32_t * | millidegree_celsius, | ||
| bool | is_default, | ||
| bool | is_perm | ||
| ) |

| bool post_ubc_read | ( | sensor_cfg * | cfg, |
| void * | args, | ||
| int * | reading | ||
| ) |

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

| int power_level_send_event | ( | bool | is_assert, |
| int | ubc1_current, | ||
| int | ubc2_current | ||
| ) |
| void pwr_level_mutex_init | ( | void | ) |
| void set_alert_level_to_default_or_user_setting | ( | bool | is_default, |
| int32_t | user_setting | ||
| ) |
| bool set_plat_temp_threshold | ( | uint8_t | temp_index_threshold_type, |
| uint32_t * | millidegree_celsius, | ||
| bool | is_default, | ||
| bool | is_perm | ||
| ) |

| bool set_temp_threshold_user_settings | ( | void * | temp_threshold_user_settings | ) |

| bool set_thermaltrip_user_settings | ( | bool | thermaltrip_enable, |
| bool | is_perm | ||
| ) |

| void set_uart_power_event_is_enable | ( | bool | is_enable | ) |
| int set_user_settings_alert_level_to_eeprom | ( | void * | user_settings, |
| uint8_t | data_length | ||
| ) |

| 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 | ||
| ) |

| 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_thermaltrip_to_eeprom | ( | void * | thermaltrip_user_settings, |
| uint8_t | data_length | ||
| ) |

| bool temp_threshold_default_settings_init | ( | void | ) |

| bool temp_threshold_user_settings_init | ( | void | ) |

| bool ubc_vr_rail_enum_get | ( | uint8_t * | name, |
| uint8_t * | num | ||
| ) |
| bool ubc_vr_rail_name_get | ( | uint8_t | rail, |
| uint8_t ** | name | ||
| ) |
| void user_settings_init | ( | void | ) |

| bool alert_level_is_assert = false |
| int32_t alert_level_mA_default = 180000 |
| int32_t alert_level_mA_user_setting = 180000 |
| temp_mapping_sensor temp_index_table[] |
| temp_threshold_mapping_sensor temp_index_threshold_type_table[] |
| struct temp_threshold_user_settings_struct temp_threshold_default_settings = { 0 } |
| temp_threshold_user_settings_struct temp_threshold_user_settings = { 0 } |
| thermaltrip_user_settings_struct thermaltrip_user_settings = { 0xFF } |
| ubc_vr_power_mapping_sensor ubc_vr_power_table[] |