Add utility files for dual RD-N1-Edge

In preparation to add dual-chip RD-N1-Edge platform to SCP and TF-A CI,
add config files for dual RD-N1-Edge FVP.

Change-Id: I01310c15adbd3683936db2f5c28f1581ea26d843
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
diff --git a/model/css-rdn1edgex2.sh b/model/css-rdn1edgex2.sh
new file mode 100644
index 0000000..61d4cef
--- /dev/null
+++ b/model/css-rdn1edgex2.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+set_model_path "$warehouse/SysGen/SubSystemModels/11.10/36/models/Linux64_GCC-6.4/FVP_RD_N1_edge_dual"
+
+cat <<EOF >"$model_param_file"
+-C css0.cmn600.force_on_from_start=1
+-C css0.cmn600.mesh_config_file=$warehouse/SysGen/SubSystemModels/11.10/36/models/Linux64_GCC-6.4/RD_N1_E1_cmn600_ccix.yml
+-C css0.mcp.ROMloader.fname=$mcp_rom_bin
+-C css0.scp.ROMloader.fname=$scp_rom_bin
+--data css0.scp.armcortexm7ct=$scp_ram_bin@$scp_ram_addr
+-C css0.trustedBootROMloader.fname=$bl1_bin
+-C board0.flashloader0.fname=$fip_bin
+-C board0.virtioblockdevice.image_path=$busybox_bin
+-C css0.pl011_uart_ap.unbuffered_output=1
+-C soc0.pl011_uart0.unbuffered_output=1
+-C soc0.pl011_uart1.unbuffered_output=1
+
+-C css1.cmn600.force_on_from_start=1
+-C css1.cmn600.mesh_config_file=$warehouse/SysGen/SubSystemModels/11.10/36/models/Linux64_GCC-6.4/RD_N1_E1_cmn600_ccix.yml
+-C css1.mcp.ROMloader.fname=$mcp_rom_bin
+-C css1.scp.ROMloader.fname=$scp_rom_bin
+--data css1.scp.armcortexm7ct=$scp_ram_bin@$scp_ram_addr
+-C css1.pl011_uart_ap.unbuffered_output=1
+EOF
diff --git a/rdn1edgex2_utils.sh b/rdn1edgex2_utils.sh
new file mode 100644
index 0000000..26c1598
--- /dev/null
+++ b/rdn1edgex2_utils.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+#
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+source "$ci_root/fvp_utils.sh"
+
+sgi_prebuilts="${sgi_prebuilts:-$css_downloads/sgi/rdn1edgex2}"
+
+fvp_kernels[fvp-sgi-busybox]="$sgi_prebuilts/Image"
+fvp_initrd_urls[fvp-sgi-ramdisk]="$sgi_prebuilts/ramdisk-busybox.img"
+
+scp_ram_addr=0x0bd80000
+mcp_ram_addr=0x0be00000
diff --git a/run_config/fvp-rdn1edgex2 b/run_config/fvp-rdn1edgex2
new file mode 100644
index 0000000..b57a32f
--- /dev/null
+++ b/run_config/fvp-rdn1edgex2
@@ -0,0 +1,35 @@
+#!/bin/bash
+#
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+fetch_tf_resource() {
+	#Fetch the pre-built SCP/MCP binaries if they haven't been built
+	if [ ! -f "$archive/mcp_rom.bin" ]; then
+		url="$sgi_prebuilts/mcp_rom.bin" fetch_file
+		archive_file "mcp_rom.bin"
+	fi
+	if [ ! -f "$archive/scp_ram.bin" ]; then
+		url="$sgi_prebuilts/scp_ram.bin" fetch_file
+		archive_file "scp_ram.bin"
+	fi
+	if [ ! -f "$archive/scp_rom.bin" ]; then
+		url="$sgi_prebuilts/scp_rom.bin" fetch_file
+		archive_file "scp_rom.bin"
+	fi
+
+	# Hold scp terminal_uart_aon on css0
+	uart="2" file="hold_uart.exp" track_expect
+
+	# Hold scp terminal_uart_aon on css1
+	uart="3" file="hold_uart.exp" track_expect
+}
+
+post_fetch_tf_resource() {
+	model="css-rdn1edgex2" gen_model_params
+	set_run_env "ports_script" "$ci_root/model/css-rdinfra-ports.awk"
+	set_run_env "num_uarts" "4"
+	uart="0" set_expect_variable "num_cpus" "16"
+}