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