summaryrefslogtreecommitdiff
path: root/libcpu/aarch64/common/stack.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-12-01 09:18:50 +0800
committerGitHub <[email protected]>2021-12-01 09:18:50 +0800
commit7c012afdf8cb423340d87920fb6e3439e726c45a (patch)
treedcd123b7f8d6e96796337987b760f3f36c798a27 /libcpu/aarch64/common/stack.c
parentccfb3cb67ddb56b1e6866dee5a8a25d530735bc3 (diff)
parentefbdbc2636abf25d0836d58a666b91d61b99bf80 (diff)
Merge pull request #5314 from GuEe-GUI/master
fixup .bss size define in link.lds and set spsel=1 in aarch64
Diffstat (limited to 'libcpu/aarch64/common/stack.c')
-rw-r--r--libcpu/aarch64/common/stack.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libcpu/aarch64/common/stack.c b/libcpu/aarch64/common/stack.c
index 0fe00d8674..d93706fcb9 100644
--- a/libcpu/aarch64/common/stack.c
+++ b/libcpu/aarch64/common/stack.c
@@ -7,15 +7,16 @@
* Date Author Notes
* 2011-09-23 Bernard the first version
* 2011-10-05 Bernard add thumb mode
+ * 2021-11-04 GuEe-GUI set sp with SP_ELx
*/
#include <rtthread.h>
#include <board.h>
#include <armv8.h>
-#define INITIAL_SPSR_EL3 (PSTATE_EL3 | SP_EL0)
-#define INITIAL_SPSR_EL2 (PSTATE_EL2 | SP_EL0)
-#define INITIAL_SPSR_EL1 (PSTATE_EL1 | SP_EL0)
+#define INITIAL_SPSR_EL3 (PSTATE_EL3 | SP_ELx)
+#define INITIAL_SPSR_EL2 (PSTATE_EL2 | SP_ELx)
+#define INITIAL_SPSR_EL1 (PSTATE_EL1 | SP_ELx)
/**
* This function will initialize thread stack