From af9a0460313256b7b41e24bc9a4bec4fdc6b2aa7 Mon Sep 17 00:00:00 2001 From: Kent McLeod Date: Sat, 14 Sep 2019 17:05:47 +1000 Subject: [PATCH] CMake: Add KernelHardwareDebugAPIUnsupported There are platforms/archs that don't support the Kernel Hardware Debug API and they can now advertise that by setting KernelHardwareDebugAPIUnsupported. --- config.cmake | 2 +- src/arch/arm/config.cmake | 4 ++++ src/arch/riscv/config.cmake | 3 +++ src/plat/am335x/config.cmake | 1 + src/plat/exynos5/config.cmake | 4 ++++ src/plat/imx31/config.cmake | 1 + src/plat/omap3/config.cmake | 1 + 7 files changed, 15 insertions(+), 1 deletion(-) diff --git a/config.cmake b/config.cmake index 464151e09..993e15a2e 100644 --- a/config.cmake +++ b/config.cmake @@ -320,7 +320,7 @@ config_option( allows userspace processes to set breakpoints, watchpoints and to \ single-step through thread execution." DEFAULT OFF - DEPENDS "NOT KernelVerificationBuild" + DEPENDS "NOT KernelVerificationBuild;NOT KernelHardwareDebugAPIUnsupported" ) config_option( KernelPrinting PRINTING diff --git a/src/arch/arm/config.cmake b/src/arch/arm/config.cmake index a764ce535..09317c294 100644 --- a/src/arch/arm/config.cmake +++ b/src/arch/arm/config.cmake @@ -160,6 +160,10 @@ if(KernelAArch32FPUEnableContextSwitch OR KernelSel4ArchAarch64) set(KernelHaveFPU ON) endif() +if(KernelSel4ArchAarch64) + set(KernelHardwareDebugAPIUnsupported ON CACHE INTERNAL "") +endif() + if( KernelArmCortexA7 OR KernelArmCortexA8 diff --git a/src/arch/riscv/config.cmake b/src/arch/riscv/config.cmake index 460eb430e..b00dd31f9 100644 --- a/src/arch/riscv/config.cmake +++ b/src/arch/riscv/config.cmake @@ -25,6 +25,9 @@ if(KernelSel4ArchRiscV32) set(KernelPTLevels 2 CACHE STRING "" FORCE) endif() +# This is not supported on RISC-V +set(KernelHardwareDebugAPIUnsupported ON CACHE INTERNAL "") + add_sources( DEP "KernelArchRiscV" PREFIX src/arch/riscv diff --git a/src/plat/am335x/config.cmake b/src/plat/am335x/config.cmake index 114ef143a..12b4096b2 100644 --- a/src/plat/am335x/config.cmake +++ b/src/plat/am335x/config.cmake @@ -26,6 +26,7 @@ if(KernelPlatformAM335X) # MCS is not supported on am335x. # It requires a timer driver that implements the tickless programming requirements. set(KernelPlatformSupportsMCS OFF) + set(KernelHardwareDebugAPIUnsupported ON CACHE INTERNAL "") set(KernelArmCortexA8 ON) set(KernelArchArmV7a ON) diff --git a/src/plat/exynos5/config.cmake b/src/plat/exynos5/config.cmake index 07e57bca2..019063e0f 100644 --- a/src/plat/exynos5/config.cmake +++ b/src/plat/exynos5/config.cmake @@ -67,6 +67,10 @@ if(KernelPlatExynos5) config_set(KernelPlatExynos54xx PLAT_EXYNOS54XX OFF) endif() + if(NOT KernelPlatformExynos5422) + set(KernelHardwareDebugAPIUnsupported ON CACHE INTERNAL "") + endif() + list(APPEND KernelDTSList "tools/dts/${KernelARMPlatform}.dts") list(APPEND KernelDTSList "src/plat/exynos5/overlay-${KernelARMPlatform}.dts") declare_default_headers( diff --git a/src/plat/imx31/config.cmake b/src/plat/imx31/config.cmake index 454bda8b7..db36e3eaa 100644 --- a/src/plat/imx31/config.cmake +++ b/src/plat/imx31/config.cmake @@ -18,6 +18,7 @@ if(KernelPlatformKZM) declare_seL4_arch(aarch32) set(KernelArm1136JF_S ON) set(KernelArchArmV6 ON) + set(KernelHardwareDebugAPIUnsupported ON CACHE INTERNAL "") config_set(KernelARMPlatform ARM_PLAT kzm) set(KernelArmMach "imx" CACHE INTERNAL "") list(APPEND KernelDTSList "tools/dts/kzm.dts") diff --git a/src/plat/omap3/config.cmake b/src/plat/omap3/config.cmake index ee78da6f0..44a8fadd3 100644 --- a/src/plat/omap3/config.cmake +++ b/src/plat/omap3/config.cmake @@ -18,6 +18,7 @@ if(KernelPlatformOMAP3) declare_seL4_arch(aarch32) set(KernelArmCortexA8 ON) set(KernelArchArmV7a ON) + set(KernelHardwareDebugAPIUnsupported ON CACHE INTERNAL "") config_set(KernelARMPlatform ARM_PLAT omap3) config_set(KernelArmMach MACH "omap") list(APPEND KernelDTSList "tools/dts/omap3.dts")