blob: 2365564999add43f20be6437c5d50b50c3e4409d [file] [log] [blame]
Varun Wadekarb316e242015-05-19 16:48:04 +05301#
Mark Dykesad5ab072020-08-19 19:11:33 +00002# Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
Varun Wadekar8760ec92018-06-13 14:54:01 -07003# Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
Varun Wadekarb316e242015-05-19 16:48:04 +05304#
dp-armfa3cf0b2017-05-03 09:38:09 +01005# SPDX-License-Identifier: BSD-3-Clause
Varun Wadekarb316e242015-05-19 16:48:04 +05306#
7
Varun Wadekara78bb1b2015-08-07 10:03:00 +05308SOC_DIR := plat/nvidia/tegra/soc/${TARGET_SOC}
9
Varun Wadekara441f722017-04-26 13:46:11 -070010# dump the state on crash console
11CRASH_REPORTING := 1
12$(eval $(call add_define,CRASH_REPORTING))
Varun Wadekar6077dce2016-01-27 11:31:06 -080013
Varun Wadekar38c80222017-04-26 13:48:19 -070014# enable assert() for release/debug builds
15ENABLE_ASSERTIONS := 1
Varun Wadekara9d56202018-10-16 16:05:41 -070016PLAT_LOG_LEVEL_ASSERT := 50
Varun Wadekar96658a92017-08-03 11:38:32 -070017$(eval $(call add_define,PLAT_LOG_LEVEL_ASSERT))
Varun Wadekar38c80222017-04-26 13:48:19 -070018
Varun Wadekara441f722017-04-26 13:46:11 -070019# enable dynamic memory mapping
20PLAT_XLAT_TABLES_DYNAMIC := 1
21$(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC))
22
Varun Wadekar10c32cb2020-03-31 18:42:59 -070023# Enable exception handling at EL3
24EL3_EXCEPTION_HANDLING := 1
25GICV2_G0_FOR_EL3 := 1
26
Varun Wadekara441f722017-04-26 13:46:11 -070027# Enable PSCI v1.0 extended state ID format
28PSCI_EXTENDED_STATE_ID := 1
29
30# code and read-only data should be put on separate memory pages
31SEPARATE_CODE_AND_RODATA := 1
32
33# do not use coherent memory
34USE_COHERENT_MEM := 0
35
Varun Wadekare0ecdd02017-08-03 17:17:00 -070036# enable D-cache early during CPU warmboot
37WARMBOOT_ENABLE_DCACHE_EARLY := 1
38
Anthony Zhouc87bc0c2018-04-02 19:34:59 +080039# remove the standard libc
40OVERRIDE_LIBC := 1
41
Varun Wadekar8760ec92018-06-13 14:54:01 -070042# Flag to enable WDT FIQ interrupt handling for Tegra SoCs
43# prior to Tegra186
Varun Wadekar98275da2019-01-28 17:00:32 -080044ENABLE_TEGRA_WDT_LEGACY_FIQ_HANDLING ?= 0
Varun Wadekar8760ec92018-06-13 14:54:01 -070045
Varun Wadekar0ed62702018-06-20 14:30:59 -070046# Flag to allow relocation of BL32 image to TZDRAM during boot
47RELOCATE_BL32_IMAGE ?= 0
48
Varun Wadekar087190f2020-05-16 22:10:09 -070049# Enable stack protection
50ENABLE_STACK_PROTECTOR := strong
51
Varun Wadekarbef02f02020-04-17 19:09:21 -070052# Enable SDEI
53SDEI_SUPPORT := 1
54
Varun Wadekar131ced42020-07-19 21:17:57 -070055# modify BUILD_PLAT to point to SoC specific build directory
56BUILD_PLAT := ${BUILD_BASE}/${PLAT}/${TARGET_SOC}/${BUILD_TYPE}
57
Varun Wadekarb316e242015-05-19 16:48:04 +053058include plat/nvidia/tegra/common/tegra_common.mk
59include ${SOC_DIR}/platform_${TARGET_SOC}.mk
Varun Wadekarc39b0ba2015-07-21 10:16:13 +053060
Varun Wadekar98275da2019-01-28 17:00:32 -080061$(eval $(call add_define,ENABLE_TEGRA_WDT_LEGACY_FIQ_HANDLING))
Varun Wadekar0ed62702018-06-20 14:30:59 -070062$(eval $(call add_define,RELOCATE_BL32_IMAGE))
Varun Wadekar8760ec92018-06-13 14:54:01 -070063
Varun Wadekar7919a602017-09-06 17:17:12 -070064# platform cflags (enable signed comparisons, disable stdlib)
Varun Wadekar00814cc2020-08-24 16:57:03 -070065TF_CFLAGS += -nostdlib
Anthony Zhouc87bc0c2018-04-02 19:34:59 +080066
67# override with necessary libc files for the Tegra platform
68override LIBC_SRCS := $(addprefix lib/libc/, \
Varun Wadekarbef02f02020-04-17 19:09:21 -070069 aarch64/setjmp.S \
Anthony Zhouc87bc0c2018-04-02 19:34:59 +080070 assert.c \
Varun Wadekar131ced42020-07-19 21:17:57 -070071 memchr.c \
72 memcmp.c \
Anthony Zhouc87bc0c2018-04-02 19:34:59 +080073 memcpy.c \
74 memmove.c \
Mark Dykesad5ab072020-08-19 19:11:33 +000075 memset.c \
Anthony Zhouc87bc0c2018-04-02 19:34:59 +080076 printf.c \
77 putchar.c \
Varun Wadekar131ced42020-07-19 21:17:57 -070078 strrchr.c \
Anthony Zhouc87bc0c2018-04-02 19:34:59 +080079 strlen.c \
80 snprintf.c)
81
82INCLUDES += -Iinclude/lib/libc \
83 -Iinclude/lib/libc/$(ARCH) \
Varun Wadekar4d034c52019-01-11 14:47:48 -080084
85ifneq ($(findstring armlink,$(notdir $(LD))),)
86# o suppress warnings for section mismatches, undefined symbols
87# o use only those libraries that are specified in the input file
88# list to resolve references
89# o create a static callgraph of functions
90# o resolve undefined symbols to el3_panic
91# o include only required sections
92TF_LDFLAGS += --diag_suppress=L6314,L6332 --no_scanlib --callgraph
Chris Kay33bfc5e2023-02-14 11:30:04 +000093TF_LDFLAGS += --keep="*(.__pubsub*)" --keep="*(.rt_svc_descs*)" --keep="*(.cpu_ops)"
Varun Wadekar4d034c52019-01-11 14:47:48 -080094ifeq (${ENABLE_PMF},1)
Chris Kay33bfc5e2023-02-14 11:30:04 +000095TF_LDFLAGS += --keep="*(.pmf_svc_descs*)"
Varun Wadekar4d034c52019-01-11 14:47:48 -080096endif
97endif