Jens Wiklander | c288886 | 2014-08-04 15:39:58 +0200 | [diff] [blame] | 1 | # |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 2 | # Copyright (c) 2013-2023, ARM Limited and Contributors. All rights reserved. |
Jens Wiklander | c288886 | 2014-08-04 15:39:58 +0200 | [diff] [blame] | 3 | # |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | # SPDX-License-Identifier: BSD-3-Clause |
Jens Wiklander | c288886 | 2014-08-04 15:39:58 +0200 | [diff] [blame] | 5 | # |
| 6 | |
| 7 | OPTEED_DIR := services/spd/opteed |
| 8 | SPD_INCLUDES := |
| 9 | |
| 10 | SPD_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 | |
| 15 | NEED_BL32 := yes |
Sumit Garg | 594b357 | 2019-08-05 14:34:48 +0530 | [diff] [blame] | 16 | |
| 17 | # required so that optee code can control access to the timer registers |
| 18 | NS_TIMER_SWITCH := 1 |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 19 | |
| 20 | # WARNING: This enables loading of OP-TEE via an SMC, which can be potentially |
| 21 | # insecure. This removes the boundary between the startup of the secure and |
| 22 | # non-secure worlds until the point where this SMC is invoked. Only use this |
| 23 | # setting if you can ensure that the non-secure OS can remain trusted up until |
| 24 | # the point where this SMC is invoked. |
| 25 | OPTEE_ALLOW_SMC_LOAD := 0 |
| 26 | ifeq ($(OPTEE_ALLOW_SMC_LOAD),1) |
| 27 | ifeq ($(PLAT_XLAT_TABLES_DYNAMIC),0) |
| 28 | $(error When OPTEE_ALLOW_SMC_LOAD=1, PLAT_XLAT_TABLES_DYNAMIC must also be 1) |
| 29 | endif |
| 30 | $(warning "OPTEE_ALLOW_SMC_LOAD is enabled which may result in an insecure \ |
| 31 | platform") |
| 32 | $(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC)) |
| 33 | $(eval $(call add_define,OPTEE_ALLOW_SMC_LOAD)) |
Jeffrey Kardatzke | 4552189 | 2023-02-09 10:45:35 -0800 | [diff] [blame] | 34 | include lib/libfdt/libfdt.mk |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 35 | endif |
Yi Chou | 097051f | 2023-04-11 15:57:08 +0800 | [diff] [blame] | 36 | |
| 37 | CROS_WIDEVINE_SMC := 0 |
| 38 | ifeq ($(CROS_WIDEVINE_SMC),1) |
| 39 | ifeq ($(OPTEE_ALLOW_SMC_LOAD),0) |
| 40 | $(error When CROS_WIDEVINE_SMC=1, OPTEE_ALLOW_SMC_LOAD must also be 1) |
| 41 | endif |
| 42 | $(eval $(call add_define,CROS_WIDEVINE_SMC)) |
| 43 | endif |