SPM: Read entrypoint from resource descriptor
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Tue, 26 Jun 2018 09:34:25 +0000 (10:34 +0100)
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Tue, 11 Dec 2018 13:45:41 +0000 (13:45 +0000)
Read entrypoint of the Secure Partition from the resource description
struct.

Change-Id: Ie693c7b4d4fecafd85b6934d9d8c4232efb1dc55
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
services/std_svc/spm/sp_setup.c

index b1f651f068debfa39d00df9f9e21d21889bfbcee..ecb8bd363c8ea023df11b266b3adcd2ccbe75aad 100644 (file)
@@ -13,6 +13,7 @@
 #include <debug.h>
 #include <platform_def.h>
 #include <platform.h>
+#include <sp_res_desc.h>
 #include <string.h>
 #include <xlat_tables_v2.h>
 
@@ -34,7 +35,7 @@ void spm_sp_setup(sp_context_t *sp_ctx)
        SET_PARAM_HEAD(&ep_info, PARAM_EP, VERSION_1, SECURE | EP_ST_ENABLE);
 
        /* Setup entrypoint and SPSR */
-       ep_info.pc = BL32_BASE;
+       ep_info.pc = sp_ctx->rd.attribute.entrypoint;
        ep_info.spsr = SPSR_64(MODE_EL0, MODE_SP_EL0, DISABLE_ALL_EXCEPTIONS);
 
        /*