SPM: Update boundaries for the 1st partition
The 1st partition's boundary activating is missed, hence it
inherits the initial boundary setting when it gets executed for
the first time. The initial boundary belongs to the PRoT domain,
which is incorrect to be inherited by a partition.
Activate 1st partition's boundary when it is chosen to be run
as the first.
Change-Id: Ia159d62595c15d9716a8271a746761393c772329
Signed-off-by: Ken Liu <Ken.Liu@arm.com>
diff --git a/secure_fw/spm/ffm/backend_ipc.c b/secure_fw/spm/ffm/backend_ipc.c
index 4b2f8a2..3b23e1e 100644
--- a/secure_fw/spm/ffm/backend_ipc.c
+++ b/secure_fw/spm/ffm/backend_ipc.c
@@ -7,9 +7,11 @@
#include <stdint.h>
#include "spm_ipc.h"
+#include "tfm_hal_isolation.h"
#include "tfm_rpc.h"
#include "tfm_spm_hal.h" /* To be checked */
#include "ffm/backend.h"
+#include "utilities.h"
#include "load/partition_defs.h"
#include "load/service_defs.h"
#include "load/spm_load_api.h"
@@ -86,7 +88,20 @@
static uint32_t ipc_system_run(void)
{
- return thrd_start_scheduler(&CURRENT_THREAD);
+ uint32_t control;
+ struct partition_t *p_cur_pt;
+
+ control = thrd_start_scheduler(&CURRENT_THREAD);
+
+ p_cur_pt = TO_CONTAINER(CURRENT_THREAD->p_context_ctrl,
+ struct partition_t, ctx_ctrl);
+
+ if (tfm_hal_update_boundaries(p_cur_pt->p_ldinf, p_cur_pt->p_boundaries)
+ != TFM_HAL_SUCCESS) {
+ tfm_core_panic();
+ }
+
+ return control;
}
const struct backend_ops_t backend_instance = {