tc: Add support for TC2 platform
This includes scp-boot-tests, AP boot tests and MISRA checks.
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Change-Id: I65962d77ceb1c034821049e37bb04488278a586e
diff --git a/fvp_utils.sh b/fvp_utils.sh
index 0cfbe52..023a2bc 100644
--- a/fvp_utils.sh
+++ b/fvp_utils.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -98,6 +98,7 @@
[css-sgi575]=";;;"
[tc0]=";;;"
[tc1]=";;;"
+[tc2]=";;;"
)
diff --git a/group/tf-l1-build-plat/fvp-tc2-tbb:nil b/group/tf-l1-build-plat/fvp-tc2-tbb:nil
new file mode 100644
index 0000000..b8939c8
--- /dev/null
+++ b/group/tf-l1-build-plat/fvp-tc2-tbb:nil
@@ -0,0 +1,5 @@
+#
+# Copyright (c) 2022, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
diff --git a/model/tc2.sh b/model/tc2.sh
new file mode 100644
index 0000000..04bcb66
--- /dev/null
+++ b/model/tc2.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2022, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+set_model_path "$warehouse/SysGen/SubSystemModels/$model_version/$model_build/models/$model_flavour/FVP_TC2"
+
+cat <<EOF >"$model_param_file"
+${bl1_bin+-C css.trustedBootROMloader.fname=$bl1_bin}
+${scp_rom_bin+-C css.scp.ROMloader.fname=$scp_rom_bin}
+${fip_bin+-C board.flashloader0.fname=$fip_bin}
+${initrd_bin+--data board.dram=$initrd_bin@${initrd_addr:?}}
+${kernel_bin+--data board.dram=$kernel_bin@${kernel_addr:?}}
+${uart0_out+-C soc.pl011_uart0.out_file=$uart0_out}
+${uart0_out+-C soc.pl011_uart0.unbuffered_output=1}
+${uart1_out+-C soc.pl011_uart1.out_file=$uart1_out}
+${uart1_out+-C soc.pl011_uart1.unbuffered_output=1}
+${rss_rom_file+--data css.rss.cpu=$rss_rom_file@${rss_rom_addr:?}}
+${rss_flash_file+--data css.rss.cpu=$rss_flash_file@${rss_flash_addr:?}}
+EOF
diff --git a/run_config/fvp-tc2 b/run_config/fvp-tc2
new file mode 100644
index 0000000..865d6d0
--- /dev/null
+++ b/run_config/fvp-tc2
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2022, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+post_fetch_tf_resource() {
+ local model="tc2"
+
+ model="tc2" \
+ model_version="11.18" \
+ model_build="17" \
+ gen_model_params
+ set_run_env "ports_script" "$ci_root/model/tc-ports.awk"
+ set_run_env "num_uarts" "2"
+ uart="1" set_expect_variable "num_cpus" "8"
+ model="$model" gen_fvp_yaml
+}
diff --git a/scp_config/fvp-tc0 b/scp_config/fvp-tc0
index e969a51..cc518a9 100644
--- a/scp_config/fvp-tc0
+++ b/scp_config/fvp-tc0
@@ -2,4 +2,4 @@
EXTRA_CONFIG_ARGS+=-DCMAKE_ASM_COMPILER=/arm/pdsw/downloads/scp-models/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc
EXTRA_CONFIG_ARGS+=-DCMAKE_C_COMPILER=/arm/pdsw/downloads/scp-models/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc
EXTRA_CONFIG_ARGS+=-DCMAKE_CXX_COMPILER=/arm/pdsw/downloads/scp-models/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-g++
-EXTRA_CONFIG_ARGS+=-DSCP_LOG_LEVEL=WARN
\ No newline at end of file
+EXTRA_CONFIG_ARGS+=-DSCP_LOG_LEVEL=WARN
diff --git a/scp_config/fvp-tc2 b/scp_config/fvp-tc2
new file mode 100644
index 0000000..9ecde42
--- /dev/null
+++ b/scp_config/fvp-tc2
@@ -0,0 +1,5 @@
+PRODUCT=tc2
+EXTRA_CONFIG_ARGS+=-DCMAKE_ASM_COMPILER=/arm/pdsw/downloads/scp-models/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc
+EXTRA_CONFIG_ARGS+=-DCMAKE_C_COMPILER=/arm/pdsw/downloads/scp-models/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc
+EXTRA_CONFIG_ARGS+=-DCMAKE_CXX_COMPILER=/arm/pdsw/downloads/scp-models/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-g++
+EXTRA_CONFIG_ARGS+=-DSCP_LOG_LEVEL=WARN
diff --git a/script/tf-coverity/tf-cov-make b/script/tf-coverity/tf-cov-make
index f974118..cd6ee58 100755
--- a/script/tf-coverity/tf-cov-make
+++ b/script/tf-coverity/tf-cov-make
@@ -276,6 +276,7 @@
#
make $(common_flags) PLAT=tc TARGET_PLATFORM=0 ${ARM_TBB_OPTIONS} all
make $(common_flags) PLAT=tc TARGET_PLATFORM=1 ${ARM_TBB_OPTIONS} all
+make $(common_flags) PLAT=tc TARGET_PLATFORM=2 ${ARM_TBB_OPTIONS} all
#
# Morello platform
diff --git a/tc_utils.sh b/tc_utils.sh
index 71cb535..d6b141f 100644
--- a/tc_utils.sh
+++ b/tc_utils.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -18,6 +18,8 @@
initrd_addr=0x8000000
kernel_addr=0x80000
scp_ram_addr=0x0bd80000
+rss_rom_addr=0x11000000
+rss_flash_addr=0x31000000
# Hafnium build repo containing Secure hafnium binaries
spm_secure_out_dir=secure_tc_clang
diff --git a/tf_config/fvp-tc2-tbb b/tf_config/fvp-tc2-tbb
new file mode 100644
index 0000000..fa4c4db
--- /dev/null
+++ b/tf_config/fvp-tc2-tbb
@@ -0,0 +1,8 @@
+ARM_ROTPK_LOCATION=devel_rsa
+CROSS_COMPILE=aarch64-none-elf-
+GENERATE_COT=1
+PLAT=tc
+ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem
+SCP_BL2=/dev/null
+TARGET_PLATFORM=2
+TRUSTED_BOARD_BOOT=1