1# 2# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230) 3# 4# SPDX-License-Identifier: GPL-2.0-only 5# 6 7cmake_minimum_required(VERSION 3.7.2) 8 9declare_platform(bcm2837 KernelPlatformRpi3 PLAT_BCM2837 KernelArchARM) 10 11if(KernelPlatformRpi3) 12 if("${KernelSel4Arch}" STREQUAL aarch32) 13 declare_seL4_arch(aarch32) 14 elseif("${KernelSel4Arch}" STREQUAL aarch64) 15 declare_seL4_arch(aarch64) 16 else() 17 fallback_declare_seL4_arch_default(aarch32) 18 endif() 19 set(KernelArmCortexA53 ON) 20 set(KernelArchArmV8a ON) 21 config_set(KernelARMPlatform ARM_PLAT rpi3) 22 set(KernelArmMachFeatureModifiers "+crc" CACHE INTERNAL "") 23 list(APPEND KernelDTSList "tools/dts/rpi3.dts") 24 list(APPEND KernelDTSList "src/plat/bcm2837/overlay-rpi3.dts") 25 26 declare_default_headers( 27 TIMER_FREQUENCY 19200000 28 MAX_IRQ 127 29 NUM_PPI 32 30 TIMER drivers/timer/arm_generic.h 31 INTERRUPT_CONTROLLER drivers/irq/bcm2836-armctrl-ic.h 32 KERNEL_WCET 10u 33 CLK_MAGIC 458129845llu 34 CLK_SHIFT 43u 35 ) 36endif() 37 38add_sources( 39 DEP "KernelPlatformRpi3" 40 CFILES src/plat/bcm2837/machine/intc.c src/arch/arm/machine/l2c_nop.c 41) 42