xref: /rk3399_ARM-atf/plat/nvidia/tegra/platform.mk (revision d4b29105f4d4d11f4bd0f64a7ff9a49c897d804e)
1#
2# Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
3# Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
8SOC_DIR			:=	plat/nvidia/tegra/soc/${TARGET_SOC}
9
10# dump the state on crash console
11CRASH_REPORTING		:=	1
12$(eval $(call add_define,CRASH_REPORTING))
13
14# enable assert() for release/debug builds
15ENABLE_ASSERTIONS	:=	1
16PLAT_LOG_LEVEL_ASSERT	:=	40
17$(eval $(call add_define,PLAT_LOG_LEVEL_ASSERT))
18
19# enable dynamic memory mapping
20PLAT_XLAT_TABLES_DYNAMIC :=	1
21$(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC))
22
23# Enable PSCI v1.0 extended state ID format
24PSCI_EXTENDED_STATE_ID	:=	1
25
26# code and read-only data should be put on separate memory pages
27SEPARATE_CODE_AND_RODATA :=	1
28
29# do not use coherent memory
30USE_COHERENT_MEM	:=	0
31
32# do not enable SVE
33ENABLE_SVE_FOR_NS	:=	0
34
35# enable D-cache early during CPU warmboot
36WARMBOOT_ENABLE_DCACHE_EARLY := 1
37
38# remove the standard libc
39OVERRIDE_LIBC		:=	1
40
41# Flag to enable WDT FIQ interrupt handling for Tegra SoCs
42# prior to Tegra186
43ENABLE_WDT_LEGACY_FIQ_HANDLING	?= 0
44
45include plat/nvidia/tegra/common/tegra_common.mk
46include ${SOC_DIR}/platform_${TARGET_SOC}.mk
47
48$(eval $(call add_define,ENABLE_WDT_LEGACY_FIQ_HANDLING))
49
50# modify BUILD_PLAT to point to SoC specific build directory
51BUILD_PLAT	:=	${BUILD_BASE}/${PLAT}/${TARGET_SOC}/${BUILD_TYPE}
52
53# platform cflags (enable signed comparisons, disable stdlib)
54TF_CFLAGS	+= -Wsign-compare -nostdlib
55
56# override with necessary libc files for the Tegra platform
57override LIBC_SRCS :=	$(addprefix lib/libc/,		\
58			assert.c			\
59			memcpy.c			\
60			memmove.c			\
61			memset.c			\
62			printf.c			\
63			putchar.c			\
64			strlen.c			\
65			snprintf.c)
66
67INCLUDES	+=	-Iinclude/lib/libc		\
68			-Iinclude/lib/libc/$(ARCH)	\
69
70ifneq ($(findstring armlink,$(notdir $(LD))),)
71# o suppress warnings for section mismatches, undefined symbols
72# o use only those libraries that are specified in the input file
73#   list to resolve references
74# o create a static callgraph of functions
75# o resolve undefined symbols to el3_panic
76# o include only required sections
77TF_LDFLAGS	+= --diag_suppress=L6314,L6332 --no_scanlib --callgraph
78TF_LDFLAGS	+= --keep="*(__pubsub*)" --keep="*(rt_svc_descs*)" --keep="*(*cpu_ops)"
79ifeq (${ENABLE_PMF},1)
80TF_LDFLAGS	+= --keep="*(*pmf_svc_descs*)"
81endif
82endif
83