HAL: Update boundary related HAL functions
This patch contains a couple of updates for boundary HAL:
- For a partition, the boundary is a collection of memory regions,
hence use a singular number naming instead of plural 'boundaries'.
- As chose 'uintptr_t' as the opaque type for a boundary, the argument
name should avoid the prefix 'p_' which indicates pointers
('p_boundary' changed to 'boundary').
- Change 'pp_boundaries' to 'p_boundary', which is 'pointer of a
boundary' to indicate it is a boundary container.
- Change the function name 'tfm_hal_update_boundary' to
'tfm_hal_activate_boundary', as 'update' is not propose-clear.
- Re-ordered the sections in the document for boundary API, and
updates the function description.
Signed-off-by: Ken Liu <Ken.Liu@arm.com>
Change-Id: Ieee7e497016d1106c395900413bbade5b7b9e79f
diff --git a/secure_fw/spm/ffm/backend_ipc.c b/secure_fw/spm/ffm/backend_ipc.c
index 873e4f7..14ef82e 100644
--- a/secure_fw/spm/ffm/backend_ipc.c
+++ b/secure_fw/spm/ffm/backend_ipc.c
@@ -207,7 +207,7 @@
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)
+ if (tfm_hal_activate_boundary(p_cur_pt->p_ldinf, p_cur_pt->boundary)
!= TFM_HAL_SUCCESS) {
tfm_core_panic();
}
@@ -274,9 +274,9 @@
* If required, let the platform update boundary based on its
* implementation. Change privilege, MPU or other configurations.
*/
- if (p_part_curr->p_boundaries != p_part_next->p_boundaries) {
- if (tfm_hal_update_boundaries(p_part_next->p_ldinf,
- p_part_next->p_boundaries)
+ if (p_part_curr->boundary != p_part_next->boundary) {
+ if (tfm_hal_activate_boundary(p_part_next->p_ldinf,
+ p_part_next->boundary)
!= TFM_HAL_SUCCESS) {
tfm_core_panic();
}