blob: 6ac3efe252d8abe57ff2a77132141ed26d6f280a [file] [log] [blame]
Jonathan Zhang3ed903f2023-01-25 11:37:27 -08001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <cpu/x86/smm.h>
4#include <drivers/ocp/include/vpd.h>
5#include <soc/ramstage.h>
6#include <soc/soc_util.h>
7#include <soc/util.h>
8#include <soc/msr.h>
9
10unsigned int smbios_cpu_get_voltage(void)
11{
12 return 16; /* Per SMBIOS spec, voltage times 10 */
13}
14
15unsigned int smbios_cpu_get_current_speed_mhz(void)
16{
17 msr_t msr;
18 msr = rdmsr(MSR_PLATFORM_INFO);
19 return ((msr.lo >> 8) & 0xff) * CONFIG_CPU_BCLK_MHZ;
20}
21
22__weak void mainboard_override_fsp_gpio(void)
23{
24 /* Default weak implementation */
25}
26
27__weak void mainboard_override_usb_oc(void)
28{
29 /* Default weak implementation */
30}