blob: 87b3a6ffa988f09ffaca3bb93e9a1282631cdd3e [file] [log] [blame]
Jacky Bai9bd2f842019-11-28 13:16:33 +08001#
Jacky Bai210ec7d2022-03-28 16:11:23 +08002# Copyright 2019-2022 NXP
Jacky Bai9bd2f842019-11-28 13:16:33 +08003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7PLAT_INCLUDES := -Iplat/imx/common/include \
8 -Iplat/imx/imx8m/include \
9 -Iplat/imx/imx8m/imx8mn/include
10# Translation tables library
11include lib/xlat_tables_v2/xlat_tables.mk
12
13# Include GICv3 driver files
14include drivers/arm/gic/v3/gicv3.mk
15
Jacky Baicf7a1402019-12-03 10:38:11 +080016IMX_DRAM_SOURCES := plat/imx/imx8m/ddr/dram.c \
Jacky Baid746daa12019-11-25 13:19:37 +080017 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 Baicf7a1402019-12-03 10:38:11 +080021
22
Jacky Bai9bd2f842019-11-28 13:16:33 +080023IMX_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
Sascha Hauerdbf70ff2024-01-18 11:18:24 +010028BL31_SOURCES += common/desc_image_load.c \
29 plat/imx/common/imx8_helpers.S \
Jacky Bai9bd2f842019-11-28 13:16:33 +080030 plat/imx/imx8m/gpc_common.c \
Andrey Zhizhikin10a4d862022-09-26 22:25:33 +020031 plat/imx/imx8m/imx_hab.c \
Jacky Bai9bd2f842019-11-28 13:16:33 +080032 plat/imx/imx8m/imx_aipstz.c \
33 plat/imx/imx8m/imx_rdc.c \
34 plat/imx/imx8m/imx8m_caam.c \
Marco Felsch76401342023-07-24 15:05:58 +020035 plat/imx/imx8m/imx8m_ccm.c \
Jacky Bai3c3c2682020-01-07 14:53:54 +080036 plat/imx/imx8m/imx8m_csu.c \
Jacky Bai9bd2f842019-11-28 13:16:33 +080037 plat/imx/imx8m/imx8m_psci_common.c \
Marco Felsch2d6c08f2023-09-05 17:15:35 +020038 plat/imx/imx8m/imx8m_snvs.c \
Jacky Bai9bd2f842019-11-28 13:16:33 +080039 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 \
Sascha Hauereb3d2ee2024-01-18 08:47:06 +010045 plat/imx/common/imx_common.c \
Jacky Bai9bd2f842019-11-28 13:16:33 +080046 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 \
Jacky Baicf7a1402019-12-03 10:38:11 +080051 ${IMX_DRAM_SOURCES} \
Jacky Bai9bd2f842019-11-28 13:16:33 +080052 ${IMX_GIC_SOURCES} \
53 ${XLAT_TABLES_LIB_SRCS}
54
Marco Felsch82cb8342022-07-04 12:18:34 +020055ENABLE_PIE := 1
Jacky Bai9bd2f842019-11-28 13:16:33 +080056USE_COHERENT_MEM := 1
57RESET_TO_BL31 := 1
58A53_DISABLE_NON_TEMPORAL_HINT := 0
59
60ERRATA_A53_835769 := 1
61ERRATA_A53_843419 := 1
62ERRATA_A53_855873 := 1
63
Marco Felsch44853af2024-01-09 14:59:20 +010064ifneq (${PRELOADED_BL33_BASE},)
65$(eval $(call add_define_val,PLAT_NS_IMAGE_OFFSET,${PRELOADED_BL33_BASE}))
66endif
67
Jacky Bai9bd2f842019-11-28 13:16:33 +080068BL32_BASE ?= 0xbe000000
69$(eval $(call add_define,BL32_BASE))
70
71BL32_SIZE ?= 0x2000000
72$(eval $(call add_define,BL32_SIZE))
73
74IMX_BOOT_UART_BASE ?= 0x30890000
Marco Felsch409eb8b2023-08-02 08:11:35 +020075ifeq (${IMX_BOOT_UART_BASE},auto)
76 override IMX_BOOT_UART_BASE := 0
77endif
Jacky Bai9bd2f842019-11-28 13:16:33 +080078$(eval $(call add_define,IMX_BOOT_UART_BASE))
Peng Fan61adab72021-03-25 18:46:20 +080079
Jacky Bai210ec7d2022-03-28 16:11:23 +080080EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
81ifeq (${SDEI_SUPPORT}, 1)
82BL31_SOURCES += plat/imx/common/imx_ehf.c \
83 plat/imx/common/imx_sdei.c
84endif
Ji Luoe329b3d2020-02-20 23:47:21 +080085
86ifeq (${SPD},trusty)
87 BL31_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
88endif