Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 36 additions & 18 deletions apps/sel4test-driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,6 @@ project(sel4test-driver C)

set(configure_string "")

config_option(Sel4testHaveTimer HAVE_TIMER "Enable tests that require a timer driver" DEFAULT ON)

config_option(Sel4testSimulation SIMULATION "Disable tests not suitable for simulation" DEFAULT OFF)

config_option(
Sel4testHaveCache
HAVE_CACHE
"Enable tests that require a functioning cache"
DEFAULT
ON
)
if(Sel4testAllowSettingsOverride)
mark_as_advanced(CLEAR Sel4testHaveTimer Sel4testHaveCache)
else()
mark_as_advanced(FORCE Sel4testHaveTimer Sel4testHaveCache)
endif()
add_config_library(sel4test-driver "${configure_string}")

find_package(musllibc REQUIRED)
find_package(util_libs REQUIRED)
find_package(seL4_libs REQUIRED)
Expand All @@ -48,6 +30,42 @@ set(LibNanopb ON CACHE BOOL "" FORCE)
sel4_projects_libs_import_libraries()
add_subdirectory(../../libsel4testsupport libsel4testsupport)

if(
# Platform does not support timers
(NOT LibPlatSupportHaveTimer)
# Frequency settings of the ZynqMP make the ltimer tests problematic
OR
KernelPlatformZynqmp
# Polarfire does not have a complete ltimer implementation
OR
KernelPlatformPolarfire
# Quartz64 does not have a complete ltimer implementation
OR KernelPlatformQuartz64
)
set(Sel4testHaveTimer OFF CACHE BOOL "" FORCE)
else()
set(Sel4testHaveTimer ON CACHE BOOL "" FORCE)
endif()

config_option(Sel4testHaveTimer HAVE_TIMER "Enable tests that require a timer driver" DEFAULT ON)

config_option(Sel4testSimulation SIMULATION "Disable tests not suitable for simulation" DEFAULT OFF)

config_option(
Sel4testHaveCache
HAVE_CACHE
"Enable tests that require a functioning cache"
DEFAULT
ON
)
if(Sel4testAllowSettingsOverride)
mark_as_advanced(CLEAR Sel4testHaveTimer Sel4testHaveCache)
else()
mark_as_advanced(FORCE Sel4testHaveTimer Sel4testHaveCache)
endif()

add_config_library(sel4test-driver "${configure_string}")

file(
GLOB
static
Expand Down
24 changes: 0 additions & 24 deletions settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,30 +77,6 @@ if(NOT Sel4testAllowSettingsOverride)
set(Sel4testHaveCache ON CACHE BOOL "" FORCE)
endif()

if(KernelPlatformQEMUArmVirt)
if(KernelArmExportPCNTUser AND KernelArmExportPTMRUser)
set(Sel4testHaveTimer ON CACHE BOOL "" FORCE)
else()
set(Sel4testHaveTimer OFF CACHE BOOL "" FORCE)
endif()
elseif(
KernelPlatformZynqmp
OR KernelPlatformPolarfire
OR KernelPlatformQuartz64
OR KernelPlatformRocketchip
OR KernelPlatformRocketchipZCU102
OR KernelPlatformCheshire
OR (SIMULATION AND (KernelArchRiscV OR KernelArchARM))
)
# Frequency settings of the ZynqMP make the ltimer tests problematic
# Polarfire does not have a complete ltimer implementation
# Quartz64 does not have a complete ltimer implementation
# Rocket Chip on the ZCU102 FPGA does not have a timer peripheral
set(Sel4testHaveTimer OFF CACHE BOOL "" FORCE)
else()
set(Sel4testHaveTimer ON CACHE BOOL "" FORCE)
endif()

# Check the hardware debug API non simulated (except for ia32, which can be simulated),
# or platforms that don't support it.
if(((NOT SIMULATION) OR KernelSel4ArchIA32) AND NOT KernelHardwareDebugAPIUnsupported)
Expand Down
Loading