f94ac9ad7d
Done with sed and God Lines. Only done for C-like code for now. Change-Id: I8995372760543e9cf2c845019f7a063046c55e9c Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40211 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
16 lines
363 B
C
16 lines
363 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* This file is part of the coreboot project. */
|
|
|
|
#include <stdint.h>
|
|
#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);
|
|
}
|