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