platform.mk 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #
  2. # Copyright (c) 2015-2024, 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. # enable D-cache early during CPU warmboot
  28. WARMBOOT_ENABLE_DCACHE_EARLY := 1
  29. # remove the standard libc
  30. OVERRIDE_LIBC := 1
  31. # Flag to enable WDT FIQ interrupt handling for Tegra SoCs
  32. # prior to Tegra186
  33. ENABLE_TEGRA_WDT_LEGACY_FIQ_HANDLING ?= 0
  34. # Flag to allow relocation of BL32 image to TZDRAM during boot
  35. RELOCATE_BL32_IMAGE ?= 0
  36. # Enable stack protection
  37. ENABLE_STACK_PROTECTOR := strong
  38. # Enable SDEI
  39. SDEI_SUPPORT := 1
  40. # modify BUILD_PLAT to point to SoC specific build directory
  41. BUILD_PLAT := ${BUILD_BASE}/${PLAT}/${TARGET_SOC}/${BUILD_TYPE}
  42. include plat/nvidia/tegra/common/tegra_common.mk
  43. include ${SOC_DIR}/platform_${TARGET_SOC}.mk
  44. $(eval $(call add_define,ENABLE_TEGRA_WDT_LEGACY_FIQ_HANDLING))
  45. $(eval $(call add_define,RELOCATE_BL32_IMAGE))
  46. # platform cflags (enable signed comparisons, disable stdlib)
  47. TF_CFLAGS += -nostdlib
  48. # override with necessary libc files for the Tegra platform
  49. override LIBC_SRCS := $(addprefix lib/libc/, \
  50. aarch64/setjmp.S \
  51. assert.c \
  52. memchr.c \
  53. memcmp.c \
  54. memcpy.c \
  55. memmove.c \
  56. memset.c \
  57. printf.c \
  58. putchar.c \
  59. strrchr.c \
  60. strlen.c \
  61. snprintf.c)
  62. INCLUDES += -Iinclude/lib/libc \
  63. -Iinclude/lib/libc/$(ARCH) \
  64. ifeq ($($(ARCH)-ld-id),arm-link)
  65. # o suppress warnings for section mismatches, undefined symbols
  66. # o use only those libraries that are specified in the input file
  67. # list to resolve references
  68. # o create a static callgraph of functions
  69. # o resolve undefined symbols to el3_panic
  70. # o include only required sections
  71. TF_LDFLAGS += --diag_suppress=L6314,L6332 --no_scanlib --callgraph
  72. TF_LDFLAGS += --keep="*(.__pubsub*)" --keep="*(.rt_svc_descs*)" --keep="*(.cpu_ops)"
  73. ifeq (${ENABLE_PMF},1)
  74. TF_LDFLAGS += --keep="*(.pmf_svc_descs*)"
  75. endif
  76. endif