From 7e5772bdc0723cc0ec6b821ebd62f7f421a3787d Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Tue, 26 Jun 2018 10:34:25 +0100 Subject: [PATCH] SPM: Read entrypoint from resource descriptor Read entrypoint of the Secure Partition from the resource description struct. Change-Id: Ie693c7b4d4fecafd85b6934d9d8c4232efb1dc55 Signed-off-by: Antonio Nino Diaz --- services/std_svc/spm/sp_setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/std_svc/spm/sp_setup.c b/services/std_svc/spm/sp_setup.c index b1f651f0..ecb8bd36 100644 --- a/services/std_svc/spm/sp_setup.c +++ b/services/std_svc/spm/sp_setup.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -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); /* -- 2.30.2