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(zynq7000 KernelPlatformZynq7000 PLAT_ZYNQ7000 KernelSel4ArchAarch32)
10
11if(KernelPlatformZynq7000)
12    declare_seL4_arch(aarch32)
13    set(KernelArmCortexA9 ON)
14    set(KernelArchArmV7a ON)
15    config_set(KernelARMPlatform ARM_PLAT zynq7000)
16    config_set(KernelArmMach MACH "zynq")
17    list(APPEND KernelDTSList "tools/dts/zynq7000.dts")
18    if(KernelIsMCS)
19        list(APPEND KernelDTSList "src/plat/zynq7000/mcs-overlay-zynq7000.dts")
20        set(timer_file drivers/timer/arm_global.h)
21    else()
22        list(APPEND KernelDTSList "src/plat/zynq7000/overlay-zynq7000.dts")
23        set(timer_file drivers/timer/arm_priv.h)
24    endif()
25    declare_default_headers(
26        # This is the timer frequency that can pass tests (in particular
27        # SCHED0011), but may not be the correct number.
28        TIMER_FREQUENCY 320000000
29        MAX_IRQ 92
30        NUM_PPI 32
31        INTERRUPT_CONTROLLER arch/machine/gic_v2.h
32        TIMER ${timer_file}
33        CLK_SHIFT 40llu
34        CLK_MAGIC 3435973837llu
35        KERNEL_WCET 10llu
36    )
37endif()
38
39add_sources(
40    DEP "KernelPlatformZynq7000"
41    CFILES src/arch/arm/machine/l2c_310.c src/arch/arm/machine/gic_v2.c
42)
43