Add Morello platform to the CI
Add an SCP boot test config for the Morello platform.
Signed-off-by: Anurag Koul <anurag.koul@arm.com>
Change-Id: Ia64359a8793d9f4c7bc5bbc1838e5ed834d3b27f
diff --git a/group/scp-boot-tests/fvp-morello,fvp-morello-tbb:fvp-linux.morello-fip.morello-morello-debug b/group/scp-boot-tests/fvp-morello,fvp-morello-tbb:fvp-linux.morello-fip.morello-morello-debug
new file mode 100644
index 0000000..45065d8
--- /dev/null
+++ b/group/scp-boot-tests/fvp-morello,fvp-morello-tbb:fvp-linux.morello-fip.morello-morello-debug
@@ -0,0 +1,6 @@
+#
+# Copyright (c) 2021 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
diff --git a/model/morello-ports.awk b/model/morello-ports.awk
new file mode 100644
index 0000000..35a5bf5
--- /dev/null
+++ b/model/morello-ports.awk
@@ -0,0 +1,15 @@
+#
+# Copyright (c) 2021 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+/terminal_uart0/ { ports[0] = $NF }
+/terminal_uart_ap/ { ports[1] = $NF }
+/terminal_uart_aon/ { ports[2] = $NF }
+END {
+ for (i = 0; i < num_uarts; i++) {
+ if (ports[i] != "")
+ print "ports[" i "]=" ports[i]
+ }
+}
diff --git a/model/morello.sh b/model/morello.sh
new file mode 100644
index 0000000..cc78c9c
--- /dev/null
+++ b/model/morello.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2021 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_Morello"
+
+cat <<EOF >"$model_param_file"
+--data Morello_Top.css.scp.armcortexm7ct=$archive/scp_rom.bin@0x0
+--data Morello_Top.css.mcp.armcortexm7ct=$archive/mcp_rom.bin@0x0
+-C Morello_Top.soc.scp_qspi_loader.fname=$scp_fw_bin
+-C Morello_Top.soc.mcp_qspi_loader.fname=$mcp_fw_bin
+--data $uefi_bin@${uefi_addr:?}
+-C board.virtioblockdevice.image_path=$busybox_bin
+${uart1_out+-C css.pl011_uart_ap.out_file=$uart1_out}
+${uart1_out+-C css.pl011_uart_ap.unbuffered_output=1}
+${uart2_out+-C css.scp.pl011_uart_scp.out_file=$uart2_out}
+${uart0_out+-C css.mcp.pl011_uart0_mcp.out_file=$uart0_out}
+-C css.scp.armcortexm7ct.INITVTOR=0x0
+-C css.mcp.armcortexm7ct.INITVTOR=0x0
+-C board.virtio_rng.enabled=1
+-C board.virtio_rng.seed=0
+-C displayController=0
+-C num_clusters=2
+-C num_cores=2
+-C css.diagnostics=4
+EOF
diff --git a/morello_utils.sh b/morello_utils.sh
new file mode 100644
index 0000000..d1f00cf
--- /dev/null
+++ b/morello_utils.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2021 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+source "$ci_root/fvp_utils.sh"
+
+morello_prebuilts=${morello_prebuilts:="$tfa_downloads/morello"}
+
+uefi_addr=0x14200000
diff --git a/run_config/fvp-fip.morello b/run_config/fvp-fip.morello
new file mode 100644
index 0000000..29e6c79
--- /dev/null
+++ b/run_config/fvp-fip.morello
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2021 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+post_tf_build() {
+
+ # Create FIP for SCP
+ "$fiptool" create --soc-fw "$tf_root/build/morello/$bin_mode/bl31.bin" --scp-fw "$archive/scp_ramfw_fvp.bin" "scp_fw.bin"
+ archive_file "scp_fw.bin"
+
+ # Create FIP for MCP, this needs fixed uuid for now
+ "$fiptool" create --blob uuid=54464222-a4cf-4bf8-b1b6-cee7dade539e,file="$archive/mcp_ramfw_fvp.bin" "mcp_fw.bin"
+ archive_file "mcp_fw.bin"
+}
diff --git a/run_config/fvp-linux.morello b/run_config/fvp-linux.morello
new file mode 100644
index 0000000..8534b07
--- /dev/null
+++ b/run_config/fvp-linux.morello
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2021 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+fetch_tf_resource() {
+ uart="1" set_primary="1" file="linux-rd-busybox.exp" track_expect
+
+ url="$morello_prebuilts/grub-busybox.img" saveas="busybox.bin" fetch_file
+
+ archive_file "busybox.bin"
+
+ payload_type="linux" gen_fvp_yaml_template
+}
diff --git a/run_config/fvp-morello b/run_config/fvp-morello
new file mode 100644
index 0000000..b52088d
--- /dev/null
+++ b/run_config/fvp-morello
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2021 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+fetch_tf_resource() {
+ uefi_ci_bin_url="$morello_prebuilts/uefi.bin" get_uefi_bin
+
+ # Hold terminal_uart_aon (SCP terminal)
+ uart="2" file="hold_uart.exp" track_expect
+}
+
+post_fetch_tf_resource() {
+ local model="morello"
+
+ model="morello" \
+ model_version="0.10" \
+ model_build="481" \
+ gen_model_params
+ set_run_env "ports_script" "$ci_root/model/morello-ports.awk"
+ set_run_env "num_uarts" "3"
+
+ uart="1" set_expect_variable ""skip_early_boot_msgs"" "1"
+ uart="1" set_expect_variable "num_cpus" "4"
+
+ model="$model" gen_fvp_yaml
+}
diff --git a/scp_config/fvp-morello b/scp_config/fvp-morello
new file mode 100644
index 0000000..fa070eb
--- /dev/null
+++ b/scp_config/fvp-morello
@@ -0,0 +1,3 @@
+CC=/arm/pdsw/downloads/scp-models/tools/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-gcc
+PRODUCT=morello
+LOG_LEVEL=INFO
diff --git a/script/build_package.sh b/script/build_package.sh
index 1bfaee2..5088d13 100755
--- a/script/build_package.sh
+++ b/script/build_package.sh
@@ -178,12 +178,18 @@
*/scp_ramfw/*)
cp $file $to/scp_ram.$ext
;;
+ */scp_ramfw_fvp/*)
+ cp $file $to/scp_ramfw_fvp.$ext
+ ;;
*/scp_romfw/*)
cp $file $to/scp_rom.$ext
;;
*/mcp_ramfw/*)
cp $file $to/mcp_ram.$ext
;;
+ */mcp_ramfw_fvp/*)
+ cp $file $to/mcp_ramfw_fvp.$ext
+ ;;
*/mcp_romfw/*)
cp $file $to/mcp_rom.$ext
;;
diff --git a/tf_config/fvp-morello-tbb b/tf_config/fvp-morello-tbb
new file mode 100644
index 0000000..fd08b5d
--- /dev/null
+++ b/tf_config/fvp-morello-tbb
@@ -0,0 +1,10 @@
+ARM_ROTPK_LOCATION=devel_rsa
+CREATE_KEYS=1
+CROSS_COMPILE=aarch64-none-elf-
+GENERATE_COT=1
+PLAT=morello
+ENABLE_MORELLO_CAP=0
+CSS_USE_SCMI_SDS_DRIVER=1
+SCP_BL2=/dev/null
+ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem
+TRUSTED_BOARD_BOOT=1