diff --git a/config.cmake b/config.cmake index 7494c9269..a479eb790 100644 --- a/config.cmake +++ b/config.cmake @@ -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 "") diff --git a/configs/seL4Config.cmake b/configs/seL4Config.cmake index 33c493601..5c0b1bf20 100644 --- a/configs/seL4Config.cmake +++ b/configs/seL4Config.cmake @@ -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