blob: b7e16ae602021122e3352226c7bba620f29946ab [file] [log] [blame]
Pankaj Gupta988bbb22020-12-09 14:02:40 +05301#
2# Copyright 2018-2021 NXP
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#
7
8###############################################################################
9# Flow begins in BL2 at EL3 mode
Arvind Ram Prakash11b9b492022-11-22 14:41:00 -060010RESET_TO_BL2 := 1
Pankaj Gupta988bbb22020-12-09 14:02:40 +053011
12# Though one core is powered up by default, there are
13# platform specific ways to release more than one core
14COLD_BOOT_SINGLE_CPU := 0
15
16PROGRAMMABLE_RESET_ADDRESS := 1
17
18USE_COHERENT_MEM := 0
19
20# Use generic OID definition (tbbr_oid.h)
21USE_TBBR_DEFS := 1
22
23PLAT_XLAT_TABLES_DYNAMIC := 0
24
25ENABLE_SVE_FOR_NS := 0
26
27ENABLE_STACK_PROTECTOR := 0
28
29ERROR_DEPRECATED := 0
30
31LS_DISABLE_TRUSTED_WDOG := 1
32
33# On ARM platforms, separate the code and read-only data sections to allow
34# mapping the former as executable and the latter as execute-never.
35SEPARATE_CODE_AND_RODATA := 1
36
37# Enable new version of image loading on ARM platforms
38LOAD_IMAGE_V2 := 1
39
40RCW := ""
41
42ifneq (${SPD},none)
43$(eval $(call add_define, NXP_LOAD_BL32))
44endif
45
46###############################################################################
47
48PLAT_TOOL_PATH := tools/nxp
49CREATE_PBL_TOOL_PATH := ${PLAT_TOOL_PATH}/create_pbl
50PLAT_SETUP_PATH := ${PLAT_PATH}/common/setup
51
52PLAT_INCLUDES += -I${PLAT_SETUP_PATH}/include \
53 -Iinclude/plat/arm/common \
54 -Iinclude/drivers/arm \
55 -Iinclude/lib \
56 -Iinclude/drivers/io \
57 -Ilib/psci
58
59# Required without TBBR.
60# To include the defines for DDR PHY Images.
61PLAT_INCLUDES += -Iinclude/common/tbbr
62
63include ${PLAT_SETUP_PATH}/core.mk
64PLAT_BL_COMMON_SOURCES += ${CPU_LIBS} \
65 plat/nxp/common/setup/ls_err.c \
66 plat/nxp/common/setup/ls_common.c
67
68ifneq (${ENABLE_STACK_PROTECTOR},0)
69PLAT_BL_COMMON_SOURCES += ${PLAT_SETUP_PATH}/ls_stack_protector.c
70endif
71
72include lib/xlat_tables_v2/xlat_tables.mk
73
74PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS}
75
76BL2_SOURCES += drivers/io/io_fip.c \
77 drivers/io/io_memmap.c \
78 drivers/io/io_storage.c \
79 common/desc_image_load.c \
80 plat/nxp/common/setup/ls_image_load.c \
81 plat/nxp/common/setup/ls_io_storage.c \
82 plat/nxp/common/setup/ls_bl2_el3_setup.c \
83 plat/nxp/common/setup/${ARCH}/ls_bl2_mem_params_desc.c
84
85BL31_SOURCES += plat/nxp/common/setup/ls_bl31_setup.c \
86
87ifeq (${LS_EL3_INTERRUPT_HANDLER}, yes)
88$(eval $(call add_define, LS_EL3_INTERRUPT_HANDLER))
89BL31_SOURCES += plat/nxp/common/setup/ls_interrupt_mgmt.c
90endif
91
92ifeq (${TEST_BL31}, 1)
93BL31_SOURCES += ${TEST_SOURCES}
94endif
95
96# Verify build config
97# -------------------
98
99ifneq (${LOAD_IMAGE_V2}, 1)
100 $(error Error: Layerscape needs LOAD_IMAGE_V2=1)
101else
102$(eval $(call add_define,LOAD_IMAGE_V2))
103endif
104
105include $(CREATE_PBL_TOOL_PATH)/create_pbl.mk