Skip to content
Snippets Groups Projects
Commit caad010a authored by Kent McLeod's avatar Kent McLeod Committed by Kent Mcleod
Browse files

CMake: Add KernelIsMCS option

This switches between master and mcs configurations.
This also adds a build system variable KernelPlatformSupportsMCS that
can be used to error on platforms that don't support MCS due to
unimplemented functionality.
parent 940b43b7
No related branches found
No related tags found
No related merge requests found
......@@ -14,8 +14,17 @@ cmake_minimum_required(VERSION 3.7.2)
set(configure_string "${config_configure_string}")
# Set kernel branch
config_set(KernelIsMaster KERNEL_MASTER ON)
config_option(
KernelIsMCS KERNEL_MCS "Use the MCS kernel configuration, which is not verified."
DEFAULT OFF
)
# Error for unsupported MCS platforms
if(KernelIsMCS AND (NOT KernelPlatformSupportsMCS))
message(
FATAL_ERROR "KernelIsMCS selected, but platform: ${KernelPlatform} does not support it."
)
endif()
# Proof based configuration variables
set(CSPEC_DIR "." CACHE PATH "")
......
......@@ -146,6 +146,10 @@ unset(KernelArmMachFeatureModifiers CACHE)
unset(KernelArmCPU CACHE)
unset(KernelArmArmV CACHE)
# Blacklist platforms without MCS support
unset(KernelPlatformSupportsMCS CACHE)
set(KernelPlatformSupportsMCS ON)
file(GLOB result ${CMAKE_CURRENT_LIST_DIR}/../src/plat/*/config.cmake)
list(SORT result)
......@@ -167,6 +171,7 @@ config_set(KernelArchArmV6 ARCH_ARM_V6 "${KernelArchArmV6}")
config_set(KernelArchArmV7a ARCH_ARM_V7A "${KernelArchArmV7a}")
config_set(KernelArchArmV7ve ARCH_ARM_V7VE "${KernelArchArmV7ve}")
config_set(KernelArchArmV8a ARCH_ARM_V8A "${KernelArchArmV8a}")
set(KernelPlatformSupportsMCS "${KernelPlatformSupportsMCS}" CACHE INTERNAL "" FORCE)
# Check for v7ve before v7a as v7ve is a superset and we want to set the
# actual armv to that, but leave armv7a config enabled for anything that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment