aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDimitris Papastamos <dimitris.papastamos@arm.com>2018-05-25 09:47:11 +0100
committerGitHub <noreply@github.com>2018-05-25 09:47:11 +0100
commitedcd266e6a9276ac0b2927301c8deec3798a6b1c (patch)
treed17687cd5c3d825812b94a382417fad29785822a /include
parent0d018306d41a36582830e58761cba9d5b647f05b (diff)
parente829a3796fb2e66a68b60a22ebce6dca05c80a71 (diff)
downloadplatform_external_arm-trusted-firmware-edcd266e6a9276ac0b2927301c8deec3798a6b1c.tar.gz
platform_external_arm-trusted-firmware-edcd266e6a9276ac0b2927301c8deec3798a6b1c.tar.bz2
platform_external_arm-trusted-firmware-edcd266e6a9276ac0b2927301c8deec3798a6b1c.zip
Merge pull request #1395 from antonio-nino-diaz-arm/an/spm-refactor
SPM: Refactor codebase
Diffstat (limited to 'include')
-rw-r--r--include/lib/el3_runtime/context_mgmt.h5
-rw-r--r--include/plat/arm/board/common/board_arm_def.h10
-rw-r--r--include/plat/arm/common/arm_spm_def.h6
-rw-r--r--include/services/secure_partition.h4
4 files changed, 11 insertions, 14 deletions
diff --git a/include/lib/el3_runtime/context_mgmt.h b/include/lib/el3_runtime/context_mgmt.h
index eb7a95345..e3f7726a8 100644
--- a/include/lib/el3_runtime/context_mgmt.h
+++ b/include/lib/el3_runtime/context_mgmt.h
@@ -7,11 +7,11 @@
#ifndef __CM_H__
#define __CM_H__
-#ifndef AARCH32
#include <arch.h>
#include <assert.h>
+#include <context.h>
+#include <context_mgmt.h>
#include <stdint.h>
-#endif
/*******************************************************************************
* Forward declarations
@@ -32,6 +32,7 @@ void cm_set_context(void *context, uint32_t security_state);
void cm_init_my_context(const struct entry_point_info *ep);
void cm_init_context_by_index(unsigned int cpu_idx,
const struct entry_point_info *ep);
+void cm_setup_context(cpu_context_t *ctx, const entry_point_info_t *ep);
void cm_prepare_el3_exit(uint32_t security_state);
#ifndef AARCH32
diff --git a/include/plat/arm/board/common/board_arm_def.h b/include/plat/arm/board/common/board_arm_def.h
index ad6b4f8f5..21ceae30a 100644
--- a/include/plat/arm/board/common/board_arm_def.h
+++ b/include/plat/arm/board/common/board_arm_def.h
@@ -30,7 +30,9 @@
#elif defined(IMAGE_BL2U)
# define PLATFORM_STACK_SIZE 0x200
#elif defined(IMAGE_BL31)
-#ifdef PLAT_XLAT_TABLES_DYNAMIC
+#if ENABLE_SPM
+# define PLATFORM_STACK_SIZE 0x500
+#elif PLAT_XLAT_TABLES_DYNAMIC
# define PLATFORM_STACK_SIZE 0x800
#else
# define PLATFORM_STACK_SIZE 0x400
@@ -94,7 +96,11 @@
* PLAT_ARM_MAX_BL31_SIZE is calculated using the current BL31 debug size plus a
* little space for growth.
*/
-#define PLAT_ARM_MAX_BL31_SIZE 0x20000
+#if ENABLE_SPM
+# define PLAT_ARM_MAX_BL31_SIZE 0x40000
+#else
+# define PLAT_ARM_MAX_BL31_SIZE 0x20000
+#endif
#ifdef AARCH32
/*
diff --git a/include/plat/arm/common/arm_spm_def.h b/include/plat/arm/common/arm_spm_def.h
index 3f5c958d5..83277a6c5 100644
--- a/include/plat/arm/common/arm_spm_def.h
+++ b/include/plat/arm/common/arm_spm_def.h
@@ -98,12 +98,6 @@
/* Total number of memory regions with distinct properties */
#define ARM_SP_IMAGE_NUM_MEM_REGIONS 6
-/*
- * Name of the section to put the translation tables used by the S-EL1/S-EL0
- * context of a Secure Partition.
- */
-#define PLAT_SP_IMAGE_XLAT_SECTION_NAME "arm_el3_tzc_dram"
-
/* Cookies passed to the Secure Partition at boot. Not used by ARM platforms. */
#define PLAT_SPM_COOKIE_0 ULL(0)
#define PLAT_SPM_COOKIE_1 ULL(0)
diff --git a/include/services/secure_partition.h b/include/services/secure_partition.h
index f68f711be..f1fdb733f 100644
--- a/include/services/secure_partition.h
+++ b/include/services/secure_partition.h
@@ -55,8 +55,4 @@ typedef struct secure_partition_boot_info {
secure_partition_mp_info_t *mp_info;
} secure_partition_boot_info_t;
-/* Setup function for secure partitions context. */
-
-void secure_partition_setup(void);
-
#endif /* __SECURE_PARTITION_H__ */