coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
acpigen_dptf.h File Reference
#include <device/device.h>
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for acpigen_dptf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dptf_active_policy
 
struct  dptf_passive_policy
 
struct  dptf_critical_policy
 
struct  dptf_charger_perf
 
struct  dptf_fan_perf
 
struct  dptf_power_limit_config
 
struct  dptf_power_limits
 

Macros

#define DEFAULT_IF_0(thing, default_)   ((thing) ? (thing) : (default_))
 
#define DPTF_DEVICE_PATH   "\\_SB.DPTF"
 
#define TCPU_SCOPE   "\\_SB.PCI0"
 

Enumerations

enum  dptf_participant {
  DPTF_NONE , DPTF_CPU , DPTF_CHARGER , DPTF_FAN ,
  DPTF_TEMP_SENSOR_0 , DPTF_TEMP_SENSOR_1 , DPTF_TEMP_SENSOR_2 , DPTF_TEMP_SENSOR_3 ,
  DPTF_TEMP_SENSOR_4 , DPTF_TPCH , DPTF_POWER , DPTF_BATTERY ,
  DPTF_PARTICIPANT_COUNT
}
 
enum  {
  DPTF_MAX_ACX = 10 , DPTF_MAX_ACTIVE_POLICIES = (DPTF_PARTICIPANT_COUNT-1) , DPTF_MAX_PASSIVE_POLICIES = (DPTF_PARTICIPANT_COUNT-1) , DPTF_MAX_CRITICAL_POLICIES = (DPTF_PARTICIPANT_COUNT-1) ,
  DPTF_MAX_CHARGER_PERF_STATES = 10 , DPTF_MAX_FAN_PERF_STATES = 10 , DPTF_FIELD_UNUSED = 0xFFFFFFFFull , DPTF_MAX_TSR = 5
}
 
enum  dptf_critical_policy_type { DPTF_CRITICAL_S4 , DPTF_CRITICAL_SHUTDOWN }
 

Functions

void dptf_write_enabled_policies (const struct dptf_active_policy *active_policies, int active_count, const struct dptf_passive_policy *passive_policies, int passive_count, const struct dptf_critical_policy *critical_policies, int critical_count)
 
void dptf_write_active_policies (const struct dptf_active_policy *policies, int max_count)
 
void dptf_write_passive_policies (const struct dptf_passive_policy *policies, int max_count)
 
void dptf_write_critical_policies (const struct dptf_critical_policy *policies, int max_count)
 
void dptf_write_charger_perf (const struct dptf_charger_perf *perf, int max_count)
 
void dptf_write_fan_perf (const struct dptf_fan_perf *perf, int max_count)
 
void dptf_write_power_limits (const struct dptf_power_limits *limits)
 
void dptf_write_STR (const char *str)
 
void dptf_write_fan_options (bool fine_grained, int step_size, bool low_speed_notify)
 
void dptf_write_tsr_hysteresis (uint8_t hysteresis)
 
void dptf_write_scope (enum dptf_participant participant)
 
void dptf_write_STA (void)
 

Macro Definition Documentation

◆ DEFAULT_IF_0

#define DEFAULT_IF_0 (   thing,
  default_ 
)    ((thing) ? (thing) : (default_))

Definition at line 11 of file acpigen_dptf.h.

◆ DPTF_DEVICE_PATH

#define DPTF_DEVICE_PATH   "\\_SB.DPTF"

Definition at line 14 of file acpigen_dptf.h.

◆ TCPU_SCOPE

#define TCPU_SCOPE   "\\_SB.PCI0"

Definition at line 15 of file acpigen_dptf.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DPTF_MAX_ACX 
DPTF_MAX_ACTIVE_POLICIES 
DPTF_MAX_PASSIVE_POLICIES 
DPTF_MAX_CRITICAL_POLICIES 
DPTF_MAX_CHARGER_PERF_STATES 
DPTF_MAX_FAN_PERF_STATES 
DPTF_FIELD_UNUSED 
DPTF_MAX_TSR 

Definition at line 35 of file acpigen_dptf.h.

◆ dptf_critical_policy_type

Enumerator
DPTF_CRITICAL_S4 
DPTF_CRITICAL_SHUTDOWN 

Definition at line 83 of file acpigen_dptf.h.

◆ dptf_participant

Enumerator
DPTF_NONE 
DPTF_CPU 
DPTF_CHARGER 
DPTF_FAN 
DPTF_TEMP_SENSOR_0 
DPTF_TEMP_SENSOR_1 
DPTF_TEMP_SENSOR_2 
DPTF_TEMP_SENSOR_3 
DPTF_TEMP_SENSOR_4 
DPTF_TPCH 
DPTF_POWER 
DPTF_BATTERY 
DPTF_PARTICIPANT_COUNT 

Definition at line 18 of file acpigen_dptf.h.

Function Documentation

◆ dptf_write_active_policies()

void dptf_write_active_policies ( const struct dptf_active_policy policies,
int  max_count 
)

Definition at line 208 of file acpigen_dptf.c.

References write_active_cooling_methods(), and write_active_relationship_table().

Referenced by write_policies().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dptf_write_charger_perf()

void dptf_write_charger_perf ( const struct dptf_charger_perf perf,
int  max_count 
)

Definition at line 316 of file acpigen_dptf.c.

References acpigen_emit_byte(), acpigen_pop_len(), acpigen_write_integer(), acpigen_write_method(), acpigen_write_package(), acpigen_write_string(), DEFAULT_RAW_UNIT, DPTF_CHARGER, dptf_write_scope(), RETURN_OP, and write_zeros().

Referenced by write_controls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dptf_write_critical_policies()

void dptf_write_critical_policies ( const struct dptf_critical_policy policies,
int  max_count 
)

Definition at line 298 of file acpigen_dptf.c.

References acpigen_pop_len(), DPTF_CRITICAL_SHUTDOWN, DPTF_NONE, dptf_write_scope(), to_acpi_temp(), type, and write_simple_return_method().

Referenced by write_policies().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dptf_write_enabled_policies()

void dptf_write_enabled_policies ( const struct dptf_active_policy active_policies,
int  active_count,
const struct dptf_passive_policy passive_policies,
int  passive_count,
const struct dptf_critical_policy critical_policies,
int  critical_count 
)

◆ dptf_write_fan_options()

void dptf_write_fan_options ( bool  fine_grained,
int  step_size,
bool  low_speed_notify 
)

Definition at line 443 of file acpigen_dptf.c.

References acpigen_pop_len(), acpigen_write_integer(), acpigen_write_name(), and acpigen_write_package().

Referenced by write_options().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dptf_write_fan_perf()

void dptf_write_fan_perf ( const struct dptf_fan_perf perf,
int  max_count 
)

Definition at line 355 of file acpigen_dptf.c.

References acpigen_pop_len(), acpigen_write_integer(), acpigen_write_name(), acpigen_write_package(), DEFAULT_TRIP_POINT, DPTF_FAN, dptf_write_scope(), FPS_REVISION, and power.

Referenced by write_controls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dptf_write_passive_policies()

void dptf_write_passive_policies ( const struct dptf_passive_policy policies,
int  max_count 
)

Definition at line 292 of file acpigen_dptf.c.

References write_all_PSV(), and write_thermal_relationship_table().

Referenced by write_policies().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dptf_write_power_limits()

void dptf_write_power_limits ( const struct dptf_power_limits limits)

Definition at line 392 of file acpigen_dptf.c.

References acpigen_pop_len(), acpigen_write_integer(), acpigen_write_method(), acpigen_write_package(), DPTF_CPU, dptf_write_scope(), limits, PPCC_REVISION, RAPL_PL1_INDEX, and RAPL_PL2_INDEX.

Referenced by write_controls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dptf_write_scope()

void dptf_write_scope ( enum dptf_participant  participant)

◆ dptf_write_STA()

void dptf_write_STA ( void  )

◆ dptf_write_STR()

void dptf_write_STR ( const char *  str)

Definition at line 435 of file acpigen_dptf.c.

References acpigen_write_name_string().

Referenced by write_options().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dptf_write_tsr_hysteresis()

void dptf_write_tsr_hysteresis ( uint8_t  hysteresis)

Definition at line 455 of file acpigen_dptf.c.

References acpigen_write_name_integer().

Referenced by write_options().

Here is the call graph for this function:
Here is the caller graph for this function: