fix: fix hanging BL2 at EL3 test

The following test job is currently failing:

    tf-l2-boot-tests-bl2_el3/fvp-bl2-el3:fvp-linux-dtb.1t-fip.uboot-aemv8a.bl2_el3-debug

This was caused by BL2 being placed at the wrong fixed address when
taking into account the larger Trusted SRAM that was given for this test
configuration.

This change moves BL2 from 0x4022000 to 0x4032000, which is where it
needs to be for a 384KB TSRAM (subject to change):

    0x4002000 + (fvp_tsram_size * 512)

Change-Id: I7abb405d395234319a5cb0c2c875929183c46e91
Signed-off-by: Chris Kay <chris.kay@arm.com>
(cherry picked from commit e5a486bfca4155b5b22e703e31b722e7c3252c7f)
diff --git a/run_config/fvp-aemv8a.bl2_el3 b/run_config/fvp-aemv8a.bl2_el3
index 57a803e..f00ff3e 100644
--- a/run_config/fvp-aemv8a.bl2_el3
+++ b/run_config/fvp-aemv8a.bl2_el3
@@ -8,8 +8,11 @@
 generate_lava_job() {
 	local model="base-aemv8a"
 
+	# BL2 is placed towards the middle of the Trusted SRAM based on (Total TSRAM / 2 + 0x2000)
+	local bl2_addr=$((0x4002000 + (fvp_tsram_size * 512)))
+
 	uart="0" set_expect_variable "skip_early_boot_msgs" "1"
 
-	model="$model" bl2_addr="0x4022000" bl2_at_el3="1" gen_model_params
+	model="$model" bl2_addr="${bl2_addr}" bl2_at_el3="1" gen_model_params
 	model="$model" gen_fvp_yaml
 }
diff --git a/script/build_package.sh b/script/build_package.sh
index dcbd9e5..9119756 100755
--- a/script/build_package.sh
+++ b/script/build_package.sh
@@ -1445,6 +1445,9 @@
 
 		source "$ci_root/script/install_python_deps_tf.sh"
 
+		fvp_tsram_size="$(get_tf_opt FVP_TRUSTED_SRAM_SIZE)"
+		fvp_tsram_size="${fvp_tsram_size:-256}"
+
 		archive="$build_archive"
 		tf_build_root="$tf_root/build"