refactor(spm): leverage kernel preload options

For the SPM CI L3 test configs:
[1] spm-l3-boot-tests/fvp-default,fvp-spm-hyp,fvp-default:fvp-spm.linux
(renamed)
[2] spm-l3-boot-tests/fvp-default,fvp-spm-rst-bl31,fvp-default:fvp-spm.rstbl31

Leverage ARM_LINUX_KERNEL_AS_BL33 and PRELOADED_BL33_BASE TF-A options
to permit loading Hafnium as a normal world Hypervisor.
Hypervisor Device Tree (or manifest) is loaded at the default address
(dtb_addr=0x82000000).
For [1] this coincides with the HW CONFIG address. The DT blob is
supplied on the TF-A command line.
For [2] which uses RESET_TO_BL31=1, the DT address is supplied by the
ARM_PRELOADED_DTB_BASE option and preloaded.
Ramdisk is preloaded at the default initrd address
(initrd_addr 0x84000000).
Hypervisor (or "kernel") is preloaded at re-defined address
0x88000000 (kernel_addr).

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I7140085121bc26d003f1032311179cd5cb5abd90
diff --git a/group/spm-l3-boot-tests/fvp-default,fvp-spm,fvp-default:fvp-spm.linux b/group/spm-l3-boot-tests/fvp-default,fvp-spm-hyp,fvp-default:fvp-spm.linux
similarity index 100%
rename from group/spm-l3-boot-tests/fvp-default,fvp-spm,fvp-default:fvp-spm.linux
rename to group/spm-l3-boot-tests/fvp-default,fvp-spm-hyp,fvp-default:fvp-spm.linux
diff --git a/run_config/fvp-spm.linux b/run_config/fvp-spm.linux
index 6e5e740..32b0c88 100644
--- a/run_config/fvp-spm.linux
+++ b/run_config/fvp-spm.linux
@@ -11,15 +11,15 @@
 }
 
 post_tf_build() {
-	build_fip BL33="$archive/hafnium.bin" BL32="$archive/secure_hafnium.bin"
+	url="$tfa_downloads/spm/07-29-2021/manifest.dtb" fetch_file
+	archive_file "manifest.dtb"
+
+	build_fip BL32="$archive/secure_hafnium.bin" FVP_HW_CONFIG="$archive/manifest.dtb"
 }
 
 fetch_tf_resource() {
 	url="$tfa_downloads/spm/07-29-2021/initrd.img" saveas="initrd.bin" fetch_file
-	url="$tfa_downloads/spm/07-29-2021/manifest.dtb" saveas="dtb.bin" fetch_file
-
 	archive_file "initrd.bin"
-	archive_file "dtb.bin"
 
 	# Expect scripts
 	uart="0" file="spm-linux-uart0.exp" track_expect
@@ -35,9 +35,10 @@
 	arch_version="8.5" \
 	has_branch_target_exception="1" \
 	restriction_on_speculative_execution="2" \
-	dtb_addr=0x80000000 \
+	kernel_addr=0x88000000 \
+	kernel_bin="$archive/hafnium.bin" \
 	has_smmuv3_params="1" \
 		gen_model_params
 
-	model="$model" model_dtb="dtb.bin" gen_fvp_yaml
+	model="$model" model_dtb="manifest.dtb" gen_fvp_yaml
 }
diff --git a/run_config/fvp-spm.rstbl31 b/run_config/fvp-spm.rstbl31
index 0881e54..fcdeff1 100644
--- a/run_config/fvp-spm.rstbl31
+++ b/run_config/fvp-spm.rstbl31
@@ -56,15 +56,14 @@
 	has_branch_target_exception="1" \
 	restriction_on_speculative_execution="2" \
 	reset_to_bl31="1" \
-	preload_bl33="1" \
-	preload_bl33_bin="$archive/hafnium.bin" \
+	kernel_addr=0x88000000 \
+	kernel_bin="$archive/hafnium.bin" \
 	spmc_manifest="fvp_spmc_manifest.dtb" \
 	spm_bin="$archive/secure_hafnium.bin" \
 	sp1_pkg="cactus-primary.pkg" \
 	sp2_pkg="cactus-secondary.pkg" \
 	sp3_pkg="cactus-tertiary.pkg" \
 	sp4_pkg="ivy.pkg" \
-	dtb_addr=0x80000000 \
 	has_smmuv3_params="1" \
 		gen_model_params
 
diff --git a/tf_config/fvp-spm-hyp b/tf_config/fvp-spm-hyp
new file mode 100644
index 0000000..f28c804
--- /dev/null
+++ b/tf_config/fvp-spm-hyp
@@ -0,0 +1,11 @@
+CROSS_COMPILE=aarch64-none-elf-
+ARM_LINUX_KERNEL_AS_BL33=1
+PRELOADED_BL33_BASE=0x88000000
+PLAT=fvp
+SPD=spmd
+SPMD_SPM_AT_SEL2=1
+CTX_INCLUDE_EL2_REGS=1
+ARM_ARCH_MINOR=5
+CTX_INCLUDE_PAUTH_REGS=1
+BRANCH_PROTECTION=1
+SP_LAYOUT_FILE=${tftf_root}/build/fvp/${bin_mode}/sp_layout.json
diff --git a/tf_config/fvp-spm-rst-bl31 b/tf_config/fvp-spm-rst-bl31
index 8e94368..88ce5dc 100644
--- a/tf_config/fvp-spm-rst-bl31
+++ b/tf_config/fvp-spm-rst-bl31
@@ -1,6 +1,9 @@
 CROSS_COMPILE=aarch64-none-elf-
 PLAT=fvp
 RESET_TO_BL31=1
+ARM_LINUX_KERNEL_AS_BL33=1
+PRELOADED_BL33_BASE=0x88000000
+ARM_PRELOADED_DTB_BASE=0x82000000
 SPD=spmd
 SPMD_SPM_AT_SEL2=1
 CTX_INCLUDE_EL2_REGS=1