coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
tsc_freq.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
cpu/x86/msr.h
>
4
#include <
cpu/x86/tsc.h
>
5
6
#include <soc/cpu.h>
7
#include <soc/msr.h>
8
9
unsigned
long
tsc_freq_mhz
(
void
)
10
{
11
msr_t
platform_info;
12
13
platform_info =
rdmsr
(
MSR_PLATFORM_INFO
);
14
return
CPU_BCLK
* ((platform_info.
lo
>> 8) & 0xff);
15
}
tsc_freq_mhz
unsigned long tsc_freq_mhz(void)
Definition:
tsc_freq.c:14
CPU_BCLK
#define CPU_BCLK
Definition:
haswell.h:35
MSR_PLATFORM_INFO
#define MSR_PLATFORM_INFO
Definition:
fsb.c:16
msr.h
rdmsr
static __always_inline msr_t rdmsr(unsigned int index)
Definition:
msr.h:146
msr_struct
Definition:
msr.h:110
msr_struct::lo
unsigned int lo
Definition:
msr.h:111
tsc.h
src
soc
intel
denverton_ns
tsc_freq.c
Generated by
1.9.1