arch: Rename g_intstackbase to g_intstacktop

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2021-04-12 20:40:11 +08:00
committed by Masayuki Ishikawa
parent 97e6d35c3a
commit 8640d82ce0
81 changed files with 393 additions and 371 deletions
+7 -7
View File
@@ -73,11 +73,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",
@@ -86,7 +86,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
/****************************************************************************
@@ -177,7 +177,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 */
@@ -194,17 +194,17 @@ static void up_dumpstate(void)
* stack?
*/
if (sp < istackbase && sp >= istackbase - istacksize)
if (sp >= istackbase && sp < istackbase + istacksize)
{
/* Yes.. dump the interrupt stack */
_alert("Interrupt Stack\n", sp);
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.
+8 -8
View File
@@ -109,7 +109,7 @@ arm_vectorirq:
#if CONFIG_ARCH_INTERRUPTSTACK > 3
/* Call arm_decodeirq() on the interrupt stack */
ldr sp, .Lirqstackbase /* SP = interrupt stack base */
ldr sp, .Lirqstacktop /* SP = interrupt stack top */
str r0, [sp, #-4]! /* Save the xcp address at SP-4 then update SP */
bl arm_decodeirq /* Call the handler */
ldr sp, [sp] /* Restore the user stack pointer */
@@ -126,8 +126,8 @@ arm_vectorirq:
ldmia sp, {r0-r15}^ /* Return */
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.Lirqstackbase:
.word g_intstackbase
.Lirqstacktop:
.word g_intstacktop
#endif
.size arm_vectorirq, . - arm_vectorirq
@@ -414,7 +414,7 @@ arm_vectorfiq:
.size arm_vectorfiq, . - arm_vectorfiq
/****************************************************************************
* Name: g_intstackalloc/g_intstackbase
* Name: g_intstackalloc/g_intstacktop
****************************************************************************/
#if CONFIG_ARCH_INTERRUPTSTACK > 3
@@ -423,13 +423,13 @@ arm_vectorfiq:
.globl g_intstackalloc
.type g_intstackalloc, object
.globl g_intstackbase
.type g_intstackbase, object
.globl g_intstacktop
.type g_intstacktop, object
g_intstackalloc:
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~3)
g_intstackbase:
.size g_intstackbase, 0
g_intstacktop:
.size g_intstacktop, 0
.size g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~3)
#endif
+7 -7
View File
@@ -72,11 +72,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",
@@ -85,7 +85,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.
+4 -4
View File
@@ -142,7 +142,7 @@ exception_common:
*/
#if CONFIG_ARCH_INTERRUPTSTACK > 3
ldr r7, =g_intstackbase /* R7=Base of the interrupt stack */
ldr r7, =g_intstacktop /* R7=Top of the interrupt stack */
mov sp, r7 /* Set the new stack point */
push {r1} /* Save the MSP on the interrupt stack */
bl arm_doirq /* R0=IRQ, R1=register save area on stack */
@@ -248,7 +248,7 @@ exception_common:
.size exception_common, .-exception_common
/****************************************************************************
* Name: g_intstackalloc/g_intstackbase
* Name: g_intstackalloc/g_intstacktop
*
* Description:
* Shouldn't happen
@@ -258,11 +258,11 @@ exception_common:
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.bss
.global g_intstackalloc
.global g_intstackbase
.global g_intstacktop
.balign 4
g_intstackalloc:
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~3)
g_intstackbase:
g_intstacktop:
.size g_intstackalloc, .-g_intstackalloc
#endif
+13 -13
View File
@@ -75,11 +75,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",
@@ -88,7 +88,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
/****************************************************************************
@@ -221,9 +221,9 @@ static void up_dumpstate(void)
/* Get the limits on the interrupt stack memory */
#ifdef CONFIG_SMP
istackbase = (uint32_t)arm_intstack_base();
istackbase = (uint32_t)arm_intstack_alloc();
#else
istackbase = (uint32_t)&g_intstackbase;
istackbase = (uint32_t)&g_intstackalloc;
#endif
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~7);
@@ -251,8 +251,7 @@ static void up_dumpstate(void)
if (rtcb->xcp.kstack)
{
kstackbase = (uint32_t)rtcb->xcp.kstack +
CONFIG_ARCH_KERNEL_STACKSIZE;
kstackbase = (uint32_t)rtcb->xcp.kstack;
_alert("Kernel stack:\n");
_alert(" base: %08x\n", kstackbase);
@@ -263,17 +262,17 @@ static void up_dumpstate(void)
#if CONFIG_ARCH_INTERRUPTSTACK > 7
/* Does the current stack pointer lie within the interrupt stack? */
if (sp >= istackbase - istacksize && sp < istackbase)
if (sp >= istackbase && sp < istackbase + istacksize)
{
/* Yes.. dump the interrupt stack */
_alert("Interrupt Stack\n", sp);
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);
}
#endif
@@ -303,10 +302,11 @@ static void up_dumpstate(void)
* kernel stack memory.
*/
else if (sp >= (uint32_t)rtcb->xcp.kstack && sp < kstackbase)
else if (sp >= kstackbase &&
sp < kstackbase + CONFIG_ARCH_KERNEL_STACKSIZE)
{
_alert("Kernel Stack\n", sp);
up_stackdump(sp, kstackbase);
up_stackdump(sp, kstackbase + CONFIG_ARCH_KERNEL_STACKSIZE);
}
#endif
else
@@ -314,7 +314,7 @@ static void up_dumpstate(void)
_alert("ERROR: Stack pointer is not within the allocated stack\n");
up_stackdump(ustackbase - ustacksize, ustackbase);
#ifdef CONFIG_ARCH_KERNEL_STACK
up_stackdump((uint32_t)rtcb->xcp.kstack, kstackbase);
up_stackdump(kstackbase, kstackbase + CONFIG_ARCH_KERNEL_STACKSIZE);
#endif
}
+18 -18
View File
@@ -69,7 +69,7 @@
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
.macro setirqstack, tmp1, tmp2
ldr sp, .Lirqstackbase /* SP = IRQ stack top */
ldr sp, .Lirqstacktop /* SP = IRQ stack top */
.endm
#endif
@@ -84,7 +84,7 @@
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
.macro setfiqstack, tmp1, tmp2
ldr sp, .Lfiqstackbase /* SP = FIQ stack top */
ldr sp, .Lfiqstacktop /* SP = FIQ stack top */
.endm
#endif
@@ -204,7 +204,7 @@ arm_vectorirq:
#if CONFIG_ARCH_INTERRUPTSTACK > 7
/* Call arm_decodeirq() on the interrupt stack */
setirqstack r1, r3 /* SP = interrupt stack base */
setirqstack r1, r3 /* SP = interrupt stack top */
str r0, [sp, #-4]! /* Save the xcp address at SP-4 then update SP */
mov r4, sp /* Save the SP in a preserved register */
bic sp, sp, #7 /* Force 8-byte alignment */
@@ -257,8 +257,8 @@ arm_vectorirq:
ldmia r0, {r0-r15}^ /* Return */
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
.Lirqstackbase:
.word g_intstackbase
.Lirqstacktop:
.word g_intstacktop
#endif
.size arm_vectorirq, . - arm_vectorirq
@@ -903,7 +903,7 @@ arm_vectorfiq:
mov r0, sp /* Get r0=xcp */
#if CONFIG_ARCH_INTERRUPTSTACK > 7
setfiqstack r1, r4 /* SP = interrupt stack base */
setfiqstack r1, r4 /* SP = interrupt stack top */
str r0, [sp, #-4]! /* Save the xcp address at SP-4 then update SP */
mov r4, sp /* Save the SP in a preserved register */
bic sp, sp, #7 /* Force 8-byte alignment */
@@ -954,8 +954,8 @@ arm_vectorfiq:
ldmia r0, {r0-r15}^ /* Return */
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
.Lfiqstackbase:
.word g_fiqstackbase
.Lfiqstacktop:
.word g_fiqstacktop
#endif
#else
@@ -964,7 +964,7 @@ arm_vectorfiq:
.size arm_vectorfiq, . - arm_vectorfiq
/****************************************************************************
* Name: g_intstackalloc/g_intstackbase
* Name: g_intstackalloc/g_intstacktop
****************************************************************************/
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
@@ -973,28 +973,28 @@ arm_vectorfiq:
.globl g_intstackalloc
.type g_intstackalloc, object
.globl g_intstackbase
.type g_intstackbase, object
.globl g_intstacktop
.type g_intstacktop, object
g_intstackalloc:
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
g_intstackbase:
.size g_intstackbase, 0
g_intstacktop:
.size g_intstacktop, 0
.size g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~7)
/****************************************************************************
* Name: g_fiqstackalloc/g_fiqstackbase
* Name: g_fiqstackalloc/g_fiqstacktop
****************************************************************************/
.globl g_fiqstackalloc
.type g_fiqstackalloc, object
.globl g_fiqstackbase
.type g_fiqstackbase, object
.globl g_fiqstacktop
.type g_fiqstacktop, object
g_fiqstackalloc:
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
g_fiqstackbase:
.size g_fiqstackbase, 0
g_fiqstacktop:
.size g_fiqstacktop, 0
.size g_fiqstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~7)
#endif /* !CONFIG_SMP && CONFIG_ARCH_INTERRUPTSTACK > 7 */
+8 -8
View File
@@ -75,11 +75,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",
@@ -88,7 +88,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
/****************************************************************************
@@ -224,9 +224,9 @@ static void up_dumpstate(void)
/* Get the limits on the interrupt stack memory */
#ifdef CONFIG_SMP
istackbase = (uint32_t)arm_intstack_base();
istackbase = (uint32_t)arm_intstack_alloc();
#else
istackbase = (uint32_t)&g_intstackbase;
istackbase = (uint32_t)&g_intstackalloc;
#endif
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~7);
@@ -244,16 +244,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.
+4 -4
View File
@@ -107,7 +107,7 @@
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
.macro setintstack, tmp1, tmp2
ldr sp, =g_intstackbase
ldr sp, =g_intstacktop
.endm
#endif
@@ -311,7 +311,7 @@ exception_common:
.size exception_common, .-exception_common
/****************************************************************************
* Name: g_intstackalloc/g_intstackbase
* Name: g_intstackalloc/g_intstacktop
*
* Description:
* Shouldn't happen
@@ -321,11 +321,11 @@ exception_common:
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
.bss
.global g_intstackalloc
.global g_intstackbase
.global g_intstacktop
.balign 8
g_intstackalloc:
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
g_intstackbase:
g_intstacktop:
.size g_intstackalloc, .-g_intstackalloc
#endif
+4 -4
View File
@@ -88,7 +88,7 @@
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
.macro setintstack, tmp1, tmp2
ldr sp, =g_intstackbase
ldr sp, =g_intstacktop
.endm
#endif
@@ -329,7 +329,7 @@ exception_common:
.size exception_common, .-exception_common
/****************************************************************************
* Name: g_intstackalloc/g_intstackbase
* Name: g_intstackalloc/g_intstacktop
*
* Description:
* Shouldn't happen
@@ -339,11 +339,11 @@ exception_common:
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
.bss
.global g_intstackalloc
.global g_intstackbase
.global g_intstacktop
.balign 8
g_intstackalloc:
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
g_intstackbase:
g_intstacktop:
.size g_intstackalloc, .-g_intstackalloc
#endif
+12 -12
View File
@@ -72,11 +72,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",
@@ -85,7 +85,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
/****************************************************************************
@@ -217,7 +217,7 @@ static void up_dumpstate(void)
#if CONFIG_ARCH_INTERRUPTSTACK > 7
/* Get the limits on the interrupt stack memory */
istackbase = (uint32_t)&g_intstackbase;
istackbase = (uint32_t)&g_intstackalloc;
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~7);
/* Show interrupt stack info */
@@ -244,8 +244,7 @@ static void up_dumpstate(void)
if (rtcb->xcp.kstack)
{
kstackbase = (uint32_t)rtcb->xcp.kstack +
CONFIG_ARCH_KERNEL_STACKSIZE;
kstackbase = (uint32_t)rtcb->xcp.kstack;
_alert("Kernel stack:\n");
_alert(" base: %08x\n", kstackbase);
@@ -256,17 +255,17 @@ static void up_dumpstate(void)
#if CONFIG_ARCH_INTERRUPTSTACK > 7
/* Does the current stack pointer lie within the interrupt stack? */
if (sp >= istackbase - istacksize && sp < istackbase)
if (sp >= istackbase && sp < istackbase + istacksize)
{
/* Yes.. dump the interrupt stack */
_alert("Interrupt Stack\n", sp);
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);
}
#endif
@@ -296,10 +295,11 @@ static void up_dumpstate(void)
* kernel stack memory.
*/
else if (sp >= (uint32_t)rtcb->xcp.kstack && sp < kstackbase)
else if (sp >= kstackbase &&
sp < kstackbase + CONFIG_ARCH_KERNEL_STACKSIZE)
{
_alert("Kernel Stack\n", sp);
up_stackdump(sp, kstackbase);
up_stackdump(sp, kstackbase + CONFIG_ARCH_KERNEL_STACKSIZE);
}
#endif
else
@@ -307,7 +307,7 @@ static void up_dumpstate(void)
_alert("ERROR: Stack pointer is not within the allocated stack\n");
up_stackdump(ustackbase - ustacksize, ustackbase);
#ifdef CONFIG_ARCH_KERNEL_STACK
up_stackdump((uint32_t)rtcb->xcp.kstack, kstackbase);
up_stackdump(kstackbase, kstackbase + CONFIG_ARCH_KERNEL_STACKSIZE);
#endif
}
+16 -16
View File
@@ -158,7 +158,7 @@ arm_vectorirq:
#if CONFIG_ARCH_INTERRUPTSTACK > 7
/* Call arm_decodeirq() on the interrupt stack */
ldr sp, .Lirqstackbase /* SP = interrupt stack base */
ldr sp, .Lirqstacktop /* SP = interrupt stack top */
str r0, [sp, #-4]! /* Save the xcp address at SP-4 then update SP */
mov r4, sp /* Save the SP in a preserved register */
bic sp, sp, #7 /* Force 8-byte alignment */
@@ -211,8 +211,8 @@ arm_vectorirq:
ldmia r0, {r0-r15}^ /* Return */
#if CONFIG_ARCH_INTERRUPTSTACK > 7
.Lirqstackbase:
.word g_intstackbase
.Lirqstacktop:
.word g_intstacktop
#endif
.size arm_vectorirq, . - arm_vectorirq
@@ -857,7 +857,7 @@ arm_vectorfiq:
mov r0, sp /* Get r0=xcp */
#if CONFIG_ARCH_INTERRUPTSTACK > 7
ldr sp, .Lfiqstackbase /* SP = interrupt stack base */
ldr sp, .Lfiqstacktop /* SP = interrupt stack top */
str r0, [sp, #-4]! /* Save the xcp address at SP-4 then update SP */
mov r4, sp /* Save the SP in a preserved register */
bic sp, sp, #7 /* Force 8-byte alignment */
@@ -908,8 +908,8 @@ arm_vectorfiq:
ldmia r0, {r0-r15}^ /* Return */
#if CONFIG_ARCH_INTERRUPTSTACK > 7
.Lfiqstackbase:
.word g_fiqstackbase
.Lfiqstacktop:
.word g_fiqstacktop
#endif
#else
@@ -918,7 +918,7 @@ arm_vectorfiq:
.size arm_vectorfiq, . - arm_vectorfiq
/****************************************************************************
* Name: g_intstackalloc/g_intstackbase
* Name: g_intstackalloc/g_intstacktop
****************************************************************************/
#if CONFIG_ARCH_INTERRUPTSTACK > 7
@@ -927,28 +927,28 @@ arm_vectorfiq:
.globl g_intstackalloc
.type g_intstackalloc, object
.globl g_intstackbase
.type g_intstackbase, object
.globl g_intstacktop
.type g_intstacktop, object
g_intstackalloc:
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
g_intstackbase:
.size g_intstackbase, 0
g_intstacktop:
.size g_intstacktop, 0
.size g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~7)
/****************************************************************************
* Name: g_fiqstackalloc/g_fiqstackbase
* Name: g_fiqstackalloc/g_fiqstacktop
****************************************************************************/
.globl g_fiqstackalloc
.type g_fiqstackalloc, object
.globl g_fiqstackbase
.type g_fiqstackbase, object
.globl g_fiqstacktop
.type g_fiqstacktop, object
g_fiqstackalloc:
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
g_fiqstackbase:
.size g_fiqstackbase, 0
g_fiqstacktop:
.size g_fiqstacktop, 0
.size g_fiqstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~7)
#endif /* CONFIG_ARCH_INTERRUPTSTACK > 7 */
+8 -8
View File
@@ -75,11 +75,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",
@@ -88,7 +88,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
/****************************************************************************
@@ -224,9 +224,9 @@ static void up_dumpstate(void)
/* Get the limits on the interrupt stack memory */
#ifdef CONFIG_SMP
istackbase = (uint32_t)arm_intstack_base();
istackbase = (uint32_t)arm_intstack_alloc();
#else
istackbase = (uint32_t)&g_intstackbase;
istackbase = (uint32_t)&g_intstackalloc;
#endif
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~7);
@@ -244,16 +244,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.
+4 -4
View File
@@ -111,7 +111,7 @@
ldr \tmp1, =g_intstackalloc
msr msplim, \tmp1
#endif
ldr sp, =g_intstackbase
ldr sp, =g_intstacktop
.endm
#endif
@@ -347,7 +347,7 @@ exception_common:
.size exception_common, .-exception_common
/****************************************************************************
* Name: g_intstackalloc/g_intstackbase
* Name: g_intstackalloc/g_intstacktop
*
* Description:
* Shouldn't happen
@@ -357,11 +357,11 @@ exception_common:
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
.bss
.global g_intstackalloc
.global g_intstackbase
.global g_intstacktop
.balign 8
g_intstackalloc:
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
g_intstackbase:
g_intstacktop:
.size g_intstackalloc, .-g_intstackalloc
#endif
+4 -4
View File
@@ -92,7 +92,7 @@
ldr \tmp1, =g_intstackalloc
msr msplim, \tmp1
#endif
ldr sp, =g_intstackbase
ldr sp, =g_intstacktop
.endm
#endif
@@ -362,7 +362,7 @@ exception_common:
.size exception_common, .-exception_common
/****************************************************************************
* Name: g_intstackalloc/g_intstackbase
* Name: g_intstackalloc/g_intstacktop
*
* Description:
* Shouldn't happen
@@ -372,11 +372,11 @@ exception_common:
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
.bss
.global g_intstackalloc
.global g_intstackbase
.global g_intstacktop
.balign 8
g_intstackalloc:
.skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7)
g_intstackbase:
g_intstacktop:
.size g_intstackalloc, .-g_intstackalloc
#endif
+8 -8
View File
@@ -145,7 +145,7 @@ arm_vectorirq:
mov r1, sp /* Get r1=xcp */
#if CONFIG_ARCH_INTERRUPTSTACK > 3
ldr sp, .Lirqstackbase /* SP = interrupt stack base */
ldr sp, .Lirqstacktop /* SP = interrupt stack top */
str r1, [sp, #-4]! /* Save the xcp address at SP-4 then update SP */
bl arm_doirq /* Call the handler */
ldr sp, [sp] /* Restore the user stack pointer */
@@ -162,8 +162,8 @@ arm_vectorirq:
.Lirqtmp:
.word g_irqtmp
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.Lirqstackbase:
.word g_intstackbase
.Lirqstacktop:
.word g_intstacktop
#endif
.align 5
@@ -446,7 +446,7 @@ arm_vectoraddrexcptn:
b arm_vectoraddrexcptn
/****************************************************************************
* Name: g_intstackalloc/g_intstackbase
* Name: g_intstackalloc/g_intstacktop
*
* Description:
* Shouldn't happen
@@ -457,13 +457,13 @@ arm_vectoraddrexcptn:
.bss
.balign 4
.global g_intstackalloc
.global g_intstackbase
.global g_intstacktop
.type g_intstackalloc, object
.type g_intstackbase, object
.type g_intstacktop, object
g_intstackalloc:
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~3)
g_intstackbase:
.size g_intstackbase, 0
g_intstacktop:
.size g_intstacktop, 0
.size g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~3)
#endif
.end
+1 -1
View File
@@ -218,7 +218,7 @@ EXTERN const uintptr_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
+4 -4
View File
@@ -629,16 +629,16 @@ int up_prioritize_irq(int irq, int priority)
#endif
/****************************************************************************
* Name: arm_intstack_base
* Name: arm_intstack_top
*
* Description:
* Return a pointer to the "base" the correct interrupt stack allocation
* for the current CPU. NOTE: Here, the base means "top" of the stack
* Return a pointer to the top the correct interrupt stack allocation
* for the current CPU.
*
****************************************************************************/
#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
uintptr_t arm_intstack_base(void)
uintptr_t arm_intstack_top(void)
{
return g_cpu_intstack_top[up_cpu_index()];
}
+1 -1
View File
@@ -61,8 +61,8 @@ extern "C"
****************************************************************************/
#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
EXTERN uintptr_t arm_intstack_base(void);
EXTERN uintptr_t arm_intstack_alloc(void);
EXTERN uintptr_t arm_intstack_top(void);
#endif
#undef EXTERN
+4 -4
View File
@@ -173,16 +173,16 @@ void up_irqinitialize(void)
}
/****************************************************************************
* Name: arm_intstack_base
* Name: arm_intstack_top
*
* Description:
* Return a pointer to the "base" the correct interrupt stack allocation
* for the current CPU. NOTE: Here, the base means "top" of the stack
* Return a pointer to the top the correct interrupt stack allocation
* for the current CPU.
*
****************************************************************************/
#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
uintptr_t arm_intstack_base(void)
uintptr_t arm_intstack_top(void)
{
return g_irqstack_top[up_cpu_index()];
}
+1 -1
View File
@@ -57,8 +57,8 @@ extern "C"
****************************************************************************/
#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
EXTERN uintptr_t arm_intstack_base(void);
EXTERN uintptr_t arm_intstack_alloc(void);
EXTERN uintptr_t arm_intstack_top(void);
#endif
#undef EXTERN
+4 -4
View File
@@ -861,16 +861,16 @@ int lc823450_irq_register(int irq, struct lc823450_irq_ops *ops)
#endif /* CONFIG_LC823450_VIRQ */
/****************************************************************************
* Name: arm_intstack_base
* Name: arm_intstack_top
*
* Description:
* Return a pointer to the "base" the correct interrupt stack allocation
* for the current CPU. NOTE: Here, the base means "top" of the stack
* Return a pointer to the top the correct interrupt stack allocation
* for the current CPU.
*
****************************************************************************/
#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
uintptr_t arm_intstack_base(void)
uintptr_t arm_intstack_top(void)
{
return g_cpu_intstack_top[up_cpu_index()];
}
+1 -1
View File
@@ -57,8 +57,8 @@ extern "C"
****************************************************************************/
#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
EXTERN uintptr_t arm_intstack_base(void);
EXTERN uintptr_t arm_intstack_alloc(void);
EXTERN uintptr_t arm_intstack_top(void);
#endif
#undef EXTERN
+4 -4
View File
@@ -470,16 +470,16 @@ int up_prioritize_irq(int irq, int priority)
#endif
/****************************************************************************
* Name: arm_intstack_base
* Name: arm_intstack_top
*
* Description:
* Return a pointer to the "base" the correct interrupt stack allocation
* for the current CPU. NOTE: Here, the base means "top" of the stack
* Return a pointer to the top the correct interrupt stack allocation
* for the current CPU.
*
****************************************************************************/
#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
uintptr_t arm_intstack_base(void)
uintptr_t arm_intstack_top(void)
{
return g_cpu_intstack_top[up_cpu_index()];
}
+1 -1
View File
@@ -61,8 +61,8 @@ extern "C"
****************************************************************************/
#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
EXTERN uintptr_t arm_intstack_base(void);
EXTERN uintptr_t arm_intstack_alloc(void);
EXTERN uintptr_t arm_intstack_top(void);
#endif
#undef EXTERN
+8 -6
View File
@@ -145,17 +145,19 @@ excpt_common:
reti
/****************************************************************************************************
* Name: up_interruptstack
* Name: g_intstackalloc
****************************************************************************************************/
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.bss
.align 4
.globl up_interruptstack
.type up_interruptstack, object
up_interruptstack:
.globl g_intstackalloc
.type g_intstackalloc, object
.globl g_intstacktop
.type g_intstacktop, object
g_intstackalloc:
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~3)
.Lintstackbase:
.size up_interruptstack, .-up_interruptstack
g_intstacktop:
.size g_intstackalloc, .-g_intstackalloc
#endif
.end
+8 -6
View File
@@ -234,17 +234,19 @@ excpt_common:
reti
/****************************************************************************************************
* Name: up_interruptstack
* Name: g_intstackalloc
****************************************************************************************************/
#if CONFIG_ARCH_INTERRUPTSTACK > 0
.bss
.align 4
.globl up_interruptstack
.type up_interruptstack, object
up_interruptstack:
.globl g_intstackalloc
.type g_intstackalloc, object
.globl g_intstacktop
.type g_intstacktop, object
g_intstackalloc:
.skip CONFIG_ARCH_INTERRUPTSTACK
.Lintstackbase:
.size up_interruptstack, .-up_interruptstack
g_intstacktop:
.size g_intstackalloc, .-g_intstackalloc
#endif
.end
+2 -1
View File
@@ -47,7 +47,8 @@
****************************************************************************/
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.global g_intstackbase
.global g_intstackalloc
.global g_intstacktop
.global g_nestlevel
#endif
+2 -3
View File
@@ -167,9 +167,8 @@ ssize_t up_check_stack_remain(void)
#if CONFIG_ARCH_INTERRUPTSTACK > 3
size_t up_check_intstack(void)
{
uintptr_t start = (uintptr_t)g_intstackbase -
(CONFIG_ARCH_INTERRUPTSTACK & ~3);
return do_stackcheck(start, (CONFIG_ARCH_INTERRUPTSTACK & ~3));
uintptr_t start = (uintptr_t)g_intstackalloc;
return do_stackcheck(start, CONFIG_ARCH_INTERRUPTSTACK & ~3);
}
size_t up_check_intstack_remain(void)
+6 -6
View File
@@ -47,11 +47,11 @@
* Name: up_stackdump
****************************************************************************/
static void up_stackdump(uint16_t sp, uint16_t stack_base)
static void up_stackdump(uint16_t sp, uint16_t stack_top)
{
uint16_t stack ;
for (stack = sp & ~3; stack < stack_base; stack += 12)
for (stack = sp & ~3; stack < stack_top; stack += 12)
{
uint8_t *ptr = (uint8_t *)stack;
_alert("%04x: %02x %02x %02x %02x %02x %02x %02x %02x"
@@ -145,7 +145,7 @@ void up_dumpstate(void)
/* Get the limits on the interrupt stack memory */
#if CONFIG_ARCH_INTERRUPTSTACK > 0
istackbase = (uint16_t)&g_intstackbase;
istackbase = (uint16_t)&g_intstackalloc;
istacksize = CONFIG_ARCH_INTERRUPTSTACK;
/* Show interrupt stack info */
@@ -162,16 +162,16 @@ 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 (g_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.
+6 -6
View File
@@ -47,11 +47,11 @@
* Name: up_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",
@@ -115,7 +115,7 @@ 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 */
@@ -132,16 +132,16 @@ 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 (g_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.
+10 -8
View File
@@ -287,7 +287,7 @@ avr32_common:
#if CONFIG_ARCH_INTERRUPTSTACK > 3
mov r7, sp
lddpc sp, .Linstackbaseptr
lddpc sp, .Linstacktopptr
#endif
/* Call up_doirq with r12=IRQ number and r11=register save area */
@@ -335,8 +335,8 @@ avr32_common:
.word up_fullcontextrestore
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.Linstackbaseptr:
.word .Lintstackbase
.Linstacktopptr:
.word g_intstacktop
#endif
.size vectortab, .-vectortab
@@ -347,11 +347,13 @@ avr32_common:
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.bss
.align 4
.globl up_interruptstack
.type up_interruptstack, object
up_interruptstack:
.globl g_intstackalloc
.type g_intstackalloc, object
.globl g_intstacktop
.type g_intstacktop, object
g_intstackalloc:
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~3)
.Lintstackbase:
.size up_interruptstack, .-up_interruptstack
g_intstacktop:
.size g_intstackalloc, .-g_intstackalloc
#endif
.end
+1 -1
View File
@@ -83,7 +83,7 @@ void up_initial_state(struct tcb_s *tcb)
xcp->regs[REG_LR] = 0;
#endif
/* Set the initial stack pointer to the "base" of the allocated stack */
/* Set the initial stack pointer to the top of the allocated stack */
xcp->regs[REG_SP] = (uint32_t)tcb->adj_stack_ptr;
+2 -1
View File
@@ -71,7 +71,8 @@ typedef void (*up_vector_t)(void);
/* Address of the saved user stack pointer */
#if CONFIG_ARCH_INTERRUPTSTACK > 3
extern void g_intstackbase;
extern void g_intstackalloc;
extern void g_intstacktop;
#endif
/* These 'addresses' of these values are setup by the linker script. They
+2 -1
View File
@@ -107,7 +107,8 @@ extern uint16_t g_idle_topstack;
/* Address of the saved user stack pointer */
#if CONFIG_ARCH_INTERRUPTSTACK > 1
extern uint32_t g_intstackbase;
extern uint32_t g_intstackalloc;
extern uint32_t g_intstacktop;
#endif
/****************************************************************************
+7 -7
View File
@@ -72,11 +72,11 @@ static uint8_t s_last_regs[XCPTCONTEXT_REGS];
****************************************************************************/
#ifdef CONFIG_ARCH_STACKDUMP
static void up_stackdump(uint16_t sp, uint16_t stack_base)
static void up_stackdump(uint16_t sp, uint16_t stack_top)
{
uint16_t stack;
for (stack = sp; stack < stack_base; stack += 16)
for (stack = sp; stack < stack_top; stack += 16)
{
uint8_t *ptr = (uint8_t *)stack;
@@ -190,7 +190,7 @@ static void up_dumpstate(void)
/* Get the limits on the interrupt stack memory */
#if CONFIG_ARCH_INTERRUPTSTACK > 3
istackbase = (uint16_t)&g_intstackbase;
istackbase = (uint16_t)&g_intstackalloc;
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
/* Show interrupt stack info */
@@ -204,23 +204,23 @@ 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);
/* Extract the user stack pointer which should lie
* at the base of the interrupt stack.
*/
sp = g_intstackbase;
sp = g_intstacktop;
_alert("sp: %04x\n", sp);
}
else if (g_current_regs)
{
_alert("ERROR: Stack pointer is not within the interrupt stack\n");
up_stackdump(istackbase - istacksize, istackbase);
up_stackdump(istackbase, istackbase + istacksize);
}
/* Show user stack info */
+4 -4
View File
@@ -417,7 +417,7 @@ up_fullcontextrestore:
.comm .Lspsave, 2, 1
/************************************************************************************
* Name: up_interruptstack/g_intstackbase
* Name: g_intstackalloc/g_intstacktop
*
* Description:
* If CONFIG_ARCH_INTERRUPTSTACK is defined, this sets aside memory for the
@@ -426,8 +426,8 @@ up_fullcontextrestore:
************************************************************************************/
#if CONFIG_ARCH_INTERRUPTSTACK > 1
.comm .up_interruptstack:, CONFIG_ARCH_INTERRUPTSTACK, 1
up_interruptstack_base:
.size up_interruptstack, .-up_interruptstack
.comm .g_intstackalloc:, CONFIG_ARCH_INTERRUPTSTACK, 1
g_intstacktop:
.size g_intstackalloc, .-g_intstackalloc
#endif
.end
+2 -1
View File
@@ -120,7 +120,8 @@ extern uint32_t g_idle_topstack;
/* Address of the saved user stack pointer */
#if CONFIG_ARCH_INTERRUPTSTACK > 3
extern void g_intstackbase;
extern void g_intstackalloc;
extern void g_intstacktop;
#endif
/* These 'addresses' of these values are setup by the linker script. They are
+7 -7
View File
@@ -48,11 +48,11 @@
* Name: up_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("%08" PRIx32 ": %08" PRIx32 " %08" PRIx32
@@ -145,7 +145,7 @@ 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 */
@@ -159,23 +159,23 @@ 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);
/* Extract the user stack pointer which should lie
* at the base of the interrupt stack.
*/
sp = g_intstackbase;
sp = g_intstacktop;
_alert("sp: %08" PRIx32 "\n", sp);
}
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);
}
/* Show user stack info */
+3 -2
View File
@@ -41,7 +41,8 @@
****************************************************************************/
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.global g_intstackbase
.global g_intstackalloc
.global g_intstacktop
#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS
.global g_nestlevel
#endif
@@ -391,7 +392,7 @@
* interrupt stack first.
*/
la \tmp3, g_intstackbase
la \tmp3, g_intstacktop
lw \tmp4, (\tmp3)
sw sp, (\tmp4)
move sp, \tmp4
+11 -5
View File
@@ -102,7 +102,8 @@
.global halt
.global devconfig
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.global g_intstackbase
.global g_intstackalloc
.global g_intstacktop
#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS
.global g_nestlevel
#endif
@@ -661,15 +662,20 @@ devconfig0:
#if CONFIG_ARCH_INTERRUPTSTACK > 3
/* g_instackbase is a pointer to the final, aligned word of the interrupt
/* g_instacktop is a pointer to the final, aligned word of the interrupt
* stack.
*/
.sdata
.type g_intstackbase, object
g_intstackbase:
.type g_intstackalloc, object
g_intstackalloc:
.long PIC32MX_INTSTACK_BASE
.size g_intstackalloc, .-g_intstackalloc
.type g_intstacktop, object
g_intstacktop:
.long PIC32MX_INTSTACK_TOP
.size g_intstackbase, .-g_intstackbase
.size g_intstacktop, .-g_intstacktop
/* g_nextlevel is the exception nesting level... the interrupt stack is not
* available to nested exceptions.
+2 -1
View File
@@ -41,7 +41,8 @@
****************************************************************************/
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.global g_intstackbase
.global g_intstackalloc
.global g_intstacktop
#ifdef CONFIG_PIC32MZ_NESTED_INTERRUPTS
.global g_nestlevel
#endif
+11 -5
View File
@@ -167,7 +167,8 @@
.global halt
.global devcfg
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.global g_intstackbase
.global g_intstackalloc
.global g_intstacktop
#ifdef CONFIG_PIC32MZ_NESTED_INTERRUPTS
.global g_nestlevel
#endif
@@ -918,15 +919,20 @@ adevcfg0:
#if CONFIG_ARCH_INTERRUPTSTACK > 3
/* g_instackbase is a pointer to the final, aligned word of the interrupt
/* g_instacktop is a pointer to the final, aligned word of the interrupt
* stack.
*/
.sdata
.type g_intstackbase, object
g_intstackbase:
.type g_intstackalloc, object
g_intstackalloc:
.long PIC32MZ_INTSTACK_BASE
.size g_intstackalloc, .-g_intstackalloc
.type g_intstacktop, object
g_intstacktop:
.long PIC32MZ_INTSTACK_TOP
.size g_intstackbase, .-g_intstackbase
.size g_intstacktop, .-g_intstacktop
/* g_nextlevel is the exception nesting level... the interrupt stack is not
* available to nested exceptions.
+7 -7
View File
@@ -62,11 +62,11 @@
* Name: up_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",
@@ -147,7 +147,7 @@ void lm32_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 */
@@ -161,23 +161,23 @@ void lm32_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);
/* Extract the user stack pointer which should lie
* at the base of the interrupt stack.
*/
sp = g_intstackbase;
sp = g_intstacktop;
_alert("sp: %08x\n", sp);
}
else if (g_current_regs)
{
_alert("ERROR: Stack pointer is not within the interrupt stack\n");
up_stackdump(istackbase - istacksize, istackbase);
up_stackdump(istackbase, istackbase + istacksize);
}
/* Show user stack info */
+7 -7
View File
@@ -62,11 +62,11 @@
* Name: up_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",
@@ -154,7 +154,7 @@ void minerva_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 */
@@ -166,23 +166,23 @@ void minerva_dumpstate(void)
/* Does the current stack pointer lie within the interrupt 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);
/* Extract the user stack pointer which should lie at the base of the
* interrupt stack.
*/
sp = g_intstackbase;
sp = g_intstacktop;
_alert("sp: %08x\n", sp);
}
else if (g_current_regs)
{
_alert("ERROR: Stack pointer is not within the interrupt stack\n");
up_stackdump(istackbase - istacksize, istackbase);
up_stackdump(istackbase, istackbase + istacksize);
}
/* Show user stack info */
+7 -7
View File
@@ -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.
+1 -1
View File
@@ -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
+2 -1
View File
@@ -257,7 +257,8 @@ extern uint32_t g_svarvect; /* Start of variable vectors */
#ifndef __ASSEMBLY__
# if CONFIG_ARCH_INTERRUPTSTACK > 3
extern uint16_t g_intstackbase;
extern uint16_t g_intstackalloc;
extern uint16_t g_intstacktop;
# endif
#endif
+5 -5
View File
@@ -63,11 +63,11 @@ static inline uint16_t m16c_getusersp(void)
* Name: m16c_stackdump
****************************************************************************/
static void m16c_stackdump(uint16_t sp, uint16_t stack_base)
static void m16c_stackdump(uint16_t sp, uint16_t stack_top)
{
uint16_t stack;
for (stack = sp & ~7; stack < stack_base; stack += 8)
for (stack = sp & ~7; stack < stack_top; stack += 8)
{
uint8_t *ptr = (uint8_t *)stack;
_alert("%04x: %02x %02x %02x %02x %02x %02x %02x %02x\n",
@@ -165,11 +165,11 @@ void up_dumpstate(void)
* stack?
*/
if (sp < istackbase && sp >= istackbase - istacksize)
if (sp >= istackbase && sp < istackbase + istacksize)
{
/* Yes.. dump the interrupt stack */
m16c_stackdump(sp, istackbase);
m16c_stackdump(sp, istackbase + istacksize);
/* Extract the user stack pointer from the register area */
@@ -179,7 +179,7 @@ void up_dumpstate(void)
else if (g_current_regs)
{
_alert("ERROR: Stack pointer is not within the interrupt stack\n");
m16c_stackdump(istackbase - istacksize, istackbase);
m16c_stackdump(istackbase, istackbase + istacksize);
}
/* Show user stack info */
+5 -5
View File
@@ -65,11 +65,11 @@ static inline uint16_t rx65n_getusersp(void)
* Name: rx65n_stackdump
****************************************************************************/
static void rx65n_stackdump(uint16_t sp, uint16_t stack_base)
static void rx65n_stackdump(uint16_t sp, uint16_t stack_top)
{
uint16_t stack;
for (stack = sp & ~7; stack < stack_base; stack += 8) /* check */
for (stack = sp & ~7; stack < stack_top; stack += 8) /* check */
{
uint8_t *ptr = (uint8_t *)&stack;
@@ -162,11 +162,11 @@ void up_dumpstate(void)
* stack?
*/
if (sp < istackbase && sp >= istackbase - istacksize)
if (sp >= istackbase && sp < istackbase + istacksize)
{
/* Yes.. dump the interrupt stack */
rx65n_stackdump(sp, istackbase);
rx65n_stackdump(sp, istackbase + istacksize);
/* Extract the user stack pointer from the register area */
@@ -176,7 +176,7 @@ void up_dumpstate(void)
else if (g_current_regs)
{
_alert("ERROR: Stack pointer is not within the interrupt stack\n");
rx65n_stackdump(istackbase - istacksize, istackbase);
rx65n_stackdump(istackbase, istackbase + istacksize);
}
/* Show user stack info */
+5 -5
View File
@@ -774,7 +774,7 @@ _uprx65_groupal1_handler:
***************************************************************************/
/****************************************************************************
* Name: g_intstackalloc/g_intstackbase
* Name: g_intstackalloc/g_intstacktop
*
* Description:
* Should not happen
@@ -789,12 +789,12 @@ _uprx65_groupal1_handler:
.align 2
.global _g_intstackalloc
.type _g_intstackalloc, object
.global _g_intstackbase
.type _g_intstackbase, object
.global _g_intstacktop
.type _g_intstacktop, object
_g_intstackalloc:
.skip (CONFIG_ARCH_INTERRUPTSTACK & ~3)
_g_intstackbase:
.size _g_intstackbase, 0
_g_intstacktop:
.size _g_intstacktop, 0
.size _g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~3)
#endif

Some files were not shown because too many files have changed in this diff Show More