platform.mk 2.65 KB
Newer Older
1
#
2
# Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
3
# Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
4
#
dp-arm's avatar
dp-arm committed
5
# SPDX-License-Identifier: BSD-3-Clause
6
7
#

8
9
SOC_DIR			:=	plat/nvidia/tegra/soc/${TARGET_SOC}

10
11
12
# dump the state on crash console
CRASH_REPORTING		:=	1
$(eval $(call add_define,CRASH_REPORTING))
13

14
15
# enable assert() for release/debug builds
ENABLE_ASSERTIONS	:=	1
16
PLAT_LOG_LEVEL_ASSERT	:=	50
17
$(eval $(call add_define,PLAT_LOG_LEVEL_ASSERT))
18

19
20
21
22
# enable dynamic memory mapping
PLAT_XLAT_TABLES_DYNAMIC :=	1
$(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC))

23
24
25
26
# Enable exception handling at EL3
EL3_EXCEPTION_HANDLING	:=	1
GICV2_G0_FOR_EL3	:=	1

27
28
29
30
31
32
33
34
35
# Enable PSCI v1.0 extended state ID format
PSCI_EXTENDED_STATE_ID	:=	1

# code and read-only data should be put on separate memory pages
SEPARATE_CODE_AND_RODATA :=	1

# do not use coherent memory
USE_COHERENT_MEM	:=	0

36
37
38
# do not enable SVE
ENABLE_SVE_FOR_NS	:=	0

39
40
41
# enable D-cache early during CPU warmboot
WARMBOOT_ENABLE_DCACHE_EARLY := 1

42
43
44
# remove the standard libc
OVERRIDE_LIBC		:=	1

45
46
# Flag to enable WDT FIQ interrupt handling for Tegra SoCs
# prior to Tegra186
47
ENABLE_TEGRA_WDT_LEGACY_FIQ_HANDLING	?= 0
48

49
50
51
# Flag to allow relocation of BL32 image to TZDRAM during boot
RELOCATE_BL32_IMAGE		?= 0

Varun Wadekar's avatar
Varun Wadekar committed
52
53
54
# Enable stack protection
ENABLE_STACK_PROTECTOR		:=	strong

Varun Wadekar's avatar
Varun Wadekar committed
55
56
57
# Enable SDEI
SDEI_SUPPORT			:= 1

58
59
include plat/nvidia/tegra/common/tegra_common.mk
include ${SOC_DIR}/platform_${TARGET_SOC}.mk
60

61
$(eval $(call add_define,ENABLE_TEGRA_WDT_LEGACY_FIQ_HANDLING))
62
$(eval $(call add_define,RELOCATE_BL32_IMAGE))
63

64
# modify BUILD_PLAT to point to SoC specific build directory
65
BUILD_PLAT	:=	$(abspath ${BUILD_BASE})/${PLAT}/${TARGET_SOC}/${BUILD_TYPE}
66

Varun Wadekar's avatar
Varun Wadekar committed
67
68
# platform cflags (enable signed comparisons, disable stdlib)
TF_CFLAGS	+= -Wsign-compare -nostdlib
69
70
71

# override with necessary libc files for the Tegra platform
override LIBC_SRCS :=	$(addprefix lib/libc/,		\
Varun Wadekar's avatar
Varun Wadekar committed
72
			aarch64/setjmp.S		\
73
74
75
76
77
78
79
80
81
82
83
			assert.c			\
			memcpy.c			\
			memmove.c			\
			memset.c			\
			printf.c			\
			putchar.c			\
			strlen.c			\
			snprintf.c)

INCLUDES	+=	-Iinclude/lib/libc		\
			-Iinclude/lib/libc/$(ARCH)	\
84
85
86
87
88
89
90
91
92
93
94
95
96
97

ifneq ($(findstring armlink,$(notdir $(LD))),)
# o suppress warnings for section mismatches, undefined symbols
# o use only those libraries that are specified in the input file
#   list to resolve references
# o create a static callgraph of functions
# o resolve undefined symbols to el3_panic
# o include only required sections
TF_LDFLAGS	+= --diag_suppress=L6314,L6332 --no_scanlib --callgraph
TF_LDFLAGS	+= --keep="*(__pubsub*)" --keep="*(rt_svc_descs*)" --keep="*(*cpu_ops)"
ifeq (${ENABLE_PMF},1)
TF_LDFLAGS	+= --keep="*(*pmf_svc_descs*)"
endif
endif