fvp: Add UEFI authenticaton switch

Add TS_UEFI_AUTH_VAR compile switch to be able to enable
authentication in smm-gateway SP and the uefi-test deployment.

Signed-off-by: Gabor Toth <gabor.toth2@arm.com>
Change-Id: If72c58c2e4759ba5c673bd2071269803fb8d8483
diff --git a/fvp-psa-sp.mk b/fvp-psa-sp.mk
index 848ad53..fb582e7 100644
--- a/fvp-psa-sp.mk
+++ b/fvp-psa-sp.mk
@@ -5,10 +5,21 @@
 MEASURED_BOOT_FTPM		?= n
 TS_SMM_GATEWAY			?= y
 TS_UEFI_TESTS			?= n
+TS_UEFI_AUTH_VAR 		?= n
 # Supported values: embedded, fip
 SP_PACKAGING_METHOD		?= embedded
 SPMC_TESTS			?= n
 
+# UEFI variable authentication needs either uefi tests or smm gateway SP
+ifeq ($(TS_UEFI_AUTH_VAR),y)
+ifeq ($(TS_UEFI_TESTS)-$(TS_SMM_GATEWAY),n-n)
+$(error TS_UEFI_AUTH_VAR requires at least one of TS_UEFI_TESTS or TS_SMM_GATEWAY to be enabled!)
+endif
+
+SP_SMM_GATEWAY_EXTRA_FLAGS += -DUEFI_AUTH_VAR=ON
+TS_APP_UEFI_TEST_EXTRA_FLAGS += -DUEFI_AUTH_VAR=ON
+endif
+
 # Enable the "HArdware Volatile Entropy Gathering and Expansion" daemon to
 # overcome low-entropy conditions in the FVP
 BR2_PACKAGE_HAVEGED		?= y