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

Go to the source code of this file.

Data Structures

struct  tsc_struct
 

Macros

#define TSC_SYNC
 

Typedefs

typedef struct tsc_struct tsc_t
 

Functions

static tsc_t rdtsc (void)
 
static void multiply_to_tsc (tsc_t *const tsc, const u32 a, const u32 b)
 
static uint64_t tsc_to_uint64 (tsc_t tstamp)
 
static unsigned long long rdtscll (void)
 
unsigned long tsc_freq_mhz (void)
 
static int tsc_constant_rate (void)
 

Macro Definition Documentation

◆ TSC_SYNC

#define TSC_SYNC

Definition at line 11 of file tsc.h.

Typedef Documentation

◆ tsc_t

typedef struct tsc_struct tsc_t

Definition at line 1 of file tsc.h.

Function Documentation

◆ multiply_to_tsc()

static void multiply_to_tsc ( tsc_t *const  tsc,
const u32  a,
const u32  b 
)
inlinestatic

Definition at line 34 of file tsc.h.

References tsc_struct::hi, and tsc_struct::lo.

◆ rdtsc()

static tsc_t rdtsc ( void  )
inlinestatic

Definition at line 20 of file tsc.h.

References tsc_struct::hi, tsc_struct::lo, and TSC_SYNC.

Referenced by calibrate_tsc_with_pit(), and rdtscll().

Here is the caller graph for this function:

◆ rdtscll()

static unsigned long long rdtscll ( void  )
inlinestatic

Definition at line 49 of file tsc.h.

References rdtsc(), and tsc_to_uint64().

Referenced by timestamp_get(), and udelay().

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

◆ tsc_constant_rate()

static int tsc_constant_rate ( void  )
inlinestatic

Definition at line 57 of file tsc.h.

References CONFIG.

Referenced by lb_arch_add_records(), and timestamp_tick_freq_mhz().

Here is the caller graph for this function:

◆ tsc_freq_mhz()

◆ tsc_to_uint64()

static uint64_t tsc_to_uint64 ( tsc_t  tstamp)
inlinestatic

Definition at line 44 of file tsc.h.

References tsc_struct::hi, and tsc_struct::lo.

Referenced by rdtscll().

Here is the caller graph for this function: