diff options
author | davidcunado-arm <david.cunado@arm.com> | 2017-12-10 14:01:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-10 14:01:37 +0000 |
commit | 83df7ce38dd5b2357fa73798ad1f3546c6073482 (patch) | |
tree | 66ef3fbdc1ce2f1917abc079cde755d1f7842538 /include | |
parent | 9f0ee04f5d5341f7686f238529bc8d690ddf3b00 (diff) | |
parent | 45d640f0f449e835b014bb5555ec1de5b5e566dc (diff) | |
download | platform_external_arm-trusted-firmware-83df7ce38dd5b2357fa73798ad1f3546c6073482.tar.gz platform_external_arm-trusted-firmware-83df7ce38dd5b2357fa73798ad1f3546c6073482.tar.bz2 platform_external_arm-trusted-firmware-83df7ce38dd5b2357fa73798ad1f3546c6073482.zip |
Merge pull request #1187 from antonio-nino-diaz-arm/an/spm-xlat-dram
SPM: Move S-EL1/S-EL0 xlat tables to TZC DRAM
Diffstat (limited to 'include')
-rw-r--r-- | include/lib/xlat_tables/xlat_tables_v2.h | 19 | ||||
-rw-r--r-- | include/lib/xlat_tables/xlat_tables_v2_helpers.h | 4 | ||||
-rw-r--r-- | include/plat/arm/board/common/board_arm_def.h | 4 | ||||
-rw-r--r-- | include/plat/arm/common/arm_spm_def.h | 6 |
4 files changed, 21 insertions, 12 deletions
diff --git a/include/lib/xlat_tables/xlat_tables_v2.h b/include/lib/xlat_tables/xlat_tables_v2.h index 73a9c5334..ba3e3603d 100644 --- a/include/lib/xlat_tables/xlat_tables_v2.h +++ b/include/lib/xlat_tables/xlat_tables_v2.h @@ -168,21 +168,28 @@ typedef struct xlat_ctx xlat_ctx_t; _xlat_tables_count, \ _virt_addr_space_size, \ _phy_addr_space_size, \ - IMAGE_XLAT_DEFAULT_REGIME) + IMAGE_XLAT_DEFAULT_REGIME, \ + "xlat_table") /* - * Same as REGISTER_XLAT_CONTEXT plus the additional parameter _xlat_regime to - * specify the translation regime managed by this xlat_ctx_t instance. The - * values are the one from xlat_regime_t enumeration. + * Same as REGISTER_XLAT_CONTEXT plus the additional parameters: + * + * _xlat_regime: + * Specify the translation regime managed by this xlat_ctx_t instance. The + * values are the one from xlat_regime_t enumeration. + * + * _section_name: + * Specify the name of the section where the translation tables have to be + * placed by the linker. */ #define REGISTER_XLAT_CONTEXT2(_ctx_name, _mmap_count, _xlat_tables_count, \ _virt_addr_space_size, _phy_addr_space_size, \ - _xlat_regime) \ + _xlat_regime, _section_name) \ _REGISTER_XLAT_CONTEXT_FULL_SPEC(_ctx_name, _mmap_count, \ _xlat_tables_count, \ _virt_addr_space_size, \ _phy_addr_space_size, \ - _xlat_regime) + _xlat_regime, _section_name) /****************************************************************************** * Generic translation table APIs. diff --git a/include/lib/xlat_tables/xlat_tables_v2_helpers.h b/include/lib/xlat_tables/xlat_tables_v2_helpers.h index 96dee1a06..1be99b719 100644 --- a/include/lib/xlat_tables/xlat_tables_v2_helpers.h +++ b/include/lib/xlat_tables/xlat_tables_v2_helpers.h @@ -123,7 +123,7 @@ struct xlat_ctx { #define _REGISTER_XLAT_CONTEXT_FULL_SPEC(_ctx_name, _mmap_count, _xlat_tables_count, \ _virt_addr_space_size, _phy_addr_space_size, \ - _xlat_regime) \ + _xlat_regime, _section_name) \ CASSERT(CHECK_VIRT_ADDR_SPACE_SIZE(_virt_addr_space_size), \ assert_invalid_virtual_addr_space_size_for_##_ctx_name); \ \ @@ -134,7 +134,7 @@ struct xlat_ctx { \ static uint64_t _ctx_name##_xlat_tables[_xlat_tables_count] \ [XLAT_TABLE_ENTRIES] \ - __aligned(XLAT_TABLE_SIZE) __section("xlat_table"); \ + __aligned(XLAT_TABLE_SIZE) __section(_section_name); \ \ static uint64_t _ctx_name##_base_xlat_table \ [GET_NUM_BASE_LEVEL_ENTRIES(_virt_addr_space_size)] \ diff --git a/include/plat/arm/board/common/board_arm_def.h b/include/plat/arm/board/common/board_arm_def.h index 68f4a0ec0..69eb727f5 100644 --- a/include/plat/arm/board/common/board_arm_def.h +++ b/include/plat/arm/board/common/board_arm_def.h @@ -90,11 +90,7 @@ * PLAT_ARM_MAX_BL31_SIZE is calculated using the current BL31 debug size plus a * little space for growth. */ -#if ENABLE_SPM -#define PLAT_ARM_MAX_BL31_SIZE 0x28000 -#else #define PLAT_ARM_MAX_BL31_SIZE 0x1D000 -#endif #ifdef AARCH32 /* diff --git a/include/plat/arm/common/arm_spm_def.h b/include/plat/arm/common/arm_spm_def.h index 83277a6c5..3f5c958d5 100644 --- a/include/plat/arm/common/arm_spm_def.h +++ b/include/plat/arm/common/arm_spm_def.h @@ -98,6 +98,12 @@ /* 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) |