feat(handoff): add AArch32 handoff support

Add support for testing firmware handoff in AArch32 mode. This requires
some tweaks to enable the boot args from TF-A to be stashed for later
use.

Change-Id: Ib1b88688b6229b10020c936319605c7ed6307ca2
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
diff --git a/tftf/framework/aarch32/entrypoint.S b/tftf/framework/aarch32/entrypoint.S
index eaa0788..3e40ab9 100644
--- a/tftf/framework/aarch32/entrypoint.S
+++ b/tftf/framework/aarch32/entrypoint.S
@@ -16,6 +16,12 @@
  * ----------------------------------------------------------------------------
  */
 func tftf_entrypoint
+#if TRANSFER_LIST
+	mov	r4, r0
+	mov	r5, r1
+	mov	r6, r2
+	mov	r7, r3
+#endif
 	bl	arch_init
 
 	/* --------------------------------------------------------------------
@@ -53,6 +59,19 @@
 	bl	zeromem
 
 	/* --------------------------------------------------------------------
+	 * Save transfer list and hw_config addresses passed in registers r0 to
+	 * r3 from the previous bootloader.
+	 * --------------------------------------------------------------------
+	 */
+#if TRANSFER_LIST
+	mov	r0, r4
+	mov	r1, r5
+	mov	r2, r6
+	mov	r3, r7
+	bl	save_handoff_params
+#endif
+
+	/* --------------------------------------------------------------------
 	 * Give ourselves a small coherent stack to ease the pain of
 	 * initializing the MMU
 	 * --------------------------------------------------------------------
@@ -172,3 +191,18 @@
 	/* Primary core MPID already saved */
 	b	panic
 endfunc save_primary_mpid
+
+/* ----------------------------------------------------------------------------
+ * Save transfer list and hw_config addresses passed in registers r0 to r3 from
+ * the previous bootloader.
+ * ----------------------------------------------------------------------------
+ */
+func save_handoff_params
+	ldr	r4, =ns_tl
+	str	r3, [r4]
+	ldr	r4, =tl_signature
+	str	r1, [r4]
+	ldr	r4, =hw_config_base
+	str	r2, [r4]
+	bx	lr
+endfunc save_handoff_params