diff options
author | Jens Wiklander <jens.wiklander@linaro.org> | 2014-12-09 14:42:32 +0100 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2014-12-18 10:05:38 +0100 |
commit | 6d7d944a14e97f8e1b946418936592f69bf19406 (patch) | |
tree | 1ea3c3b238850757233152c5b33046b1ad639e3d /core/arch/arm32 | |
parent | 1d06e9717e4157c016f3992d4f5451d59fc1a023 (diff) |
plat-vexpress: make stacks cache line aligned
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Diffstat (limited to 'core/arch/arm32')
-rw-r--r-- | core/arch/arm32/plat-vexpress/main.c | 5 | ||||
-rw-r--r-- | core/arch/arm32/plat-vexpress/platform_config.h | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/core/arch/arm32/plat-vexpress/main.c b/core/arch/arm32/plat-vexpress/main.c index b9232cd..1ddce7a 100644 --- a/core/arch/arm32/plat-vexpress/main.c +++ b/core/arch/arm32/plat-vexpress/main.c @@ -75,8 +75,9 @@ #endif #define DECLARE_STACK(name, num_stacks, stack_size) \ - static uint32_t name[num_stacks][(stack_size + STACK_CANARY_SIZE) / \ - sizeof(uint32_t)] \ + static uint32_t name[num_stacks][ \ + ROUNDUP(stack_size + STACK_CANARY_SIZE, STACK_ALIGNMENT) / \ + sizeof(uint32_t)] \ __attribute__((section(".nozi.stack"), \ aligned(STACK_ALIGNMENT))) diff --git a/core/arch/arm32/plat-vexpress/platform_config.h b/core/arch/arm32/plat-vexpress/platform_config.h index ad6ac15..88674e4 100644 --- a/core/arch/arm32/plat-vexpress/platform_config.h +++ b/core/arch/arm32/plat-vexpress/platform_config.h @@ -37,7 +37,8 @@ #define PLATFORM_FLAVOR_IS(flav) \ (PLATFORM_FLAVOR == PLATFORM_FLAVOR_ID_ ## flav) -#define STACK_ALIGNMENT 8 +/* Make stacks aligned to data cache line length */ +#define STACK_ALIGNMENT 64 #define PLATFORM_LINKER_FORMAT "elf32-littlearm" #define PLATFORM_LINKER_ARCH arm |