mirror of
https://gitee.com/Vancouver2017/luban-lite.git
synced 2025-12-29 01:06:56 +00:00
V1.0.6
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
|
||||
#include "cpuport.h"
|
||||
|
||||
#define RISCV_RT_STACK_ALIGN16 (16)
|
||||
|
||||
#ifndef RT_USING_SMP
|
||||
volatile rt_ubase_t rt_interrupt_from_thread = 0;
|
||||
volatile rt_ubase_t rt_interrupt_to_thread = 0;
|
||||
@@ -114,7 +116,10 @@ rt_uint8_t *rt_hw_stack_init(void *tentry,
|
||||
int i;
|
||||
|
||||
stk = stack_addr + sizeof(rt_ubase_t);
|
||||
stk = (rt_uint8_t *)RT_ALIGN_DOWN((rt_ubase_t)stk, REGBYTES);
|
||||
|
||||
/*In the standard RISCV-V calling convention, the stack grows downward and
|
||||
the stack pointer is always keep 16-byte aligned*/
|
||||
stk = (rt_uint8_t *)RT_ALIGN_DOWN((rt_ubase_t)stk, RISCV_RT_STACK_ALIGN16);
|
||||
stk -= sizeof(struct rt_hw_stack_frame);
|
||||
|
||||
frame = (struct rt_hw_stack_frame *)stk;
|
||||
|
||||
Reference in New Issue
Block a user