From 45d640f0f449e835b014bb5555ec1de5b5e566dc Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Fri, 17 Nov 2017 11:48:55 +0000 Subject: SPM: Move S-EL1/S-EL0 xlat tables to TZC DRAM A new platform define, `PLAT_SP_IMAGE_XLAT_SECTION_NAME`, has been introduced to select the section where the translation tables used by the S-EL1/S-EL0 are placed. This define has been used to move the translation tables to DRAM secured by TrustZone. Most of the extra needed space in BL31 when SPM is enabled is due to the large size of the translation tables. By moving them to this memory region we can save 44 KiB. A new argument has been added to REGISTER_XLAT_CONTEXT2() to specify the region where the translation tables have to be placed by the linker. Change-Id: Ia81709b4227cb8c92601f0caf258f624c0467719 Signed-off-by: Antonio Nino Diaz --- services/std_svc/spm/secure_partition_setup.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'services') diff --git a/services/std_svc/spm/secure_partition_setup.c b/services/std_svc/spm/secure_partition_setup.c index 6f4b0571..f1b387ef 100644 --- a/services/std_svc/spm/secure_partition_setup.c +++ b/services/std_svc/spm/secure_partition_setup.c @@ -22,12 +22,17 @@ #include "spm_private.h" #include "spm_shim_private.h" +/* Place translation tables by default along with the ones used by BL31. */ +#ifndef PLAT_SP_IMAGE_XLAT_SECTION_NAME +#define PLAT_SP_IMAGE_XLAT_SECTION_NAME "xlat_table" +#endif + /* Allocate and initialise the translation context for the secure partition. */ REGISTER_XLAT_CONTEXT2(secure_partition, PLAT_SP_IMAGE_MMAP_REGIONS, PLAT_SP_IMAGE_MAX_XLAT_TABLES, PLAT_VIRT_ADDR_SPACE_SIZE, PLAT_PHY_ADDR_SPACE_SIZE, - EL1_EL0_REGIME); + EL1_EL0_REGIME, PLAT_SP_IMAGE_XLAT_SECTION_NAME); /* Export a handle on the secure partition translation context */ xlat_ctx_t *secure_partition_xlat_ctx_handle = &secure_partition_xlat_ctx; -- cgit v1.2.3