platform.mk 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #
  2. # Copyright (c) 2018-2023, ARM Limited and Contributors. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # Translation tables library
  7. include lib/xlat_tables_v2/xlat_tables.mk
  8. PLAT_INCLUDES := -Iplat/imx/common/include \
  9. -Iplat/imx/imx8m/include \
  10. -Iplat/imx/imx8m/imx8mq/include
  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 += plat/imx/common/imx8_helpers.S \
  23. plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c \
  24. plat/imx/imx8m/imx8mq/imx8mq_psci.c \
  25. plat/imx/imx8m/gpc_common.c \
  26. plat/imx/imx8m/imx_aipstz.c \
  27. plat/imx/imx8m/imx8m_caam.c \
  28. plat/imx/imx8m/imx8m_ccm.c \
  29. plat/imx/imx8m/imx8m_psci_common.c \
  30. plat/imx/imx8m/imx8mq/gpc.c \
  31. plat/imx/common/imx8_topology.c \
  32. plat/imx/common/imx_sip_handler.c \
  33. plat/imx/common/imx_sip_svc.c \
  34. plat/imx/common/imx_uart_console.S \
  35. lib/cpus/aarch64/cortex_a53.S \
  36. drivers/arm/tzc/tzc380.c \
  37. drivers/delay_timer/delay_timer.c \
  38. drivers/delay_timer/generic_delay_timer.c \
  39. ${XLAT_TABLES_LIB_SRCS} \
  40. ${IMX_GIC_SOURCES}
  41. ENABLE_PIE := 1
  42. USE_COHERENT_MEM := 1
  43. RESET_TO_BL31 := 1
  44. A53_DISABLE_NON_TEMPORAL_HINT := 0
  45. WARMBOOT_ENABLE_DCACHE_EARLY := 1
  46. ERRATA_A53_835769 := 1
  47. ERRATA_A53_843419 := 1
  48. ERRATA_A53_855873 := 1
  49. IMX_DRAM_RETENTION ?= 0
  50. $(eval $(call assert_boolean,IMX_DRAM_RETENTION))
  51. $(eval $(call add_define,IMX_DRAM_RETENTION))
  52. ifeq (${IMX_DRAM_RETENTION},1)
  53. BL31_SOURCES += ${IMX_DRAM_SOURCES}
  54. endif
  55. ifneq (${PRELOADED_BL33_BASE},)
  56. $(eval $(call add_define_val,PLAT_NS_IMAGE_OFFSET,${PRELOADED_BL33_BASE}))
  57. endif
  58. BL32_BASE ?= 0xfe000000
  59. $(eval $(call add_define,BL32_BASE))
  60. BL32_SIZE ?= 0x2000000
  61. $(eval $(call add_define,BL32_SIZE))
  62. IMX_BOOT_UART_BASE ?= 0x30860000
  63. ifeq (${IMX_BOOT_UART_BASE},auto)
  64. override IMX_BOOT_UART_BASE := 0
  65. endif
  66. $(eval $(call add_define,IMX_BOOT_UART_BASE))
  67. ifeq (${SPD},trusty)
  68. BL31_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
  69. endif