diff --git a/arch/arm/src/arm/arm_assert.c b/arch/arm/src/arm/arm_assert.c index e4f445bb8069e..4957af560b9eb 100644 --- a/arch/arm/src/arm/arm_assert.c +++ b/arch/arm/src/arm/arm_assert.c @@ -210,18 +210,12 @@ 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); - - /* Extract the user stack pointer which should lie - * at the base of the interrupt stack. - */ - - sp = g_intstackbase; - _alert("sp: %08x\n", sp); } else if (CURRENT_REGS) { @@ -229,6 +223,17 @@ static void up_dumpstate(void) up_stackdump(istackbase - istacksize, istackbase); } + /* Extract the user stack pointer if we are in an interrupt handler. + * If we are not in an interrupt handler. Then sp is the user stack + * pointer (and the above range check should have failed). + */ + + if (CURRENT_REGS) + { + sp = CURRENT_REGS[REG_R13]; + _alert("User sp: %08x\n", sp); + } + /* Show user stack info */ _alert("User stack:\n"); diff --git a/arch/arm/src/arm/arm_vectors.S b/arch/arm/src/arm/arm_vectors.S index c03f091edad5e..9606131192af4 100644 --- a/arch/arm/src/arm/arm_vectors.S +++ b/arch/arm/src/arm/arm_vectors.S @@ -132,7 +132,7 @@ arm_vectorirq: #if CONFIG_ARCH_INTERRUPTSTACK > 3 ldr sp, .Lirqstackbase /* SP = interrupt stack base */ - str r0, [sp] /* Save the user stack pointer */ + 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 */ #else @@ -432,13 +432,13 @@ arm_vectorfiq: #if CONFIG_ARCH_INTERRUPTSTACK > 3 .bss - .align 4 + .balign 4 .globl g_intstackalloc .type g_intstackalloc, object .globl g_intstackbase .type g_intstackbase, object g_intstackalloc: - .skip ((CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4) + .skip (CONFIG_ARCH_INTERRUPTSTACK & ~3) g_intstackbase: .skip 4 .size g_intstackbase, 4 diff --git a/arch/arm/src/armv6-m/arm_assert.c b/arch/arm/src/armv6-m/arm_assert.c index 382a039a3943d..11c97ba1e72c4 100644 --- a/arch/arm/src/armv6-m/arm_assert.c +++ b/arch/arm/src/armv6-m/arm_assert.c @@ -247,7 +247,7 @@ static void up_dumpstate(void) * stack? */ - if (sp <= istackbase && sp > istackbase - istacksize) + if (sp < istackbase && sp > istackbase - istacksize) { /* Yes.. dump the interrupt stack */ diff --git a/arch/arm/src/armv6-m/arm_exception.S b/arch/arm/src/armv6-m/arm_exception.S index c70c57a2eb969..ecc6c04df29ea 100644 --- a/arch/arm/src/armv6-m/arm_exception.S +++ b/arch/arm/src/armv6-m/arm_exception.S @@ -270,7 +270,7 @@ exception_common: .bss .global g_intstackalloc .global g_intstackbase - .align 4 + .balign 4 g_intstackalloc: .skip (CONFIG_ARCH_INTERRUPTSTACK & ~3) g_intstackbase: diff --git a/arch/arm/src/armv7-a/arm_assert.c b/arch/arm/src/armv7-a/arm_assert.c index 07a2decbf7f97..015aa83578267 100644 --- a/arch/arm/src/armv7-a/arm_assert.c +++ b/arch/arm/src/armv7-a/arm_assert.c @@ -252,7 +252,7 @@ static void up_dumpstate(void) if (rtcb->xcp.kstack) { kstackbase = (uint32_t)rtcb->xcp.kstack + - CONFIG_ARCH_KERNEL_STACKSIZE - 4; + CONFIG_ARCH_KERNEL_STACKSIZE; _alert("Kernel stack:\n"); _alert(" base: %08x\n", kstackbase); @@ -265,24 +265,10 @@ static void up_dumpstate(void) if (sp > istackbase - istacksize && sp < istackbase) { - uint32_t *stackbase; - /* Yes.. dump the interrupt stack */ _alert("Interrupt Stack\n", sp); up_stackdump(sp, istackbase); - - /* Extract the user stack pointer which should lie - * at the base of the interrupt stack. - */ - -#ifdef CONFIG_SMP - stackbase = (uint32_t *)arm_intstack_base(); -#else - stackbase = (uint32_t *)&g_intstackbase; -#endif - sp = *stackbase; - _alert("User sp: %08x\n", sp); } else if (CURRENT_REGS) { @@ -291,6 +277,17 @@ static void up_dumpstate(void) } #endif + /* Extract the user stack pointer if we are in an interrupt handler. + * If we are not in an interrupt handler. Then sp is the user stack + * pointer (and the above range check should have failed). + */ + + if (CURRENT_REGS) + { + sp = CURRENT_REGS[REG_R13]; + _alert("User sp: %08x\n", sp); + } + /* Dump the user stack if the stack pointer lies within the allocated user * stack memory. */ diff --git a/arch/arm/src/armv7-a/arm_cpuidlestack.c b/arch/arm/src/armv7-a/arm_cpuidlestack.c index d389622d63ca3..1acdeae7177ca 100644 --- a/arch/arm/src/armv7-a/arm_cpuidlestack.c +++ b/arch/arm/src/armv7-a/arm_cpuidlestack.c @@ -133,10 +133,9 @@ int up_cpu_idlestack(int cpu, FAR struct tcb_s *tcb, size_t stack_size) /* Get the top of the stack */ - stack_alloc = (uintptr_t)g_cpu_stackalloc[cpu]; DEBUGASSERT(stack_alloc != 0 && STACK_ISALIGNED(stack_alloc)); - top_of_stack = stack_alloc + SMP_STACK_TOP; + top_of_stack = stack_alloc + SMP_STACK_SIZE; tcb->adj_stack_size = SMP_STACK_SIZE; tcb->stack_alloc_ptr = (FAR uint32_t *)stack_alloc; diff --git a/arch/arm/src/armv7-a/arm_vectors.S b/arch/arm/src/armv7-a/arm_vectors.S index 6df8755c4c946..e0559048164dc 100644 --- a/arch/arm/src/armv7-a/arm_vectors.S +++ b/arch/arm/src/armv7-a/arm_vectors.S @@ -261,7 +261,7 @@ arm_vectorirq: /* Call arm_decodeirq() on the interrupt stack */ setirqstack r1, r3 /* SP = IRQ stack top */ - str r0, [sp] /* Save the user stack pointer */ + 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 */ bl arm_decodeirq /* Call the handler */ @@ -1004,7 +1004,7 @@ arm_vectorfiq: #if CONFIG_ARCH_INTERRUPTSTACK > 7 setfiqstack r1, r4 /* SP = FIQ stack top */ - str r0, [sp] /* Save the user stack pointer */ + 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 */ bl arm_decodefiq /* Call the handler */ @@ -1072,7 +1072,7 @@ arm_vectorfiq: #if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7 .bss - .align 4 + .balign 8 .globl g_intstackalloc .type g_intstackalloc, object @@ -1080,7 +1080,7 @@ arm_vectorfiq: .type g_intstackbase, object g_intstackalloc: - .skip ((CONFIG_ARCH_INTERRUPTSTACK & ~7) - 4) + .skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7) g_intstackbase: .skip 4 .size g_intstackbase, 4 @@ -1096,7 +1096,7 @@ g_intstackbase: .type g_fiqstackbase, object g_fiqstackalloc: - .skip ((CONFIG_ARCH_INTERRUPTSTACK & ~7) - 4) + .skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7) g_fiqstackbase: .skip 4 .size g_fiqstackbase, 4 diff --git a/arch/arm/src/armv7-a/smp.h b/arch/arm/src/armv7-a/smp.h index 7f3e37539b61f..e168ce680556d 100644 --- a/arch/arm/src/armv7-a/smp.h +++ b/arch/arm/src/armv7-a/smp.h @@ -58,7 +58,6 @@ #define SMP_STACK_MASK 7 #define SMP_STACK_SIZE ((CONFIG_SMP_IDLETHREAD_STACKSIZE + 7) & ~7) #define SMP_STACK_WORDS (SMP_STACK_SIZE >> 2) -#define SMP_STACK_TOP (SMP_STACK_SIZE - 8) /**************************************************************************** * Public Data @@ -122,9 +121,9 @@ void __cpu3_start(void); * * Description: * Continues the C-level initialization started by the assembly language - * __cpu[n]_start function. At a minimum, this function needs to initialize - * interrupt handling and, perhaps, wait on WFI for arm_cpu_start() to - * issue an SGI. + * __cpu[n]_start function. At a minimum, this function needs to + * initialize interrupt handling and, perhaps, wait on WFI for + * arm_cpu_start() to issue an SGI. * * This function must be provided by the each ARMv7-A MCU and implement * MCU-specific initialization logic. diff --git a/arch/arm/src/armv7-m/arm_assert.c b/arch/arm/src/armv7-m/arm_assert.c index 382297f202bdb..c1a29cdd60b2e 100644 --- a/arch/arm/src/armv7-m/arm_assert.c +++ b/arch/arm/src/armv7-m/arm_assert.c @@ -244,7 +244,7 @@ static void up_dumpstate(void) * stack? */ - if (sp <= istackbase && sp > istackbase - istacksize) + if (sp < istackbase && sp > istackbase - istacksize) { /* Yes.. dump the interrupt stack */ diff --git a/arch/arm/src/armv7-m/gnu/arm_exception.S b/arch/arm/src/armv7-m/gnu/arm_exception.S index b9580eeec5732..34e5031264c39 100644 --- a/arch/arm/src/armv7-m/gnu/arm_exception.S +++ b/arch/arm/src/armv7-m/gnu/arm_exception.S @@ -67,7 +67,7 @@ * no privileged task has run. */ -# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 4 +# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 8 # error Interrupt stack must be used with high priority interrupts in kernel mode # endif @@ -197,7 +197,7 @@ exception_common: * here prohibits nested interrupts without some additional logic! */ - setintstack r2, r3 + setintstack r2, r3 /* SP = IRQ stack top */ #else /* Otherwise, we will re-use the interrupted thread's stack. That may @@ -321,7 +321,7 @@ exception_common: .bss .global g_intstackalloc .global g_intstackbase - .align 8 + .balign 8 g_intstackalloc: .skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7) g_intstackbase: diff --git a/arch/arm/src/armv7-m/gnu/arm_lazyexception.S b/arch/arm/src/armv7-m/gnu/arm_lazyexception.S index 57ee25096ff8b..9d15f901eeb1a 100644 --- a/arch/arm/src/armv7-m/gnu/arm_lazyexception.S +++ b/arch/arm/src/armv7-m/gnu/arm_lazyexception.S @@ -50,7 +50,7 @@ * nested interrupt, the interrupt stack if no privileged task has run. */ -# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 4 +# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 8 # error Interrupt stack must be used with high priority interrupts in kernel mode # endif @@ -192,7 +192,7 @@ exception_common: * here prohibits nested interrupts without some additional logic! */ - setintstack r2, r3 + setintstack r2, r3 /* SP = IRQ stack top */ #else /* Otherwise, we will re-use the interrupted thread's stack. That may @@ -340,7 +340,7 @@ exception_common: .bss .global g_intstackalloc .global g_intstackbase - .align 8 + .balign 8 g_intstackalloc: .skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7) g_intstackbase: diff --git a/arch/arm/src/armv7-r/arm_assert.c b/arch/arm/src/armv7-r/arm_assert.c index c91e2ca1d33bc..ed516c750bee1 100644 --- a/arch/arm/src/armv7-r/arm_assert.c +++ b/arch/arm/src/armv7-r/arm_assert.c @@ -195,7 +195,7 @@ static void up_dumpstate(void) uint32_t sp = arm_getsp(); uint32_t ustackbase; uint32_t ustacksize; -#if CONFIG_ARCH_INTERRUPTSTACK > 3 +#if CONFIG_ARCH_INTERRUPTSTACK > 7 uint32_t istackbase; uint32_t istacksize; #endif @@ -214,11 +214,11 @@ static void up_dumpstate(void) _alert("Current sp: %08x\n", sp); -#if CONFIG_ARCH_INTERRUPTSTACK > 3 +#if CONFIG_ARCH_INTERRUPTSTACK > 7 /* Get the limits on the interrupt stack memory */ istackbase = (uint32_t)&g_intstackbase; - istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3); + istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~7); /* Show interrupt stack info */ @@ -253,7 +253,7 @@ static void up_dumpstate(void) } #endif -#if CONFIG_ARCH_INTERRUPTSTACK > 3 +#if CONFIG_ARCH_INTERRUPTSTACK > 7 /* Does the current stack pointer lie within the interrupt stack? */ if (sp > istackbase - istacksize && sp < istackbase) @@ -262,13 +262,6 @@ static void up_dumpstate(void) _alert("Interrupt Stack\n", sp); up_stackdump(sp, istackbase); - - /* Extract the user stack pointer which should lie - * at the base of the interrupt stack. - */ - - sp = g_intstackbase; - _alert("User sp: %08x\n", sp); } else if (CURRENT_REGS) { @@ -277,6 +270,17 @@ static void up_dumpstate(void) } #endif + /* Extract the user stack pointer if we are in an interrupt handler. + * If we are not in an interrupt handler. Then sp is the user stack + * pointer (and the above range check should have failed). + */ + + if (CURRENT_REGS) + { + sp = CURRENT_REGS[REG_R13]; + _alert("User sp: %08x\n", sp); + } + /* Dump the user stack if the stack pointer lies within the allocated user * stack memory. */ diff --git a/arch/arm/src/armv7-r/arm_vectors.S b/arch/arm/src/armv7-r/arm_vectors.S index bea7c927bcebf..f3064ad219987 100644 --- a/arch/arm/src/armv7-r/arm_vectors.S +++ b/arch/arm/src/armv7-r/arm_vectors.S @@ -179,9 +179,9 @@ arm_vectorirq: mov fp, #0 /* Init frame pointer */ mov r0, sp /* Get r0=xcp */ -#if CONFIG_ARCH_INTERRUPTSTACK > 3 +#if CONFIG_ARCH_INTERRUPTSTACK > 7 ldr sp, .Lirqstackbase /* SP = interrupt stack base */ - str r0, [sp] /* Save the user stack pointer */ + 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 */ bl arm_decodeirq /* Call the handler */ @@ -232,7 +232,7 @@ arm_vectorirq: .Lirqtmp: .word g_irqtmp -#if CONFIG_ARCH_INTERRUPTSTACK > 3 +#if CONFIG_ARCH_INTERRUPTSTACK > 7 .Lirqstackbase: .word g_intstackbase #endif @@ -890,9 +890,9 @@ arm_vectorfiq: mov fp, #0 /* Init frame pointer */ mov r0, sp /* Get r0=xcp */ -#if CONFIG_ARCH_INTERRUPTSTACK > 3 +#if CONFIG_ARCH_INTERRUPTSTACK > 7 ldr sp, .Lfiqstackbase /* SP = interrupt stack base */ - str r0, [sp] /* Save the user stack pointer */ + 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 */ bl arm_decodefiq /* Call the handler */ @@ -943,7 +943,7 @@ arm_vectorfiq: .Lfiqtmp: .word g_fiqtmp -#if CONFIG_ARCH_INTERRUPTSTACK > 3 +#if CONFIG_ARCH_INTERRUPTSTACK > 7 .Lfiqstackbase: .word g_intstackbase #endif @@ -957,9 +957,9 @@ arm_vectorfiq: * Name: g_intstackalloc/g_intstackbase ************************************************************************************/ -#if CONFIG_ARCH_INTERRUPTSTACK > 3 +#if CONFIG_ARCH_INTERRUPTSTACK > 7 .bss - .align 4 + .balign 8 .globl g_intstackalloc .type g_intstackalloc, object @@ -967,11 +967,11 @@ arm_vectorfiq: .type g_intstackbase, object g_intstackalloc: - .skip ((CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4) + .skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7) g_intstackbase: .skip 4 .size g_intstackbase, 4 - .size g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~3) + .size g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~7) -#endif /* CONFIG_ARCH_INTERRUPTSTACK > 3 */ +#endif /* CONFIG_ARCH_INTERRUPTSTACK > 7 */ .end diff --git a/arch/arm/src/armv8-m/arm_assert.c b/arch/arm/src/armv8-m/arm_assert.c index ac0b9b7215113..bc6cb3a1d9356 100644 --- a/arch/arm/src/armv8-m/arm_assert.c +++ b/arch/arm/src/armv8-m/arm_assert.c @@ -244,7 +244,7 @@ static void up_dumpstate(void) * stack? */ - if (sp <= istackbase && sp > istackbase - istacksize) + if (sp < istackbase && sp > istackbase - istacksize) { /* Yes.. dump the interrupt stack */ diff --git a/arch/arm/src/armv8-m/arm_exception.S b/arch/arm/src/armv8-m/arm_exception.S index c7dc5af6e097e..9a3c434e0a92d 100644 --- a/arch/arm/src/armv8-m/arm_exception.S +++ b/arch/arm/src/armv8-m/arm_exception.S @@ -67,7 +67,7 @@ * no privileged task has run. */ -# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 4 +# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 8 # error Interrupt stack must be used with high priority interrupts in kernel mode # endif @@ -355,7 +355,7 @@ exception_common: .bss .global g_intstackalloc .global g_intstackbase - .align 8 + .balign 8 g_intstackalloc: .skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7) g_intstackbase: diff --git a/arch/arm/src/armv8-m/arm_lazyexception.S b/arch/arm/src/armv8-m/arm_lazyexception.S index ade51c1adbac1..fe89b3206331e 100644 --- a/arch/arm/src/armv8-m/arm_lazyexception.S +++ b/arch/arm/src/armv8-m/arm_lazyexception.S @@ -50,7 +50,7 @@ * nested interrupt, the interrupt stack if no privileged task has run. */ -# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 4 +# if defined(CONFIG_BUILD_PROTECTED) && CONFIG_ARCH_INTERRUPTSTACK < 8 # error Interrupt stack must be used with high priority interrupts in kernel mode # endif @@ -373,7 +373,7 @@ exception_common: .bss .global g_intstackalloc .global g_intstackbase - .align 8 + .balign 8 g_intstackalloc: .skip ((CONFIG_ARCH_INTERRUPTSTACK + 4) & ~7) g_intstackbase: diff --git a/arch/arm/src/c5471/c5471_vectors.S b/arch/arm/src/c5471/c5471_vectors.S index 95f4357a771a7..813e0534edc4a 100644 --- a/arch/arm/src/c5471/c5471_vectors.S +++ b/arch/arm/src/c5471/c5471_vectors.S @@ -162,7 +162,7 @@ arm_vectorirq: #if CONFIG_ARCH_INTERRUPTSTACK > 3 ldr sp, .Lirqstackbase /* SP = interrupt stack base */ - str r1, [sp] /* Save the user stack pointer */ + 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 */ #else @@ -471,13 +471,13 @@ arm_vectoraddrexcptn: #if CONFIG_ARCH_INTERRUPTSTACK > 3 .bss - .align 4 + .balign 4 .global g_intstackalloc .global g_intstackbase .type g_intstackalloc, object .type g_intstackbase, object g_intstackalloc: - .skip ((CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4) + .skip (CONFIG_ARCH_INTERRUPTSTACK & ~3) g_intstackbase: .skip 4 .size g_intstackbase, 4 diff --git a/arch/arm/src/cxd56xx/cxd56_irq.c b/arch/arm/src/cxd56xx/cxd56_irq.c index f113dcef06f9e..d59872e61576e 100644 --- a/arch/arm/src/cxd56xx/cxd56_irq.c +++ b/arch/arm/src/cxd56xx/cxd56_irq.c @@ -112,17 +112,17 @@ static uint64_t g_intstack_alloc[INTSTACK_ALLOC >> 3]; const uint32_t g_cpu_intstack_top[CONFIG_SMP_NCPUS] = { - (uint32_t)g_intstack_alloc + INTSTACK_SIZE - 8, + (uint32_t)g_intstack_alloc + INTSTACK_SIZE, #if CONFIG_SMP_NCPUS > 1 - (uint32_t)g_intstack_alloc + (2 * INTSTACK_SIZE) - 8, + (uint32_t)g_intstack_alloc + (2 * INTSTACK_SIZE), #if CONFIG_SMP_NCPUS > 2 - (uint32_t)g_intstack_alloc + (3 * INTSTACK_SIZE) - 8, + (uint32_t)g_intstack_alloc + (3 * INTSTACK_SIZE), #if CONFIG_SMP_NCPUS > 3 - (uint32_t)g_intstack_alloc + (4 * INTSTACK_SIZE) - 8, + (uint32_t)g_intstack_alloc + (4 * INTSTACK_SIZE), #if CONFIG_SMP_NCPUS > 4 - (uint32_t)g_intstack_alloc + (5 * INTSTACK_SIZE) - 8, + (uint32_t)g_intstack_alloc + (5 * INTSTACK_SIZE), #if CONFIG_SMP_NCPUS > 5 - (uint32_t)g_intstack_alloc + (6 * INTSTACK_SIZE) - 8, + (uint32_t)g_intstack_alloc + (6 * INTSTACK_SIZE), #endif /* CONFIG_SMP_NCPUS > 5 */ #endif /* CONFIG_SMP_NCPUS > 4 */ #endif /* CONFIG_SMP_NCPUS > 3 */ @@ -667,6 +667,6 @@ uintptr_t arm_intstack_base(void) #if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7 uintptr_t arm_intstack_alloc(void) { - return g_cpu_intstack_top[up_cpu_index()] - (INTSTACK_SIZE - 8); + return g_cpu_intstack_top[up_cpu_index()] - INTSTACK_SIZE; } #endif diff --git a/arch/arm/src/imx6/imx_irq.c b/arch/arm/src/imx6/imx_irq.c index 1f7738f9a042d..7d3b76033e576 100644 --- a/arch/arm/src/imx6/imx_irq.c +++ b/arch/arm/src/imx6/imx_irq.c @@ -88,15 +88,15 @@ uint64_t g_fiqstack_alloc[INTSTACK_ALLOC >> 3]; uintptr_t g_irqstack_top[CONFIG_SMP_NCPUS] = { - (uintptr_t)g_irqstack_alloc + INTSTACK_SIZE - 8, + (uintptr_t)g_irqstack_alloc + INTSTACK_SIZE, #if CONFIG_SMP_NCPUS > 1 - (uintptr_t)g_irqstack_alloc + (2 * INTSTACK_SIZE) - 8, + (uintptr_t)g_irqstack_alloc + (2 * INTSTACK_SIZE), #endif #if CONFIG_SMP_NCPUS > 2 - (uintptr_t)g_irqstack_alloc + (3 * INTSTACK_SIZE) - 8, + (uintptr_t)g_irqstack_alloc + (3 * INTSTACK_SIZE), #endif #if CONFIG_SMP_NCPUS > 3 - (uintptr_t)g_irqstack_alloc + (4 * INTSTACK_SIZE) - 8 + (uintptr_t)g_irqstack_alloc + (4 * INTSTACK_SIZE) #endif }; @@ -215,6 +215,6 @@ uintptr_t arm_intstack_base(void) #if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7 uintptr_t arm_intstack_alloc(void) { - return g_irqstack_top[up_cpu_index()] - (INTSTACK_SIZE - 8); + return g_irqstack_top[up_cpu_index()] - INTSTACK_SIZE; } #endif diff --git a/arch/arm/src/lc823450/lc823450_irq.c b/arch/arm/src/lc823450/lc823450_irq.c index 4e0beaa0715b1..4583ae95f5e80 100644 --- a/arch/arm/src/lc823450/lc823450_irq.c +++ b/arch/arm/src/lc823450/lc823450_irq.c @@ -95,9 +95,9 @@ uint64_t g_intstack_alloc[INTSTACK_ALLOC >> 3]; const uint32_t g_cpu_intstack_top[CONFIG_SMP_NCPUS] = { - (uint32_t)g_intstack_alloc + INTSTACK_SIZE - 8, + (uint32_t)g_intstack_alloc + INTSTACK_SIZE, #if CONFIG_SMP_NCPUS > 1 - (uint32_t)g_intstack_alloc + (2 * INTSTACK_SIZE) - 8, + (uint32_t)g_intstack_alloc + (2 * INTSTACK_SIZE), #endif /* CONFIG_SMP_NCPUS > 1 */ }; #endif @@ -888,6 +888,6 @@ uintptr_t arm_intstack_base(void) #if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7 uintptr_t arm_intstack_alloc(void) { - return g_cpu_intstack_top[up_cpu_index()] - (INTSTACK_SIZE - 8); + return g_cpu_intstack_top[up_cpu_index()] - INTSTACK_SIZE; } #endif diff --git a/boards/arm/imx6/sabre-6quad/configs/nsh/defconfig b/boards/arm/imx6/sabre-6quad/configs/nsh/defconfig index c42ae64c05b59..30aa9a25a8b34 100644 --- a/boards/arm/imx6/sabre-6quad/configs/nsh/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/nsh/defconfig @@ -20,11 +20,12 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_BOARD_LOOPSPERMSEC=99369 CONFIG_BOOT_RUNFROMSDRAM=y CONFIG_BUILTIN=y +CONFIG_DEBUG_FULLOPT=y +CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_ZERO=y CONFIG_FS_PROCFS=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y -CONFIG_HOST_WINDOWS=y CONFIG_IMX6_UART1=y CONFIG_IMX_DDR_SIZE=1073741824 CONFIG_INTELHEX_BINARY=y @@ -42,10 +43,12 @@ CONFIG_RAM_SIZE=1073741824 CONFIG_RAM_START=0x10000000 CONFIG_RAM_VSTART=0x10000000 CONFIG_RAW_BINARY=y +CONFIG_READLINE_CMD_HISTORY=y CONFIG_RR_INTERVAL=200 CONFIG_SCHED_HPWORK=y CONFIG_SCHED_HPWORKPRIORITY=192 CONFIG_SCHED_WAITPID=y +CONFIG_STACK_COLORATION=y CONFIG_START_MONTH=3 CONFIG_START_YEAR=2016 CONFIG_SYMTAB_ORDEREDBYNAME=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/wifi/defconfig b/boards/arm/stm32/stm32f4discovery/configs/wifi/defconfig index 54912f275dc5f..9f48660c75bb2 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/wifi/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/wifi/defconfig @@ -5,7 +5,6 @@ # You can then do "make savedefconfig" to generate a new defconfig file that includes your # modifications. # -# CONFIG_ARCH_FPU is not set # CONFIG_MMCSD_HAVE_CARDDETECT is not set # CONFIG_MMCSD_HAVE_WRITEPROTECT is not set # CONFIG_NSH_ARGCAT is not set @@ -19,7 +18,9 @@ CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y +CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y +CONFIG_ARMV7M_LAZYFPU=y CONFIG_BOARDCTL_RESET=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y @@ -101,6 +102,7 @@ CONFIG_SYSTEM_NSH_SYMTAB_ARRAYNAME="g_symtab" CONFIG_SYSTEM_NSH_SYMTAB_COUNTNAME="g_nsymbols" CONFIG_SYSTEM_NTPC=y CONFIG_TESTING_OSTEST=y +CONFIG_TESTING_OSTEST_FPUSIZE=132 CONFIG_USART2_RXBUFSIZE=128 CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USART2_TXBUFSIZE=128