From bcaa7c2bdbb3affd0e645c76505aaa3458588f4e Mon Sep 17 00:00:00 2001 From: Mykola Kvach Date: Thu, 9 Nov 2023 13:14:23 +0200 Subject: [PATCH] boards: arm64: xenvm: read real frequency Read real frequncy from ARM Arch Timer instead of using define 'CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC' which can be incorrect for some run cases. If we run xenvm under qemu we get one frequency, but we can run this build as a DomU for Xen under different real platforms and thus with differenty arch timer frequencies. So, we need to read frequency from the timer registers. Signed-off-by: Mykola Kvach --- boards/arm64/xenvm/xenvm_defconfig | 2 ++ boards/arm64/xenvm/xenvm_gicv3_defconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/boards/arm64/xenvm/xenvm_defconfig b/boards/arm64/xenvm/xenvm_defconfig index ff8597199e7..39e8a20767c 100644 --- a/boards/arm64/xenvm/xenvm_defconfig +++ b/boards/arm64/xenvm/xenvm_defconfig @@ -16,3 +16,5 @@ CONFIG_LOG=y CONFIG_LOG_MODE_MINIMAL=n CONFIG_USERSPACE=n + +CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME=y diff --git a/boards/arm64/xenvm/xenvm_gicv3_defconfig b/boards/arm64/xenvm/xenvm_gicv3_defconfig index 59a0c306cb7..7b6b9afa888 100644 --- a/boards/arm64/xenvm/xenvm_gicv3_defconfig +++ b/boards/arm64/xenvm/xenvm_gicv3_defconfig @@ -15,3 +15,5 @@ CONFIG_LOG=y CONFIG_LOG_MODE_MINIMAL=n CONFIG_USERSPACE=n + +CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME=y