blob: b429eb7f4c67ae7729bfe3266e51bb99056d4057 [file] [log] [blame]
Varun Wadekar08438e22015-05-19 16:48:04 +05301#
Anthony Zhoub695af12018-04-02 19:34:59 +08002# Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
Varun Wadekar08438e22015-05-19 16:48:04 +05303#
dp-arm82cb2c12017-05-03 09:38:09 +01004# SPDX-License-Identifier: BSD-3-Clause
Varun Wadekar08438e22015-05-19 16:48:04 +05305#
6
Varun Wadekar71cb26e2015-08-07 10:03:00 +05307SOC_DIR := plat/nvidia/tegra/soc/${TARGET_SOC}
8
Varun Wadekar03af25b2017-04-26 13:46:11 -07009# dump the state on crash console
10CRASH_REPORTING := 1
11$(eval $(call add_define,CRASH_REPORTING))
Varun Wadekar990c1e02016-01-27 11:31:06 -080012
Varun Wadekar6c169182017-04-26 13:48:19 -070013# enable assert() for release/debug builds
14ENABLE_ASSERTIONS := 1
Varun Wadekardb0d1072017-08-03 11:38:32 -070015PLAT_LOG_LEVEL_ASSERT := 40
16$(eval $(call add_define,PLAT_LOG_LEVEL_ASSERT))
Varun Wadekar6c169182017-04-26 13:48:19 -070017
Varun Wadekar03af25b2017-04-26 13:46:11 -070018# enable dynamic memory mapping
19PLAT_XLAT_TABLES_DYNAMIC := 1
20$(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC))
21
22# Enable PSCI v1.0 extended state ID format
23PSCI_EXTENDED_STATE_ID := 1
24
25# code and read-only data should be put on separate memory pages
26SEPARATE_CODE_AND_RODATA := 1
27
28# do not use coherent memory
29USE_COHERENT_MEM := 0
30
David Cunado3872fc22017-10-31 23:19:21 +000031# do not enable SVE
32ENABLE_SVE_FOR_NS := 0
33
Varun Wadekarfda818c2017-08-03 17:17:00 -070034# enable D-cache early during CPU warmboot
35WARMBOOT_ENABLE_DCACHE_EARLY := 1
36
Anthony Zhoub695af12018-04-02 19:34:59 +080037# remove the standard libc
38OVERRIDE_LIBC := 1
39
Varun Wadekar08438e22015-05-19 16:48:04 +053040include plat/nvidia/tegra/common/tegra_common.mk
41include ${SOC_DIR}/platform_${TARGET_SOC}.mk
Varun Wadekar1f95e282015-07-21 10:16:13 +053042
43# modify BUILD_PLAT to point to SoC specific build directory
44BUILD_PLAT := ${BUILD_BASE}/${PLAT}/${TARGET_SOC}/${BUILD_TYPE}
Varun Wadekar6311f632017-06-07 09:57:42 -070045
Varun Wadekar7f9d75d2017-09-06 17:17:12 -070046# platform cflags (enable signed comparisons, disable stdlib)
47TF_CFLAGS += -Wsign-compare -nostdlib
Anthony Zhoub695af12018-04-02 19:34:59 +080048
49# override with necessary libc files for the Tegra platform
50override LIBC_SRCS := $(addprefix lib/libc/, \
51 assert.c \
52 memcpy.c \
53 memmove.c \
54 memset.c \
55 printf.c \
56 putchar.c \
57 strlen.c \
58 snprintf.c)
59
60INCLUDES += -Iinclude/lib/libc \
61 -Iinclude/lib/libc/$(ARCH) \
Varun Wadekarc2ad38c2019-01-11 14:47:48 -080062
63ifneq ($(findstring armlink,$(notdir $(LD))),)
64# o suppress warnings for section mismatches, undefined symbols
65# o use only those libraries that are specified in the input file
66# list to resolve references
67# o create a static callgraph of functions
68# o resolve undefined symbols to el3_panic
69# o include only required sections
70TF_LDFLAGS += --diag_suppress=L6314,L6332 --no_scanlib --callgraph
71TF_LDFLAGS += --unresolved=el3_panic
72TF_LDFLAGS += --keep="*(__pubsub*)" --keep="*(rt_svc_descs*)" --keep="*(*cpu_ops)"
73ifeq (${ENABLE_PMF},1)
74TF_LDFLAGS += --keep="*(*pmf_svc_descs*)"
75endif
76endif