mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 10:36:04 +08:00
modify: drivers/cpuusage.c
modify: ../../libcpu/risc-v/e310/stack.c rmove unused macro definition modify: ../../src/idle.c Return to the original version
This commit is contained in:
@@ -19,22 +19,10 @@
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2011-01-13 weety copy from mini2440
|
||||
* 2017-07-31 zhangjun copy from mini2440
|
||||
*/
|
||||
#include <rtthread.h>
|
||||
|
||||
/*****************************/
|
||||
/* CPU Mode */
|
||||
/*****************************/
|
||||
#define USERMODE 0x10
|
||||
#define FIQMODE 0x11
|
||||
#define IRQMODE 0x12
|
||||
#define SVCMODE 0x13
|
||||
#define ABORTMODE 0x17
|
||||
#define UNDEFMODE 0x1b
|
||||
#define MODEMASK 0x1f
|
||||
#define NOINT 0xc0
|
||||
|
||||
/**
|
||||
* This function will initialize thread stack
|
||||
*
|
||||
@@ -86,7 +74,7 @@ rt_uint8_t *rt_hw_stack_init(void *tentry, void *parameter,
|
||||
*(--stk) = 0xffffffff; /* t6 */
|
||||
*(--stk) = 0xffffffff; /* tp */
|
||||
*(--stk) = 0xffffffff; /* gp */
|
||||
*(--stk) = 0x880; /* mie */
|
||||
*(--stk) = 0x880; /* mie */
|
||||
// *(--stk) = (rt_uint32_t)parameter; /* r0 : argument */
|
||||
/* return task's current stack address */
|
||||
return (rt_uint8_t *)stk;
|
||||
|
||||
Reference in New Issue
Block a user