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 bus_freq_khz (void)
 
unsigned long tsc_freq_mhz (void)
 
void set_max_freq (void)
 

Function Documentation

◆ bus_freq_khz()

unsigned int bus_freq_khz ( void  )

Definition at line 7 of file tsc_freq.c.

References 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 36 of file tsc_freq.c.

References msr_struct::hi, IA32_MISC_ENABLE, IA32_PERF_CTL, msr_struct::lo, MSR_IACORE_RATIOS, MSR_IACORE_VIDS, rdmsr(), and wrmsr().

Here is the call graph for this function:

◆ tsc_freq_mhz()

unsigned long tsc_freq_mhz ( void  )

Definition at line 24 of file tsc_freq.c.

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

Here is the call graph for this function: