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(tx2 KernelPlatformTx2 PLAT_TX2 KernelSel4ArchAarch64)
10
11if(KernelPlatformTx2)
12    declare_seL4_arch(aarch64)
13    # Note: If we enable the Denver 2 cores, which are 40-bit PA,
14    # the 44-bit PA for Cortex-A57 cores would need to be downgraded to 40bit.
15    set(KernelArmCortexA57 ON)
16    set(KernelArchArmV8a ON)
17    set(KernelArmSMMU ON)
18    set(KernelAArch64SErrorIgnore ON)
19    config_set(KernelARMPlatform ARM_PLAT tx2)
20    config_set(KernelArmMach MACH "nvidia")
21    list(APPEND KernelDTSList "tools/dts/tx2.dts")
22    list(APPEND KernelDTSList "src/plat/tx2/overlay-tx2.dts")
23    declare_default_headers(
24        TIMER_FREQUENCY 31250000
25        MAX_IRQ 383
26        INTERRUPT_CONTROLLER arch/machine/gic_v2.h
27        NUM_PPI 32
28        TIMER drivers/timer/arm_generic.h
29        CLK_SHIFT 57u
30        CLK_MAGIC 4611686019u
31        KERNEL_WCET 10u SMMU drivers/smmu/smmuv2.h
32        MAX_SID 128
33        MAX_CB 64
34    )
35endif()
36
37add_sources(
38    DEP "KernelPlatformTx2"
39    CFILES src/arch/arm/machine/gic_v2.c src/arch/arm/machine/l2c_nop.c
40)
41