1#
2# Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7include common/fdt_wrappers.mk
8
9# platform configs
10ENABLE_CONSOLE_SPE			:= 1
11$(eval $(call add_define,ENABLE_CONSOLE_SPE))
12
13ENABLE_STRICT_CHECKING_MODE		:= 1
14$(eval $(call add_define,ENABLE_STRICT_CHECKING_MODE))
15
16USE_GPC_DMA				:= 1
17$(eval $(call add_define,USE_GPC_DMA))
18
19RESET_TO_BL31				:= 1
20
21PROGRAMMABLE_RESET_ADDRESS		:= 1
22
23COLD_BOOT_SINGLE_CPU			:= 1
24
25# platform settings
26TZDRAM_BASE				:= 0x40000000
27$(eval $(call add_define,TZDRAM_BASE))
28
29MAX_XLAT_TABLES				:= 25
30$(eval $(call add_define,MAX_XLAT_TABLES))
31
32MAX_MMAP_REGIONS			:= 30
33$(eval $(call add_define,MAX_MMAP_REGIONS))
34
35# enable RAS handling
36HANDLE_EA_EL3_FIRST_NS			:= 1
37RAS_EXTENSION				:= 1
38
39# platform files
40PLAT_INCLUDES		+=	-Iplat/nvidia/tegra/include/t194 \
41				-I${SOC_DIR}/drivers/include
42
43BL31_SOURCES		+=	${TEGRA_GICv2_SOURCES}			\
44				drivers/ti/uart/aarch64/16550_console.S \
45				lib/cpus/aarch64/denver.S		\
46				${TEGRA_DRIVERS}/bpmp_ipc/intf.c	\
47				${TEGRA_DRIVERS}/bpmp_ipc/ivc.c		\
48				${TEGRA_DRIVERS}/memctrl/memctrl_v2.c	\
49				${TEGRA_DRIVERS}/smmu/smmu.c		\
50				${SOC_DIR}/drivers/mce/mce.c		\
51				${SOC_DIR}/drivers/mce/nvg.c		\
52				${SOC_DIR}/drivers/mce/aarch64/nvg_helpers.S \
53				${SOC_DIR}/drivers/se/se.c		\
54				${SOC_DIR}/plat_memctrl.c		\
55				${SOC_DIR}/plat_psci_handlers.c		\
56				${SOC_DIR}/plat_setup.c			\
57				${SOC_DIR}/plat_secondary.c		\
58				${SOC_DIR}/plat_sip_calls.c		\
59				${SOC_DIR}/plat_smmu.c			\
60				${SOC_DIR}/plat_trampoline.S
61
62ifeq (${USE_GPC_DMA}, 1)
63BL31_SOURCES		+=	${TEGRA_DRIVERS}/gpcdma/gpcdma.c
64endif
65
66ifeq (${ENABLE_CONSOLE_SPE},1)
67BL31_SOURCES		+=	${TEGRA_DRIVERS}/spe/shared_console.S
68endif
69
70# RAS sources
71ifeq (${RAS_EXTENSION},1)
72BL31_SOURCES		+=	lib/extensions/ras/std_err_record.c		\
73				lib/extensions/ras/ras_common.c			\
74				${SOC_DIR}/plat_ras.c
75endif
76
77# SPM dispatcher
78ifeq (${SPD},spmd)
79include lib/libfdt/libfdt.mk
80# sources to support spmd
81BL31_SOURCES		+=	plat/common/plat_spmd_manifest.c	\
82				${LIBFDT_SRCS}
83
84BL31_SOURCES		+=	${FDT_WRAPPERS_SOURCES}
85endif
86