diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-10-30 11:54:20 +0000 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-12-10 16:37:46 +0000 |
commit | 09d413a158f884dafbf171723c60914cd41383d3 (patch) | |
tree | 56030d1de80b741581c8106bac194c66f17d8e18 /services/std_svc/spm | |
parent | 08aa122bf5b073a1af0372b644b1ac4217ef155a (diff) | |
download | trusted-firmware-a-09d413a158f884dafbf171723c60914cd41383d3.tar.gz |
SPM: Remove SP memory mappings definitions
This information is retrieved from the resource description now.
Change-Id: Iaae23945eb2c45305cdc6442853e42f4e04fe094
Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'services/std_svc/spm')
-rw-r--r-- | services/std_svc/spm/sp_setup.c | 42 | ||||
-rw-r--r-- | services/std_svc/spm/sp_xlat.c | 1 | ||||
-rw-r--r-- | services/std_svc/spm/spm_main.c | 1 |
3 files changed, 4 insertions, 40 deletions
diff --git a/services/std_svc/spm/sp_setup.c b/services/std_svc/spm/sp_setup.c index 04eedff48d..b1f651f068 100644 --- a/services/std_svc/spm/sp_setup.c +++ b/services/std_svc/spm/sp_setup.c @@ -13,7 +13,6 @@ #include <debug.h> #include <platform_def.h> #include <platform.h> -#include <secure_partition.h> #include <string.h> #include <xlat_tables_v2.h> @@ -39,57 +38,24 @@ void spm_sp_setup(sp_context_t *sp_ctx) ep_info.spsr = SPSR_64(MODE_EL0, MODE_SP_EL0, DISABLE_ALL_EXCEPTIONS); /* - * X0: Virtual address of a buffer shared between EL3 and Secure EL0. - * The buffer will be mapped in the Secure EL1 translation regime - * with Normal IS WBWA attributes and RO data and Execute Never - * instruction access permissions. - * - * X1: Size of the buffer in bytes - * + * X0: Unused (MBZ). + * X1: Unused (MBZ). * X2: cookie value (Implementation Defined) - * * X3: cookie value (Implementation Defined) - * * X4 to X7 = 0 */ - ep_info.args.arg0 = PLAT_SPM_BUF_BASE; - ep_info.args.arg1 = PLAT_SPM_BUF_SIZE; + ep_info.args.arg0 = 0; + ep_info.args.arg1 = 0; ep_info.args.arg2 = PLAT_SPM_COOKIE_0; ep_info.args.arg3 = PLAT_SPM_COOKIE_1; cm_setup_context(ctx, &ep_info); /* - * SP_EL0: A non-zero value will indicate to the SP that the SPM has - * initialized the stack pointer for the current CPU through - * implementation defined means. The value will be 0 otherwise. - */ - write_ctx_reg(get_gpregs_ctx(ctx), CTX_GPREG_SP_EL0, - PLAT_SP_IMAGE_STACK_BASE + PLAT_SP_IMAGE_STACK_PCPU_SIZE); - - /* * Setup translation tables * ------------------------ */ -#if ENABLE_ASSERTIONS - - /* Get max granularity supported by the platform. */ - unsigned int max_granule = xlat_arch_get_max_supported_granule_size(); - - VERBOSE("Max translation granule size supported: %u KiB\n", - max_granule / 1024U); - - unsigned int max_granule_mask = max_granule - 1U; - - /* Base must be aligned to the max granularity */ - assert((ARM_SP_IMAGE_NS_BUF_BASE & max_granule_mask) == 0); - - /* Size must be a multiple of the max granularity */ - assert((ARM_SP_IMAGE_NS_BUF_SIZE & max_granule_mask) == 0); - -#endif /* ENABLE_ASSERTIONS */ - /* This region contains the exception vectors used at S-EL1. */ const mmap_region_t sel1_exception_vectors = MAP_REGION_FLAT(SPM_SHIM_EXCEPTIONS_START, diff --git a/services/std_svc/spm/sp_xlat.c b/services/std_svc/spm/sp_xlat.c index 3527138600..881d97f350 100644 --- a/services/std_svc/spm/sp_xlat.c +++ b/services/std_svc/spm/sp_xlat.c @@ -10,7 +10,6 @@ #include <errno.h> #include <platform_def.h> #include <platform.h> -#include <secure_partition.h> #include <spm_svc.h> #include <xlat_tables_v2.h> diff --git a/services/std_svc/spm/spm_main.c b/services/std_svc/spm/spm_main.c index 880e86e496..ad1262cbe6 100644 --- a/services/std_svc/spm/spm_main.c +++ b/services/std_svc/spm/spm_main.c @@ -14,7 +14,6 @@ #include <mm_svc.h> #include <platform.h> #include <runtime_svc.h> -#include <secure_partition.h> #include <smccc.h> #include <smccc_helpers.h> #include <spinlock.h> |