summaryrefslogtreecommitdiff
path: root/src/soc/intel/denverton_ns/tsc_freq.c
blob: ead10ee12bcdb22f0d9354a354b9917a6dd9ffd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is part of the coreboot project. */

#include <cpu/x86/msr.h>
#include <cpu/x86/tsc.h>

#include <soc/cpu.h>
#include <soc/msr.h>

unsigned long tsc_freq_mhz(void)
{
	msr_t platform_info;

	platform_info = rdmsr(MSR_PLATFORM_INFO);
	return CPU_BCLK * ((platform_info.lo >> 8) & 0xff);
}