mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
arch: Rename g_intstackbase to g_intstacktop
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Masayuki Ishikawa
parent
97e6d35c3a
commit
8640d82ce0
@@ -71,11 +71,11 @@ static uint32_t s_last_regs[XCPTCONTEXT_REGS];
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
||||
static void up_stackdump(uint32_t sp, uint32_t stack_top)
|
||||
{
|
||||
uint32_t stack ;
|
||||
|
||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||
for (stack = sp & ~0x1f; stack < stack_top; stack += 32)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)stack;
|
||||
_alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
@@ -84,7 +84,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define up_stackdump(sp,stack_base)
|
||||
# define up_stackdump(sp,stack_top)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -215,7 +215,7 @@ static void up_dumpstate(void)
|
||||
/* Get the limits on the interrupt stack memory */
|
||||
|
||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
istackbase = (uint32_t)&g_intstackbase;
|
||||
istackbase = (uint32_t)&g_intstackalloc;
|
||||
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
|
||||
|
||||
/* Show interrupt stack info */
|
||||
@@ -232,16 +232,16 @@ static void up_dumpstate(void)
|
||||
* stack?
|
||||
*/
|
||||
|
||||
if (sp < istackbase && sp >= istackbase - istacksize)
|
||||
if (sp >= istackbase && sp < istackbase + istacksize)
|
||||
{
|
||||
/* Yes.. dump the interrupt stack */
|
||||
|
||||
up_stackdump(sp, istackbase);
|
||||
up_stackdump(sp, istackbase + istacksize);
|
||||
}
|
||||
else if (CURRENT_REGS)
|
||||
{
|
||||
_alert("ERROR: Stack pointer is not within the interrupt stack\n");
|
||||
up_stackdump(istackbase - istacksize, istackbase);
|
||||
up_stackdump(istackbase, istackbase + istacksize);
|
||||
}
|
||||
|
||||
/* Extract the user stack pointer if we are in an interrupt handler.
|
||||
|
||||
@@ -145,7 +145,7 @@ EXTERN const uint32_t g_idle_topstack;
|
||||
|
||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
EXTERN uint32_t g_intstackalloc; /* Allocated stack base */
|
||||
EXTERN uint32_t g_intstackbase; /* Initial top of interrupt stack */
|
||||
EXTERN uint32_t g_intstacktop; /* Initial top of interrupt stack */
|
||||
#endif
|
||||
|
||||
/* These 'addresses' of these values are setup by the linker script. They
|
||||
|
||||
Reference in New Issue
Block a user