summaryrefslogtreecommitdiff
path: root/services/std_svc/spm/spm_private.h
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-01-08 09:59:33 +0000
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-01-08 09:59:33 +0000
commita43c85db2d4c2f6f91e1b534418ab14869327be6 (patch)
tree741422e78d292064a85f0c882be62b638c862762 /services/std_svc/spm/spm_private.h
parent26bd5f82459e45a2d5955cff0a25247489799db6 (diff)
SPM: Allow secondary CPUs to use the Secure Partition
The Secure Partition should be able to be used from any CPU, not just the lead one. This patch point the secure contexts of all secondary CPUs to the same one used by the lead CPU for the Secure Partition. This way, they can also use it. In order to prevent more than one CPU from using the Secure Partition at the same time, a lock has been added. Change-Id: Ica76373127c3626498b06c558a4874ce72201ff7 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'services/std_svc/spm/spm_private.h')
-rw-r--r--services/std_svc/spm/spm_private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/std_svc/spm/spm_private.h b/services/std_svc/spm/spm_private.h
index 2fc46c8d..1d16b458 100644
--- a/services/std_svc/spm/spm_private.h
+++ b/services/std_svc/spm/spm_private.h
@@ -32,6 +32,7 @@
#ifndef __ASSEMBLY__
+#include <spinlock.h>
#include <stdint.h>
#include <xlat_tables_v2.h>
@@ -44,6 +45,7 @@ typedef struct secure_partition_context {
uint64_t c_rt_ctx;
cpu_context_t cpu_ctx;
unsigned int sp_init_in_progress;
+ spinlock_t lock;
} secure_partition_context_t;
uint64_t spm_secure_partition_enter(uint64_t *c_rt_ctx);