tc: Support building TF-A on TC4 platform

This includes SCP build test on TC4 platform.

Change-Id: I8560a2083c6bf57dd71d78058b361d714c8125d8
Signed-off-by: Leo Yan <leo.yan@arm.com>
diff --git a/group/tf-l1-build-plat/fvp-tc4-tbb:nil b/group/tf-l1-build-plat/fvp-tc4-tbb:nil
new file mode 100644
index 0000000..e337bb0
--- /dev/null
+++ b/group/tf-l1-build-plat/fvp-tc4-tbb:nil
@@ -0,0 +1,5 @@
+#
+# Copyright (c) 2024, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
diff --git a/run_config/fvp-linux.tc b/run_config/fvp-linux.tc
index 1d01323..11b116e 100644
--- a/run_config/fvp-linux.tc
+++ b/run_config/fvp-linux.tc
@@ -18,15 +18,15 @@
 		# Pick the appropriate binary based on target platform variant
 		if [ $plat_variant -eq 2 ]; then
 			url="$scp_mcp_downloads/totalcompute/tc$plat_variant/platform_variant_0/release/tc$plat_variant-bl1.bin" saveas="scp_rom.bin" fetch_file
-		elif [ $plat_variant -eq 3 ]; then
+		elif [ $plat_variant -eq 3 ] || [ $plat_variant -eq 4 ]; then
 			url="$tfa_downloads/total_compute/tc$plat_variant/scp/tc$plat_variant-bl1.bin" saveas="scp_rom.bin" fetch_file
 		fi
 
 		archive_file "scp_rom.bin"
 	fi
 
-	# RSE is applicable to TC2 and TC3
-	if [ $plat_variant -eq 2 ] || [ $plat_variant -eq 3 ]; then
+	# RSE is applicable to TC2, TC3 and TC4
+	if [ $plat_variant -eq 2 ] || [ $plat_variant -eq 3 ] || [ $plat_variant -eq 4 ]; then
 
 	    # Hold RSE terminal_uart_ap
 	    uart="1" port="5003" file="hold_uart.exp" track_expect
diff --git a/script/tf-coverity/tf-cov-make b/script/tf-coverity/tf-cov-make
index 7cb46c7..977b25a 100755
--- a/script/tf-coverity/tf-cov-make
+++ b/script/tf-coverity/tf-cov-make
@@ -360,6 +360,8 @@
 clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=3 ${ARM_TBB_OPTIONS} PLATFORM_TEST=rse-nv-counters
 clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=3 ${ARM_TBB_OPTIONS} PLATFORM_TEST=tfm-testsuite \
     TF_M_TESTS_PATH=$(pwd)/../tf-m-tests TF_M_EXTRAS_PATH=$(pwd)/../tf-m-extras
+clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=4 ${ARM_TBB_OPTIONS} \
+    PLAT_MHU_VERSION=3
 
 #
 # Morello platform
diff --git a/tc_utils.sh b/tc_utils.sh
index e237ad9..a310f80 100644
--- a/tc_utils.sh
+++ b/tc_utils.sh
@@ -29,6 +29,8 @@
 	rse_revision="4ab7a20d"
 elif [ $plat_variant -eq 3 ]; then
 	rse_revision="cd8ece72a"
+elif [ $plat_variant -eq 4 ]; then
+	rse_revision="213c553bf"
 fi
 
 # Hafnium build repo containing Secure hafnium binaries
diff --git a/tf_config/fvp-tc4-tbb b/tf_config/fvp-tc4-tbb
new file mode 100644
index 0000000..d677768
--- /dev/null
+++ b/tf_config/fvp-tc4-tbb
@@ -0,0 +1,11 @@
+ARM_GPT_SUPPORT=1
+ARM_ROTPK_LOCATION=devel_rsa
+BRANCH_PROTECTION=1
+CROSS_COMPILE=aarch64-none-elf-
+CTX_INCLUDE_PAUTH_REGS=1
+GENERATE_COT=1
+PLAT=tc
+ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem
+SCP_BL2=/dev/null
+TARGET_PLATFORM=4
+TRUSTED_BOARD_BOOT=1