From 973c62c161f9e2130160d9af678074a95bfcbaf5 Mon Sep 17 00:00:00 2001 From: julia Date: Wed, 2 Jul 2025 12:58:25 +1000 Subject: [PATCH] ltimer: enable timer for QEMU Arm arch timers The if statements were not strictly equivalent and broke the camkes timer component builds: https://github.com/seL4/util_libs/pull/196/files#r2178857087 Ref: https://github.com/seL4/sel4test/pull/142 Signed-off-by: julia --- libplatsupport/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libplatsupport/CMakeLists.txt b/libplatsupport/CMakeLists.txt index 96466438d..92e8ab69c 100644 --- a/libplatsupport/CMakeLists.txt +++ b/libplatsupport/CMakeLists.txt @@ -48,9 +48,14 @@ config_choice( mark_as_advanced(CLEAR LibPlatSupportX86ConsoleDevice LibPlatSupportLPTMRclock) # Some platforms don't have a platform timer. -if( - (KernelPlatformQEMUArmVirt AND NOT (KernelArmExportPCNTUser AND KernelArmExportPTMRUser)) - OR KernelPlatformRocketchip +if(KernelPlatformQEMUArmVirt) + if(KernelArmExportPCNTUser AND KernelArmExportPTMRUser) + set(LibPlatSupportHaveTimer ON) + else() + set(LibPlatSupportHaveTimer OFF) + endif() +elseif( + KernelPlatformRocketchip OR KernelPlatformRocketchipZCU102 OR KernelPlatformCheshire OR (SIMULATION AND (KernelArchRiscV OR KernelArchARM))