coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
tsc_freq.c File Reference
#include <cpu/x86/msr.h>
#include <cpu/x86/tsc.h>
#include <soc/msr.h>
Include dependency graph for tsc_freq.c:

Go to the source code of this file.

Functions

unsigned int cpu_bus_freq_khz (void)
 
unsigned long tsc_freq_mhz (void)
 
void set_max_freq (void)
 

Variables

static const unsigned int cpu_bus_clk_freq_table []
 

Function Documentation

◆ cpu_bus_freq_khz()

unsigned int cpu_bus_freq_khz ( void  )

Definition at line 19 of file tsc_freq.c.

References ARRAY_SIZE, cpu_bus_clk_freq_table, msr_struct::lo, MSR_BSEL_CR_OVERCLOCK_CONTROL, and rdmsr().

Referenced by fill_in_pattrs(), and tsc_freq_mhz().

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

◆ set_max_freq()

void set_max_freq ( void  )

Definition at line 41 of file tsc_freq.c.

References BIOS_DEBUG, CPU_BCLK, msr_struct::hi, IA32_MISC_ENABLE, IA32_PERF_CTL, msr_struct::lo, MSR_CONFIG_TDP_NOMINAL, MSR_IACORE_TURBO_RATIOS, MSR_IACORE_TURBO_VIDS, MSR_PLATFORM_INFO, printk, rdmsr(), and wrmsr().

Referenced by bootblock_soc_init(), and soc_init_pre_device().

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

◆ tsc_freq_mhz()

unsigned long tsc_freq_mhz ( void  )

Definition at line 29 of file tsc_freq.c.

References cpu_bus_freq_khz(), msr_struct::lo, MSR_PLATFORM_INFO, and rdmsr().

Here is the call graph for this function:

Variable Documentation

◆ cpu_bus_clk_freq_table

const unsigned int cpu_bus_clk_freq_table[]
static
Initial value:
= {
83333,
100000,
133333,
116666,
80000,
93333,
90000,
88900,
87500
}

Definition at line 7 of file tsc_freq.c.

Referenced by cpu_bus_freq_khz().