feat: add test to verify unused ns el2 configuration
This test verifies the TF-A config INIT_UNUSED_NS_EL2. This macro
gaurds the code which is required to do a minimum initialization of
NS-EL2 for the systems which directly jumps to NS-EL1 from EL3.
This test applies a patch which runs TFTF at NS-EL1.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ibe7e44ebd45f7afa4c5f97de22b2281d3d27068e
diff --git a/patch/unused_el2/run_tftf_at_el1 b/patch/unused_el2/run_tftf_at_el1
new file mode 100644
index 0000000..1108367
--- /dev/null
+++ b/patch/unused_el2/run_tftf_at_el1
@@ -0,0 +1,13 @@
+diff --git a/plat/arm/common/arm_common.c b/plat/arm/common/arm_common.c
+index fc681149e..4ef0070b5 100644
+--- a/plat/arm/common/arm_common.c
++++ b/plat/arm/common/arm_common.c
+@@ -90,7 +90,7 @@ uint32_t arm_get_spsr_for_bl33_entry(void)
+ uint32_t spsr;
+
+ /* Figure out what mode we enter the non-secure world in */
+- mode = (el_implemented(2) != EL_IMPL_NONE) ? MODE_EL2 : MODE_EL1;
++ mode = MODE_EL1;
+
+ /*
+ * TODO: Consider the possibility of specifying the SPSR in