Jacky Bai | 9bd2f84 | 2019-11-28 13:16:33 +0800 | [diff] [blame] | 1 | # |
Jacky Bai | 210ec7d | 2022-03-28 16:11:23 +0800 | [diff] [blame] | 2 | # Copyright 2019-2022 NXP |
Jacky Bai | 9bd2f84 | 2019-11-28 13:16:33 +0800 | [diff] [blame] | 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 | |
Jacky Bai | cf7a140 | 2019-12-03 10:38:11 +0800 | [diff] [blame] | 16 | IMX_DRAM_SOURCES := plat/imx/imx8m/ddr/dram.c \ |
Jacky Bai | d746daa1 | 2019-11-25 13:19:37 +0800 | [diff] [blame] | 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 |
Jacky Bai | cf7a140 | 2019-12-03 10:38:11 +0800 | [diff] [blame] | 21 | |
| 22 | |
Jacky Bai | 9bd2f84 | 2019-11-28 13:16:33 +0800 | [diff] [blame] | 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 += plat/imx/common/imx8_helpers.S \ |
| 29 | plat/imx/imx8m/gpc_common.c \ |
Andrey Zhizhikin | 10a4d86 | 2022-09-26 22:25:33 +0200 | [diff] [blame] | 30 | plat/imx/imx8m/imx_hab.c \ |
Jacky Bai | 9bd2f84 | 2019-11-28 13:16:33 +0800 | [diff] [blame] | 31 | plat/imx/imx8m/imx_aipstz.c \ |
| 32 | plat/imx/imx8m/imx_rdc.c \ |
| 33 | plat/imx/imx8m/imx8m_caam.c \ |
Marco Felsch | 7640134 | 2023-07-24 15:05:58 +0200 | [diff] [blame] | 34 | plat/imx/imx8m/imx8m_ccm.c \ |
Jacky Bai | 3c3c268 | 2020-01-07 14:53:54 +0800 | [diff] [blame] | 35 | plat/imx/imx8m/imx8m_csu.c \ |
Jacky Bai | 9bd2f84 | 2019-11-28 13:16:33 +0800 | [diff] [blame] | 36 | plat/imx/imx8m/imx8m_psci_common.c \ |
| 37 | plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c \ |
| 38 | plat/imx/imx8m/imx8mn/imx8mn_psci.c \ |
| 39 | plat/imx/imx8m/imx8mn/gpc.c \ |
| 40 | plat/imx/common/imx8_topology.c \ |
| 41 | plat/imx/common/imx_sip_handler.c \ |
| 42 | plat/imx/common/imx_sip_svc.c \ |
| 43 | plat/imx/common/imx_uart_console.S \ |
| 44 | lib/cpus/aarch64/cortex_a53.S \ |
| 45 | drivers/arm/tzc/tzc380.c \ |
| 46 | drivers/delay_timer/delay_timer.c \ |
| 47 | drivers/delay_timer/generic_delay_timer.c \ |
Jacky Bai | cf7a140 | 2019-12-03 10:38:11 +0800 | [diff] [blame] | 48 | ${IMX_DRAM_SOURCES} \ |
Jacky Bai | 9bd2f84 | 2019-11-28 13:16:33 +0800 | [diff] [blame] | 49 | ${IMX_GIC_SOURCES} \ |
| 50 | ${XLAT_TABLES_LIB_SRCS} |
| 51 | |
Marco Felsch | 82cb834 | 2022-07-04 12:18:34 +0200 | [diff] [blame] | 52 | ENABLE_PIE := 1 |
Jacky Bai | 9bd2f84 | 2019-11-28 13:16:33 +0800 | [diff] [blame] | 53 | USE_COHERENT_MEM := 1 |
| 54 | RESET_TO_BL31 := 1 |
| 55 | A53_DISABLE_NON_TEMPORAL_HINT := 0 |
| 56 | |
| 57 | ERRATA_A53_835769 := 1 |
| 58 | ERRATA_A53_843419 := 1 |
| 59 | ERRATA_A53_855873 := 1 |
| 60 | |
| 61 | BL32_BASE ?= 0xbe000000 |
| 62 | $(eval $(call add_define,BL32_BASE)) |
| 63 | |
| 64 | BL32_SIZE ?= 0x2000000 |
| 65 | $(eval $(call add_define,BL32_SIZE)) |
| 66 | |
| 67 | IMX_BOOT_UART_BASE ?= 0x30890000 |
Marco Felsch | 409eb8b | 2023-08-02 08:11:35 +0200 | [diff] [blame] | 68 | ifeq (${IMX_BOOT_UART_BASE},auto) |
| 69 | override IMX_BOOT_UART_BASE := 0 |
| 70 | endif |
Jacky Bai | 9bd2f84 | 2019-11-28 13:16:33 +0800 | [diff] [blame] | 71 | $(eval $(call add_define,IMX_BOOT_UART_BASE)) |
Peng Fan | 61adab7 | 2021-03-25 18:46:20 +0800 | [diff] [blame] | 72 | |
Jacky Bai | 210ec7d | 2022-03-28 16:11:23 +0800 | [diff] [blame] | 73 | EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT) |
| 74 | ifeq (${SDEI_SUPPORT}, 1) |
| 75 | BL31_SOURCES += plat/imx/common/imx_ehf.c \ |
| 76 | plat/imx/common/imx_sdei.c |
| 77 | endif |
Ji Luo | e329b3d | 2020-02-20 23:47:21 +0800 | [diff] [blame] | 78 | |
| 79 | ifeq (${SPD},trusty) |
| 80 | BL31_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1 |
| 81 | endif |