summaryrefslogtreecommitdiff
path: root/libcpu/risc-v/e310/stack.c
diff options
context:
space:
mode:
authorzhangjun <[email protected]>2017-07-31 10:59:59 +0800
committerzhangjun <[email protected]>2017-07-31 10:59:59 +0800
commita5305c05df3e97cd60c621bec87926765ba31228 (patch)
tree253bbec417bf23c06b5aa8e85788998dd2ec5f48 /libcpu/risc-v/e310/stack.c
parentd9c0bdc70e6c4f2b1a091fe442e4bcc58a7fe361 (diff)
fix bug in context_gcc.s and start_gcc.s:
save mie into stack msh running normaly
Diffstat (limited to 'libcpu/risc-v/e310/stack.c')
-rw-r--r--libcpu/risc-v/e310/stack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcpu/risc-v/e310/stack.c b/libcpu/risc-v/e310/stack.c
index 666a2d5bbd..eab608c753 100644
--- a/libcpu/risc-v/e310/stack.c
+++ b/libcpu/risc-v/e310/stack.c
@@ -86,7 +86,8 @@ rt_uint8_t *rt_hw_stack_init(void *tentry, void *parameter,
*(--stk) = 0xffffffff; /* t6 */
*(--stk) = 0xffffffff; /* tp */
*(--stk) = 0xffffffff; /* gp */
+ *(--stk) = 0x880; /* mie */
// *(--stk) = (rt_uint32_t)parameter; /* r0 : argument */
/* return task's current stack address */
- return (rt_uint8_t *)--stk;
+ return (rt_uint8_t *)stk;
}