platform.mk 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. SOC_DIR := plat/nvidia/tegra/soc/${TARGET_SOC}
  8. # dump the state on crash console
  9. CRASH_REPORTING := 1
  10. $(eval $(call add_define,CRASH_REPORTING))
  11. # enable assert() for release/debug builds
  12. ENABLE_ASSERTIONS := 1
  13. PLAT_LOG_LEVEL_ASSERT := 50
  14. $(eval $(call add_define,PLAT_LOG_LEVEL_ASSERT))
  15. # enable dynamic memory mapping
  16. PLAT_XLAT_TABLES_DYNAMIC := 1
  17. $(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC))
  18. # Enable exception handling at EL3
  19. EL3_EXCEPTION_HANDLING := 1
  20. GICV2_G0_FOR_EL3 := 1
  21. # Enable PSCI v1.0 extended state ID format
  22. PSCI_EXTENDED_STATE_ID := 1
  23. # code and read-only data should be put on separate memory pages
  24. SEPARATE_CODE_AND_RODATA := 1
  25. # do not use coherent memory
  26. USE_COHERENT_MEM := 0
  27. # do not enable SVE
  28. ENABLE_SVE_FOR_NS := 0
  29. # enable D-cache early during CPU warmboot
  30. WARMBOOT_ENABLE_DCACHE_EARLY := 1
  31. # remove the standard libc
  32. OVERRIDE_LIBC := 1
  33. # Flag to enable WDT FIQ interrupt handling for Tegra SoCs
  34. # prior to Tegra186
  35. ENABLE_TEGRA_WDT_LEGACY_FIQ_HANDLING ?= 0
  36. # Flag to allow relocation of BL32 image to TZDRAM during boot
  37. RELOCATE_BL32_IMAGE ?= 0
  38. # Enable stack protection
  39. ENABLE_STACK_PROTECTOR := strong
  40. include plat/nvidia/tegra/common/tegra_common.mk
  41. include ${SOC_DIR}/platform_${TARGET_SOC}.mk
  42. $(eval $(call add_define,ENABLE_TEGRA_WDT_LEGACY_FIQ_HANDLING))
  43. $(eval $(call add_define,RELOCATE_BL32_IMAGE))
  44. # modify BUILD_PLAT to point to SoC specific build directory
  45. BUILD_PLAT := ${BUILD_BASE}/${PLAT}/${TARGET_SOC}/${BUILD_TYPE}
  46. # platform cflags (enable signed comparisons, disable stdlib)
  47. TF_CFLAGS += -Wsign-compare -nostdlib
  48. # override with necessary libc files for the Tegra platform
  49. override LIBC_SRCS := $(addprefix lib/libc/, \
  50. assert.c \
  51. memcpy.c \
  52. memmove.c \
  53. memset.c \
  54. printf.c \
  55. putchar.c \
  56. strlen.c \
  57. snprintf.c)
  58. INCLUDES += -Iinclude/lib/libc \
  59. -Iinclude/lib/libc/$(ARCH) \
  60. ifneq ($(findstring armlink,$(notdir $(LD))),)
  61. # o suppress warnings for section mismatches, undefined symbols
  62. # o use only those libraries that are specified in the input file
  63. # list to resolve references
  64. # o create a static callgraph of functions
  65. # o resolve undefined symbols to el3_panic
  66. # o include only required sections
  67. TF_LDFLAGS += --diag_suppress=L6314,L6332 --no_scanlib --callgraph
  68. TF_LDFLAGS += --keep="*(__pubsub*)" --keep="*(rt_svc_descs*)" --keep="*(*cpu_ops)"
  69. ifeq (${ENABLE_PMF},1)
  70. TF_LDFLAGS += --keep="*(*pmf_svc_descs*)"
  71. endif
  72. endif