fix: BL2 start address for RESET_TO_BL2+ENABLE_PIE

BL31 image has grown with feature addition over time. In particular the
RESET_TO_BL2 + ENABLE_PIE + DEBUG combination of options lead to BL31
image overlap head of BL2 image. In this configuration BL2 is meant to
stay resident as PE reset occurs from BL2. Apply changes similar to [1]
such that BL2 start address is pushed forward and leaves more room for
BL31 end of image.

[1] https://review.trustedfirmware.org/c/ci/tf-a-ci-scripts/+/15487/3/run_config/fvp-aemv8a.bl2_el3%252Bpie#11

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I98b871b49391767299e85cac838f3999eeefc399
diff --git a/run_config/fvp-aemv8a.bl2_el3+pie b/run_config/fvp-aemv8a.bl2_el3+pie
index 58d88b4..16597c9 100644
--- a/run_config/fvp-aemv8a.bl2_el3+pie
+++ b/run_config/fvp-aemv8a.bl2_el3+pie
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #
-# Copyright (c) 2022, Arm Limited. All rights reserved.
+# Copyright (c) 2022-2023, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -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 + 0x5000)
+	local bl2_addr=$((0x4005000 + (fvp_tsram_size * 512)))
+
 	uart="0" set_expect_variable "skip_early_boot_msgs" "1"
 
-	model="$model" bl2_addr="0x4023000" 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
 }