2015-05-19 12:18:04 +01:00
|
|
|
#
|
2019-03-01 18:18:35 +00:00
|
|
|
# Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
|
2018-06-13 22:54:01 +01:00
|
|
|
# Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
|
2015-05-19 12:18:04 +01:00
|
|
|
#
|
2017-05-03 09:38:09 +01:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2015-05-19 12:18:04 +01:00
|
|
|
#
|
|
|
|
|
2015-08-07 05:33:00 +01:00
|
|
|
SOC_DIR := plat/nvidia/tegra/soc/${TARGET_SOC}
|
|
|
|
|
2017-04-26 21:46:11 +01:00
|
|
|
# dump the state on crash console
|
|
|
|
CRASH_REPORTING := 1
|
|
|
|
$(eval $(call add_define,CRASH_REPORTING))
|
2016-01-27 19:31:06 +00:00
|
|
|
|
2017-04-26 21:48:19 +01:00
|
|
|
# enable assert() for release/debug builds
|
|
|
|
ENABLE_ASSERTIONS := 1
|
2018-10-17 00:05:41 +01:00
|
|
|
PLAT_LOG_LEVEL_ASSERT := 50
|
2017-08-03 19:38:32 +01:00
|
|
|
$(eval $(call add_define,PLAT_LOG_LEVEL_ASSERT))
|
2017-04-26 21:48:19 +01:00
|
|
|
|
2017-04-26 21:46:11 +01:00
|
|
|
# enable dynamic memory mapping
|
|
|
|
PLAT_XLAT_TABLES_DYNAMIC := 1
|
|
|
|
$(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC))
|
|
|
|
|
2020-04-01 02:42:59 +01:00
|
|
|
# Enable exception handling at EL3
|
|
|
|
EL3_EXCEPTION_HANDLING := 1
|
|
|
|
GICV2_G0_FOR_EL3 := 1
|
|
|
|
|
2017-04-26 21:46:11 +01:00
|
|
|
# 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
|
|
|
|
|
2017-10-31 23:19:21 +00:00
|
|
|
# do not enable SVE
|
|
|
|
ENABLE_SVE_FOR_NS := 0
|
|
|
|
|
2017-08-04 01:17:00 +01:00
|
|
|
# enable D-cache early during CPU warmboot
|
|
|
|
WARMBOOT_ENABLE_DCACHE_EARLY := 1
|
|
|
|
|
2018-04-02 12:34:59 +01:00
|
|
|
# remove the standard libc
|
|
|
|
OVERRIDE_LIBC := 1
|
|
|
|
|
2018-06-13 22:54:01 +01:00
|
|
|
# Flag to enable WDT FIQ interrupt handling for Tegra SoCs
|
|
|
|
# prior to Tegra186
|
2019-01-29 01:00:32 +00:00
|
|
|
ENABLE_TEGRA_WDT_LEGACY_FIQ_HANDLING ?= 0
|
2018-06-13 22:54:01 +01:00
|
|
|
|
2018-06-20 22:30:59 +01:00
|
|
|
# Flag to allow relocation of BL32 image to TZDRAM during boot
|
|
|
|
RELOCATE_BL32_IMAGE ?= 0
|
|
|
|
|
2020-05-17 06:10:09 +01:00
|
|
|
# Enable stack protection
|
|
|
|
ENABLE_STACK_PROTECTOR := strong
|
|
|
|
|
2020-04-18 03:09:21 +01:00
|
|
|
# Enable SDEI
|
|
|
|
SDEI_SUPPORT := 1
|
|
|
|
|
2015-05-19 12:18:04 +01:00
|
|
|
include plat/nvidia/tegra/common/tegra_common.mk
|
|
|
|
include ${SOC_DIR}/platform_${TARGET_SOC}.mk
|
2015-07-21 05:46:13 +01:00
|
|
|
|
2019-01-29 01:00:32 +00:00
|
|
|
$(eval $(call add_define,ENABLE_TEGRA_WDT_LEGACY_FIQ_HANDLING))
|
2018-06-20 22:30:59 +01:00
|
|
|
$(eval $(call add_define,RELOCATE_BL32_IMAGE))
|
2018-06-13 22:54:01 +01:00
|
|
|
|
2015-07-21 05:46:13 +01:00
|
|
|
# modify BUILD_PLAT to point to SoC specific build directory
|
2020-07-30 08:50:10 +01:00
|
|
|
BUILD_PLAT := $(abspath ${BUILD_BASE})/${PLAT}/${TARGET_SOC}/${BUILD_TYPE}
|
2017-06-07 17:57:42 +01:00
|
|
|
|
2017-09-07 01:17:12 +01:00
|
|
|
# platform cflags (enable signed comparisons, disable stdlib)
|
|
|
|
TF_CFLAGS += -Wsign-compare -nostdlib
|
2018-04-02 12:34:59 +01:00
|
|
|
|
|
|
|
# override with necessary libc files for the Tegra platform
|
|
|
|
override LIBC_SRCS := $(addprefix lib/libc/, \
|
2020-04-18 03:09:21 +01:00
|
|
|
aarch64/setjmp.S \
|
2018-04-02 12:34:59 +01:00
|
|
|
assert.c \
|
|
|
|
memcpy.c \
|
|
|
|
memmove.c \
|
|
|
|
memset.c \
|
|
|
|
printf.c \
|
|
|
|
putchar.c \
|
|
|
|
strlen.c \
|
|
|
|
snprintf.c)
|
|
|
|
|
|
|
|
INCLUDES += -Iinclude/lib/libc \
|
|
|
|
-Iinclude/lib/libc/$(ARCH) \
|
2019-01-11 22:47:48 +00:00
|
|
|
|
|
|
|
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
|