[rtems commit] riscv: Fix CPU_STACK_ALIGNMENT

Sebastian Huber sebh at rtems.org
Fri Jun 29 09:58:57 UTC 2018


Module:    rtems
Branch:    master
Commit:    9510742e7ff48c3df177ec9f7b5e0d229c696e85
Changeset: http://git.rtems.org/rtems/commit/?id=9510742e7ff48c3df177ec9f7b5e0d229c696e85

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Jun 27 08:35:13 2018 +0200

riscv: Fix CPU_STACK_ALIGNMENT

According to the RISC-V psABI

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

the stack alignment is 128 bits (16 bytes).

Update #3433.

---

 cpukit/score/cpu/riscv/include/rtems/score/cpu.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
index 564812c..9a628c04 100644
--- a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
@@ -107,7 +107,8 @@ Context_Control_fp  _CPU_Null_fp_context;
 #define CPU_PROVIDES_ISR_IS_IN_PROGRESS FALSE
 #define CPU_HEAP_ALIGNMENT         CPU_ALIGNMENT
 #define CPU_PARTITION_ALIGNMENT    CPU_ALIGNMENT
-#define CPU_STACK_ALIGNMENT        8
+
+#define CPU_STACK_ALIGNMENT 16
 
 #define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
 



More information about the vc mailing list