summaryrefslogtreecommitdiff
path: root/services/std_svc/spm/spm_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/std_svc/spm/spm_private.h')
-rw-r--r--services/std_svc/spm/spm_private.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/std_svc/spm/spm_private.h b/services/std_svc/spm/spm_private.h
index a8234c36..a7bd760b 100644
--- a/services/std_svc/spm/spm_private.h
+++ b/services/std_svc/spm/spm_private.h
@@ -58,6 +58,9 @@ typedef struct sp_context {
sp_state_t state;
spinlock_t state_lock;
+ unsigned int request_count;
+ spinlock_t request_count_lock;
+
/* Base and size of the shared SPM<->SP buffer */
uintptr_t spm_sp_buffer_base;
size_t spm_sp_buffer_size;
@@ -80,6 +83,11 @@ void sp_state_set(sp_context_t *sp_ptr, sp_state_t state);
void sp_state_wait_switch(sp_context_t *sp_ptr, sp_state_t from, sp_state_t to);
int sp_state_try_switch(sp_context_t *sp_ptr, sp_state_t from, sp_state_t to);
+/* Functions to keep track of the number of active requests per SP */
+void spm_sp_request_increase(sp_context_t *sp_ctx);
+void spm_sp_request_decrease(sp_context_t *sp_ctx);
+int spm_sp_request_increase_if_zero(sp_context_t *sp_ctx);
+
/* Functions related to the translation tables management */
xlat_ctx_t *spm_sp_xlat_context_alloc(void);
void sp_map_memory_regions(sp_context_t *sp_ctx);