riscv: Remove RISCV_GCC_RED_ZONE_SIZE

The current ABI says that there is no stack red zone:

https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md

"Procedures must not rely upon the persistence of stack-allocated data
whose addresses lie below the stack pointer."

Update #3433.
This commit is contained in:
Sebastian Huber
2018-06-27 08:08:10 +02:00
parent 9704d86f86
commit 98f051efed
2 changed files with 1 additions and 5 deletions

View File

@@ -164,9 +164,6 @@ uint32_t _CPU_ISR_Get_level( void );
/* end of ISR handler macros */
/* Context handler macros */
#define RISCV_GCC_RED_ZONE_SIZE 128
void _CPU_Context_Initialize(
Context_Control *context,
void *stack_area_begin,

View File

@@ -50,8 +50,7 @@ void _CPU_Context_Initialize(
{
uintptr_t stack = ((uintptr_t) stack_area_begin);
/* Account for red-zone */
uintptr_t stack_high = stack + stack_area_size - RISCV_GCC_RED_ZONE_SIZE;
uintptr_t stack_high = stack + stack_area_size;
memset(context, 0, sizeof(*context));