coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
acpi.c File Reference
#include <console/console.h>
#include <acpi/acpi.h>
#include <acpi/acpigen.h>
#include <arch/cpu.h>
#include <cpu/x86/msr.h>
#include <cpu/intel/speedstep.h>
#include <cpu/intel/turbo.h>
#include <device/device.h>
#include <stdint.h>
#include "model_206ax.h"
#include "chip.h"
Include dependency graph for acpi.c:

Go to the source code of this file.

Functions

static int get_logical_cores_per_package (void)
 
static void generate_C_state_entries (void)
 
static void generate_T_state_entries (int core, int cores_per_package)
 
static int calculate_power (int tdp, int p1_ratio, int ratio)
 
static void generate_P_state_entries (int core, int cores_per_package)
 
void generate_cpu_entries (const struct device *device)
 

Variables

static const acpi_cstate_t cstate_map []
 
static acpi_tstate_t tss_table_fine []
 
static acpi_tstate_t tss_table_coarse []
 
struct chip_operations cpu_intel_model_206ax_ops
 

Function Documentation

◆ calculate_power()

static int calculate_power ( int  tdp,
int  p1_ratio,
int  ratio 
)
static

Definition at line 180 of file acpi.c.

References m, and power.

Referenced by generate_P_state_entries().

Here is the caller graph for this function:

◆ generate_C_state_entries()

◆ generate_cpu_entries()

void generate_cpu_entries ( const struct device device)

Definition at line 307 of file acpi.c.

◆ generate_P_state_entries()

◆ generate_T_state_entries()

static void generate_T_state_entries ( int  core,
int  cores_per_package 
)
static

◆ get_logical_cores_per_package()

static int get_logical_cores_per_package ( void  )
static

Definition at line 92 of file acpi.c.

References msr_struct::lo, MSR_CORE_THREAD_COUNT, and rdmsr().

Here is the call graph for this function:

Variable Documentation

◆ cpu_intel_model_206ax_ops

struct chip_operations cpu_intel_model_206ax_ops
Initial value:
= {
}

Definition at line 307 of file acpi.c.

◆ cstate_map

const acpi_cstate_t cstate_map[]
static

Definition at line 22 of file acpi.c.

Referenced by generate_C_state_entries().

◆ tss_table_coarse

acpi_tstate_t tss_table_coarse[]
static
Initial value:
= {
{ 100, 1000, 0, 0x00, 0 },
{ 88, 875, 0, 0x1f, 0 },
{ 75, 750, 0, 0x1e, 0 },
{ 63, 625, 0, 0x1d, 0 },
{ 50, 500, 0, 0x1c, 0 },
{ 38, 375, 0, 0x1b, 0 },
{ 25, 250, 0, 0x1a, 0 },
{ 13, 125, 0, 0x19, 0 },
}

Definition at line 146 of file acpi.c.

Referenced by generate_T_state_entries().

◆ tss_table_fine

acpi_tstate_t tss_table_fine[]
static
Initial value:
= {
{ 100, 1000, 0, 0x00, 0 },
{ 94, 940, 0, 0x1f, 0 },
{ 88, 880, 0, 0x1e, 0 },
{ 82, 820, 0, 0x1d, 0 },
{ 75, 760, 0, 0x1c, 0 },
{ 69, 700, 0, 0x1b, 0 },
{ 63, 640, 0, 0x1a, 0 },
{ 57, 580, 0, 0x19, 0 },
{ 50, 520, 0, 0x18, 0 },
{ 44, 460, 0, 0x17, 0 },
{ 38, 400, 0, 0x16, 0 },
{ 32, 340, 0, 0x15, 0 },
{ 25, 280, 0, 0x14, 0 },
{ 19, 220, 0, 0x13, 0 },
{ 13, 160, 0, 0x12, 0 },
}

Definition at line 128 of file acpi.c.

Referenced by generate_T_state_entries().