blob: 00546bbbddc01b7de761e72a500a22b6e7ee5efe [file] [log] [blame]
Balint Dobszay1bf41f52022-05-30 12:56:38 +02001FVP_USE_BASE_PLAT ?= y
2FVP_VIRTFS_ENABLE ?= y
3FVP_VIRTFS_AUTOMOUNT ?= y
4MEASURED_BOOT ?= y
5MEASURED_BOOT_FTPM ?= n
6TS_SMM_GATEWAY ?= y
Imre Kiscef118b2023-01-11 18:01:46 +01007TS_UEFI_TESTS ?= n
Balint Dobszaya59865b2022-09-13 16:47:27 +02008# Supported values: embedded, fip
9SP_PACKAGING_METHOD ?= embedded
Imre Kiscef118b2023-01-11 18:01:46 +010010SPMC_TESTS ?= n
Balint Dobszay1bf41f52022-05-30 12:56:38 +020011
Balint Dobszay6c7dfb22023-03-16 14:48:33 +010012# Enable the "HArdware Volatile Entropy Gathering and Expansion" daemon to
13# overcome low-entropy conditions in the FVP
14BR2_PACKAGE_HAVEGED ?= y
Imre Kisd545be12023-04-05 13:43:53 +020015TS_RPC_UUID ?= n
Balint Dobszay6c7dfb22023-03-16 14:48:33 +010016
Imre Kis874a2dd2023-01-09 17:01:22 +010017# TS SP configurations
18DEFAULT_SP_CONFIG ?= default-opteesp
19SP_BLOCK_STORAGE_CONFIG ?= $(DEFAULT_SP_CONFIG)
20SP_PSA_ITS_CONFIG ?= $(DEFAULT_SP_CONFIG)
21SP_PSA_PS_CONFIG ?= $(DEFAULT_SP_CONFIG)
22SP_PSA_CRYPTO_CONFIG ?= $(DEFAULT_SP_CONFIG)
23SP_PSA_ATTESTATION_CONFIG ?= $(DEFAULT_SP_CONFIG)
24SP_SMM_GATEWAY_CONFIG ?= $(DEFAULT_SP_CONFIG)
25
Balint Dobszay1bf41f52022-05-30 12:56:38 +020026TF_A_FLAGS ?= \
27 BL32=$(OPTEE_OS_PAGER_V2_BIN) \
28 BL33=$(EDK2_BIN) \
29 PLAT=fvp \
30 SPD=spmd \
31 SPMD_SPM_AT_SEL2=0 \
Balint Dobszaydb9b8f02022-09-01 11:20:23 +020032 ARM_SPMC_MANIFEST_DTS=$(ROOT)/build/fvp/spmc_manifest.dts \
33 $(TF_A_FIP_SP_FLAGS)
Balint Dobszay1bf41f52022-05-30 12:56:38 +020034
Balint Dobszay3730e012023-06-02 11:40:41 +020035LINUX_DEFCONFIG_COMMON_FILES ?= $(CURDIR)/kconfigs/fvp_trusted-services.conf
36
Balint Dobszay1bf41f52022-05-30 12:56:38 +020037include fvp.mk
38include trusted-services.mk
39
Imre Kisefd2ece2023-04-05 13:35:28 +020040# The macros used in bl2_sp_list.dts and spmc_manifest.dts has to be passed to
41# TF-A because it handles the preprocessing of these files.
42define add-dtc-define
43DTC_CPPFLAGS+=-D$1=$(subst y,1,$(subst n,0,$($1)))
44endef
45
46ifeq ($(SP_PACKAGING_METHOD),fip)
47$(eval $(call add-dtc-define,SPMC_TESTS))
48$(eval $(call add-dtc-define,TS_SMM_GATEWAY))
Imre Kisd545be12023-04-05 13:43:53 +020049$(eval $(call add-dtc-define,TS_RPC_UUID))
Imre Kisefd2ece2023-04-05 13:35:28 +020050
51TF_A_EXPORTS += DTC_CPPFLAGS="$(DTC_CPPFLAGS)"
52endif
53
Balint Dobszay1bf41f52022-05-30 12:56:38 +020054OPTEE_OS_COMMON_EXTRA_FLAGS += \
55 CFG_SECURE_PARTITION=y \
56 CFG_CORE_SEL1_SPMC=y \
57 CFG_CORE_HEAP_SIZE=131072 \
58 CFG_DT=y \
59 CFG_MAP_EXT_DT_SECURE=y
60
Jelle Sels3a937c52023-02-01 09:25:52 +010061
62ifeq ($(TS_RPC_UUID),y)
63TS_RPC_UUID="bdcd76d7-825e-4751-963b-86d4f84943ac"
64SP_BLOCK_STORAGE_EXTRA_FLAGS +=-DTS_RPC_UUID=$(TS_RPC_UUID)
65SP_PSA_ITS_EXTRA_FLAGS +=-DTS_RPC_UUID=$(TS_RPC_UUID)
66SP_PSA_PS_EXTRA_FLAGS +=-DTS_RPC_UUID=$(TS_RPC_UUID)
67SP_PSA_CRYPTO_EXTRA_FLAGS +=-DTS_RPC_UUID=$(TS_RPC_UUID)
68SP_PSA_ATTESTATION_EXTRA_FLAGS +=-DTS_RPC_UUID=$(TS_RPC_UUID)
69SP_SMM_GATEWAY_EXTRA_FLAGS +=-DTS_RPC_UUID=$(TS_RPC_UUID)
70endif
71
Balint Dobszay1bf41f52022-05-30 12:56:38 +020072# The boot order of the SPs is determined by the order of calls here. This is
73# due to the SPMC not (yet) supporting the boot order field of the SP manifest.
Imre Kis0dbd3df2023-04-05 13:31:22 +020074ifeq ($(SPMC_TESTS),n)
75# PSA SPs
Imre Kis874a2dd2023-01-09 17:01:22 +010076$(eval $(call build-sp,block-storage,config/$(SP_BLOCK_STORAGE_CONFIG),63646e80-eb52-462f-ac4f-8cdf3987519c,$(SP_BLOCK_STORAGE_EXTRA_FLAGS)))
77$(eval $(call build-sp,internal-trusted-storage,config/$(SP_PSA_ITS_CONFIG),dc1eef48-b17a-4ccf-ac8b-dfcff7711b14,$(SP_PSA_ITS_EXTRA_FLAGS)))
78$(eval $(call build-sp,protected-storage,config/$(SP_PSA_PS_CONFIG),751bf801-3dde-4768-a514-0f10aeed1790,$(SP_PSA_PS_EXTRA_FLAGS)))
79$(eval $(call build-sp,crypto,config/$(SP_PSA_CRYPTO_CONFIG),d9df52d5-16a2-4bb2-9aa4-d26d3b84e8c0,$(SP_PSA_CRYPTO_EXTRA_FLAGS)))
Balint Dobszay1bf41f52022-05-30 12:56:38 +020080ifeq ($(MEASURED_BOOT),y)
Imre Kis874a2dd2023-01-09 17:01:22 +010081$(eval $(call build-sp,attestation,config/$(SP_PSA_ATTESTATION_CONFIG),a1baf155-8876-4695-8f7c-54955e8db974,$(SP_PSA_ATTESTATION_EXTRA_FLAGS)))
Balint Dobszay1bf41f52022-05-30 12:56:38 +020082endif
83ifeq ($(TS_SMM_GATEWAY),y)
Imre Kis874a2dd2023-01-09 17:01:22 +010084$(eval $(call build-sp,smm-gateway,config/$(SP_SMM_GATEWAY_CONFIG),ed32d533-99e6-4209-9cc0-2d72cdd998a7,$(SP_SMM_GATEWAY_EXTRA_FLAGS)))
Balint Dobszay1bf41f52022-05-30 12:56:38 +020085endif
Imre Kis0dbd3df2023-04-05 13:31:22 +020086else
87# SPMC test SPs
88OPTEE_OS_COMMON_EXTRA_FLAGS += CFG_SPMC_TESTS=y
89$(eval $(call build-sp,spm-test1,opteesp,5c9edbc3-7b3a-4367-9f83-7c191ae86a37,$(SP_SPMC_TEST_EXTRA_FLAGS)))
90$(eval $(call build-sp,spm-test2,opteesp,7817164c-c40c-4d1a-867a-9bb2278cf41a,$(SP_SPMC_TEST_EXTRA_FLAGS)))
91$(eval $(call build-sp,spm-test3,opteesp,23eb0100-e32a-4497-9052-2f11e584afa6,$(SP_SPMC_TEST_EXTRA_FLAGS)))
Imre Kisd545be12023-04-05 13:43:53 +020092ifeq ($(TS_RPC_UUID),y)
Imre Kis0dbd3df2023-04-05 13:31:22 +020093$(eval $(call build-sp,spm-test4,opteesp,423762ed-7772-406f-99d8-0c27da0abbf8,$(SP_SPMC_TEST_EXTRA_FLAGS)))
94endif
Imre Kisd545be12023-04-05 13:43:53 +020095endif
Balint Dobszayc0b8fdf2022-06-02 14:41:54 +020096
Imre Kis0dbd3df2023-04-05 13:31:22 +020097# Linux user space applications
98ifeq ($(SPMC_TESTS),n)
Balint Dobszayc0b8fdf2022-06-02 14:41:54 +020099$(eval $(call build-ts-app,libts))
100$(eval $(call build-ts-app,ts-service-test))
101$(eval $(call build-ts-app,psa-api-test/internal_trusted_storage))
102$(eval $(call build-ts-app,psa-api-test/protected_storage))
103$(eval $(call build-ts-app,psa-api-test/crypto))
104ifeq ($(MEASURED_BOOT),y)
105$(eval $(call build-ts-app,psa-api-test/initial_attestation))
106endif
107ifeq ($(TS_UEFI_TESTS),y)
108$(eval $(call build-ts-app,uefi-test))
109endif
Jelle Selsbb5a5362022-07-18 17:07:05 +0200110endif