diff options
Diffstat (limited to 'src/soc/amd/common/block')
-rw-r--r-- | src/soc/amd/common/block/cpu/Kconfig | 2 | ||||
-rw-r--r-- | src/soc/amd/common/block/cpu/noncar/bootblock.c | 6 | ||||
-rw-r--r-- | src/soc/amd/common/block/cpu/tsc/Makefile.inc | 5 | ||||
-rw-r--r-- | src/soc/amd/common/block/cpu/tsc/monotonic_timer.c | 15 |
4 files changed, 1 insertions, 27 deletions
diff --git a/src/soc/amd/common/block/cpu/Kconfig b/src/soc/amd/common/block/cpu/Kconfig index 5a1f86a6fa..f7946c3fa3 100644 --- a/src/soc/amd/common/block/cpu/Kconfig +++ b/src/soc/amd/common/block/cpu/Kconfig @@ -98,9 +98,9 @@ config SOC_AMD_COMMON_BLOCK_SVI3 config SOC_AMD_COMMON_BLOCK_TSC bool - select COLLECT_TIMESTAMPS_NO_TSC # selected use SoC-specific timestamp function select TSC_SYNC_LFENCE select UDELAY_TSC + select TSC_MONOTONIC_TIMER help Select this option to add the common functions for getting the TSC frequency of AMD family 17h, 19h and 1Ah CPUs/APUs and to provide diff --git a/src/soc/amd/common/block/cpu/noncar/bootblock.c b/src/soc/amd/common/block/cpu/noncar/bootblock.c index 13bac18714..9ef899e5ac 100644 --- a/src/soc/amd/common/block/cpu/noncar/bootblock.c +++ b/src/soc/amd/common/block/cpu/noncar/bootblock.c @@ -16,12 +16,6 @@ asmlinkage void bootblock_c_entry(uint64_t base_timestamp) write_resume_eip(); enable_pci_mmconf(); - /* - * base_timestamp is raw tsc value. We need to divide by tsc_freq_mhz - * to get micro-seconds granularity. - */ - base_timestamp /= tsc_freq_mhz(); - if (CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)) boot_with_psp_timestamp(base_timestamp); diff --git a/src/soc/amd/common/block/cpu/tsc/Makefile.inc b/src/soc/amd/common/block/cpu/tsc/Makefile.inc index 67bd6fbaeb..ade49707ca 100644 --- a/src/soc/amd/common/block/cpu/tsc/Makefile.inc +++ b/src/soc/amd/common/block/cpu/tsc/Makefile.inc @@ -23,18 +23,13 @@ smm-$(CONFIG_SOC_AMD_COMMON_BLOCK_CPUFREQ_FAM1AH) += cpufreq_1a.c ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_TSC),y) bootblock-y += tsc_freq.c -bootblock-y += monotonic_timer.c verstage_x86-y += tsc_freq.c -verstage_x86-y += monotonic_timer.c romstage-y += tsc_freq.c -romstage-y += monotonic_timer.c ramstage-y += tsc_freq.c -ramstage-y += monotonic_timer.c smm-y += tsc_freq.c -smm-y += monotonic_timer.c endif # CONFIG_SOC_AMD_COMMON_BLOCK_TSC diff --git a/src/soc/amd/common/block/cpu/tsc/monotonic_timer.c b/src/soc/amd/common/block/cpu/tsc/monotonic_timer.c deleted file mode 100644 index 4cedc3d3a2..0000000000 --- a/src/soc/amd/common/block/cpu/tsc/monotonic_timer.c +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include <cpu/x86/tsc.h> -#include <timer.h> -#include <timestamp.h> - -void timer_monotonic_get(struct mono_time *mt) -{ - mono_time_set_usecs(mt, timestamp_get()); -} - -uint64_t timestamp_get(void) -{ - return rdtscll() / tsc_freq_mhz(); -} |