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

Go to the source code of this file.

Macros

#define CPU_MODEL_INTEL_ATOM_DENVERTON   0x5F
 

Functions

static int get_processor_model (void)
 
static unsigned long get_hardcoded_crystal_freq (void)
 
static unsigned long calculate_tsc_freq_from_core_crystal (void)
 
static unsigned long get_freq_from_cpuid16h (void)
 
unsigned long tsc_freq_mhz (void)
 

Macro Definition Documentation

◆ CPU_MODEL_INTEL_ATOM_DENVERTON

#define CPU_MODEL_INTEL_ATOM_DENVERTON   0x5F

Definition at line 9 of file timer.c.

Function Documentation

◆ calculate_tsc_freq_from_core_crystal()

static unsigned long calculate_tsc_freq_from_core_crystal ( void  )
static

Definition at line 52 of file timer.c.

References cpuid, cpuid_get_max_func(), cpuid_result::eax, cpuid_result::ebx, cpuid_result::ecx, and get_hardcoded_crystal_freq().

Referenced by tsc_freq_mhz().

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

◆ get_freq_from_cpuid16h()

static unsigned long get_freq_from_cpuid16h ( void  )
static

Definition at line 86 of file timer.c.

References cpuid_eax(), and cpuid_get_max_func().

Referenced by tsc_freq_mhz().

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

◆ get_hardcoded_crystal_freq()

static unsigned long get_hardcoded_crystal_freq ( void  )
static

Definition at line 20 of file timer.c.

References CPU_MODEL_INTEL_ATOM_DENVERTON, and get_processor_model().

Referenced by calculate_tsc_freq_from_core_crystal().

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

◆ get_processor_model()

static int get_processor_model ( void  )
static

Definition at line 11 of file timer.c.

References c, cpuid_eax(), and get_fms().

Referenced by get_hardcoded_crystal_freq().

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 94 of file timer.c.

References calculate_tsc_freq_from_core_crystal(), and get_freq_from_cpuid16h().

Here is the call graph for this function: