opteed.mk 1.4 KB

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