1*91f16700Schasinglulu# 2*91f16700Schasinglulu# Copyright (c) 2013-2023, ARM Limited and Contributors. All rights reserved. 3*91f16700Schasinglulu# 4*91f16700Schasinglulu# SPDX-License-Identifier: BSD-3-Clause 5*91f16700Schasinglulu# 6*91f16700Schasinglulu 7*91f16700SchasingluluOPTEED_DIR := services/spd/opteed 8*91f16700SchasingluluSPD_INCLUDES := 9*91f16700Schasinglulu 10*91f16700SchasingluluSPD_SOURCES := services/spd/opteed/opteed_common.c \ 11*91f16700Schasinglulu services/spd/opteed/opteed_helpers.S \ 12*91f16700Schasinglulu services/spd/opteed/opteed_main.c \ 13*91f16700Schasinglulu services/spd/opteed/opteed_pm.c 14*91f16700Schasinglulu 15*91f16700SchasingluluNEED_BL32 := yes 16*91f16700Schasinglulu 17*91f16700Schasinglulu# required so that optee code can control access to the timer registers 18*91f16700SchasingluluNS_TIMER_SWITCH := 1 19*91f16700Schasinglulu 20*91f16700Schasinglulu# WARNING: This enables loading of OP-TEE via an SMC, which can be potentially 21*91f16700Schasinglulu# insecure. This removes the boundary between the startup of the secure and 22*91f16700Schasinglulu# non-secure worlds until the point where this SMC is invoked. Only use this 23*91f16700Schasinglulu# setting if you can ensure that the non-secure OS can remain trusted up until 24*91f16700Schasinglulu# the point where this SMC is invoked. 25*91f16700SchasingluluOPTEE_ALLOW_SMC_LOAD := 0 26*91f16700Schasingluluifeq ($(OPTEE_ALLOW_SMC_LOAD),1) 27*91f16700Schasingluluifeq ($(PLAT_XLAT_TABLES_DYNAMIC),0) 28*91f16700Schasinglulu$(error When OPTEE_ALLOW_SMC_LOAD=1, PLAT_XLAT_TABLES_DYNAMIC must also be 1) 29*91f16700Schasingluluendif 30*91f16700Schasinglulu$(warning "OPTEE_ALLOW_SMC_LOAD is enabled which may result in an insecure \ 31*91f16700Schasinglulu platform") 32*91f16700Schasinglulu$(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC)) 33*91f16700Schasinglulu$(eval $(call add_define,OPTEE_ALLOW_SMC_LOAD)) 34*91f16700Schasingluluinclude lib/libfdt/libfdt.mk 35*91f16700Schasingluluendif 36