xref: /rk3399_ARM-atf/services/spd/opteed/opteed.mk (revision 6fb6bee1dfd7fd896c44cc21b02b4ef3aad3bbd0)
1#
2# Copyright (c) 2013-2023, ARM Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7OPTEED_DIR		:=	services/spd/opteed
8SPD_INCLUDES		:=
9
10SPD_SOURCES		:=	services/spd/opteed/opteed_common.c	\
11				services/spd/opteed/opteed_helpers.S	\
12				services/spd/opteed/opteed_main.c	\
13				services/spd/opteed/opteed_pm.c
14
15NEED_BL32		:=	yes
16
17# WARNING: This enables loading of OP-TEE via an SMC, which can be potentially
18# insecure. This removes the boundary between the startup of the secure and
19# non-secure worlds until the point where this SMC is invoked. Only use this
20# setting if you can ensure that the non-secure OS can remain trusted up until
21# the point where this SMC is invoked.
22OPTEE_ALLOW_SMC_LOAD		:=	0
23ifeq ($(OPTEE_ALLOW_SMC_LOAD),1)
24ifeq ($(PLAT_XLAT_TABLES_DYNAMIC),0)
25$(error When OPTEE_ALLOW_SMC_LOAD=1, PLAT_XLAT_TABLES_DYNAMIC must also be 1)
26endif
27$(warning "OPTEE_ALLOW_SMC_LOAD is enabled which may result in an insecure \
28	platform")
29$(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC))
30$(eval $(call add_define,OPTEE_ALLOW_SMC_LOAD))
31include lib/libfdt/libfdt.mk
32endif
33
34CROS_WIDEVINE_SMC		:=	0
35ifeq ($(CROS_WIDEVINE_SMC),1)
36ifeq ($(OPTEE_ALLOW_SMC_LOAD),0)
37$(error When CROS_WIDEVINE_SMC=1, OPTEE_ALLOW_SMC_LOAD must also be 1)
38endif
39$(eval $(call add_define,CROS_WIDEVINE_SMC))
40endif
41