QEMU/arm: select CPU from architecture

Signed-off-by: Axel Heider <axelheider@gmx.de>
This commit is contained in:
Axel Heider
2024-02-04 21:57:17 +01:00
committed by Gerwin Klein
parent b770e2d71e
commit 245c07fa2e

View File

@@ -38,8 +38,23 @@ endmacro()
if(KernelPlatformQEMUArmVirt)
if(NOT ARM_CPU)
message(STATUS "ARM_CPU not set, defaulting to cortex-a53")
set(ARM_CPU "cortex-a53")
# Our default QEMU configuration is AARCH64/Cortex-a53. If
# KernelSel4Arch is set to aarch32/arm_hyp, the default is Cortex-a15.
# If both ARM_CPU and KernelSel4Arch are set, conflicting values will be
# detected eventually. Note that the KernelSel4Archxxx variables are not
# set up here, because declare_seL4_arch() has not been called yet.
set(
arch_cpu_mapping # element format: "KernelSel4Arch:ARM_CPU"
":cortex-a53" # used if KernelSel4Arch is empty or not set
"aarch64:cortex-a53"
"arm_hyp:cortex-a15"
"aarch32:cortex-a15"
)
if(NOT ";${arch_cpu_mapping};" MATCHES ";${KernelSel4Arch}:([^;]*);")
message(FATAL_ERROR "unsupported KernelSel4Arch: '${KernelSel4Arch}'")
endif()
set(ARM_CPU "${CMAKE_MATCH_1}")
message(STATUS "ARM_CPU not set, defaulting to ${ARM_CPU}")
endif()
if("${ARM_CPU}" STREQUAL "cortex-a7")