Jonathan Zhang | 3ed903f | 2023-01-25 11:37:27 -0800 | [diff] [blame] | 1 | /* 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 | |
| 10 | unsigned int smbios_cpu_get_voltage(void) |
| 11 | { |
| 12 | return 16; /* Per SMBIOS spec, voltage times 10 */ |
| 13 | } |
| 14 | |
| 15 | unsigned 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 | } |