repo.or.cz
/
coreboot.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
soc/intel/common/block/chip: Refactor chip_get_common_soc_structure()
[coreboot.git]
/
src
/
soc
/
intel
/
broadwell
/
tsc_freq.c
blob
4a8a34349f8244dd247e0289be87eb6fb9c00eac
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <cpu/x86/msr.h>
4
#include <cpu/x86/tsc.h>
5
#include <soc/cpu.h>
6
#include <soc/msr.h>
7
8
unsigned long
tsc_freq_mhz
(
void
)
9
{
10
msr_t platform_info
;
11
12
platform_info
=
rdmsr
(
MSR_PLATFORM_INFO
);
13
return
CPU_BCLK
* ((
platform_info
.
lo
>>
8
) &
0xff
);
14
}