diff options
author | Etienne Carriere <etienne.carriere@linaro.org> | 2017-04-10 09:21:24 +0200 |
---|---|---|
committer | Etienne Carriere <etienne.carriere@linaro.org> | 2017-04-12 11:31:44 +0200 |
commit | 2d21686532c8efdd4845f61a0639b240e9276d46 (patch) | |
tree | 55e7e93bb7e095c1a02e40dc2989a643cc45b500 /core/arch/arm/include/mm/core_mmu.h | |
parent | b90c1e329d6859e6a798687fef67bea26f82714f (diff) |
core: default define stack alignment and core vmem size
Default define CFG_TEE_RAM_VA_SIZE if not defined from platform.
As a side effect of bringing a default value for CFG_TEE_RAM_VA_SIZE
into core_mmu.h and thus including 'platform_config.h', the macro
STACK_ALIGNMENT defined in user_ta.c must not conflict with the macro
defined by the platform. Hence this change also default defines
STACK_ALIGNMENT if not defined from platform.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core/arch/arm/include/mm/core_mmu.h')
-rw-r--r-- | core/arch/arm/include/mm/core_mmu.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/arch/arm/include/mm/core_mmu.h b/core/arch/arm/include/mm/core_mmu.h index c0fe0218..6eff3d28 100644 --- a/core/arch/arm/include/mm/core_mmu.h +++ b/core/arch/arm/include/mm/core_mmu.h @@ -31,6 +31,7 @@ #include <compiler.h> #include <kernel/user_ta.h> #include <mm/tee_mmu_types.h> +#include <platform_config.h> #include <types_ext.h> /* A small page is the smallest unit of memory that can be mapped */ @@ -73,6 +74,14 @@ #define CORE_MMU_USER_PARAM_SIZE (1 << CORE_MMU_USER_PARAM_SHIFT) #define CORE_MMU_USER_PARAM_MASK (CORE_MMU_USER_PARAM_SIZE - 1) +#ifndef CFG_TEE_RAM_VA_SIZE +#define CFG_TEE_RAM_VA_SIZE CORE_MMU_PGDIR_SIZE +#endif + +#ifndef STACK_ALIGNMENT +#define STACK_ALIGNMENT (sizeof(long) * 2) +#endif + /* * Memory area type: * MEM_AREA_NOTYPE: Undefined type. Used as end of table. |