platform.mk 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #
  2. # Copyright 2019-2022 NXP
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. PLAT_INCLUDES := -Iplat/imx/common/include \
  7. -Iplat/imx/imx8m/include \
  8. -Iplat/imx/imx8m/imx8mn/include
  9. # Translation tables library
  10. include lib/xlat_tables_v2/xlat_tables.mk
  11. # Include GICv3 driver files
  12. include drivers/arm/gic/v3/gicv3.mk
  13. IMX_DRAM_SOURCES := plat/imx/imx8m/ddr/dram.c \
  14. plat/imx/imx8m/ddr/clock.c \
  15. plat/imx/imx8m/ddr/dram_retention.c \
  16. plat/imx/imx8m/ddr/ddr4_dvfs.c \
  17. plat/imx/imx8m/ddr/lpddr4_dvfs.c
  18. IMX_GIC_SOURCES := ${GICV3_SOURCES} \
  19. plat/common/plat_gicv3.c \
  20. plat/common/plat_psci_common.c \
  21. plat/imx/common/plat_imx8_gic.c
  22. BL31_SOURCES += common/desc_image_load.c \
  23. plat/imx/common/imx8_helpers.S \
  24. plat/imx/imx8m/gpc_common.c \
  25. plat/imx/imx8m/imx_hab.c \
  26. plat/imx/imx8m/imx_aipstz.c \
  27. plat/imx/imx8m/imx_rdc.c \
  28. plat/imx/imx8m/imx8m_caam.c \
  29. plat/imx/imx8m/imx8m_ccm.c \
  30. plat/imx/imx8m/imx8m_csu.c \
  31. plat/imx/imx8m/imx8m_psci_common.c \
  32. plat/imx/imx8m/imx8m_snvs.c \
  33. plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c \
  34. plat/imx/imx8m/imx8mn/imx8mn_psci.c \
  35. plat/imx/imx8m/imx8mn/gpc.c \
  36. plat/imx/common/imx8_topology.c \
  37. plat/imx/common/imx_sip_handler.c \
  38. plat/imx/common/imx_sip_svc.c \
  39. plat/imx/common/imx_common.c \
  40. plat/imx/common/imx_uart_console.S \
  41. lib/cpus/aarch64/cortex_a53.S \
  42. drivers/arm/tzc/tzc380.c \
  43. drivers/delay_timer/delay_timer.c \
  44. drivers/delay_timer/generic_delay_timer.c \
  45. ${IMX_GIC_SOURCES} \
  46. ${XLAT_TABLES_LIB_SRCS}
  47. ENABLE_PIE := 1
  48. USE_COHERENT_MEM := 1
  49. RESET_TO_BL31 := 1
  50. A53_DISABLE_NON_TEMPORAL_HINT := 0
  51. ERRATA_A53_835769 := 1
  52. ERRATA_A53_843419 := 1
  53. ERRATA_A53_855873 := 1
  54. IMX_DRAM_RETENTION ?= 1
  55. $(eval $(call assert_boolean,IMX_DRAM_RETENTION))
  56. $(eval $(call add_define,IMX_DRAM_RETENTION))
  57. ifeq (${IMX_DRAM_RETENTION},1)
  58. BL31_SOURCES += ${IMX_DRAM_SOURCES}
  59. endif
  60. ifneq (${PRELOADED_BL33_BASE},)
  61. $(eval $(call add_define_val,PLAT_NS_IMAGE_OFFSET,${PRELOADED_BL33_BASE}))
  62. endif
  63. BL32_BASE ?= 0xbe000000
  64. $(eval $(call add_define,BL32_BASE))
  65. BL32_SIZE ?= 0x2000000
  66. $(eval $(call add_define,BL32_SIZE))
  67. IMX_BOOT_UART_BASE ?= 0x30890000
  68. ifeq (${IMX_BOOT_UART_BASE},auto)
  69. override IMX_BOOT_UART_BASE := 0
  70. endif
  71. $(eval $(call add_define,IMX_BOOT_UART_BASE))
  72. EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
  73. ifeq (${SDEI_SUPPORT}, 1)
  74. BL31_SOURCES += plat/imx/common/imx_ehf.c \
  75. plat/imx/common/imx_sdei.c
  76. endif
  77. ifeq (${SPD},trusty)
  78. BL31_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
  79. endif