From 7a83c87c44504e167c002a7b2868b11f7ea7b028 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 29 Mar 2017 12:05:31 +0800 Subject: [PATCH] Merge branch 'bugfix/cpu1_isr_stack_location' into 'master' Fix finding location of ISR stack space for CPU1 Up to now, the CPU1 interrupts erroneously used the area *after* the ISR stack region, leading to bugs in BT Classic. This fixes that. See merge request !618 --- components/freertos/portasm.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/freertos/portasm.S b/components/freertos/portasm.S index ad65a103ed..7f23e6283b 100644 --- a/components/freertos/portasm.S +++ b/components/freertos/portasm.S @@ -132,8 +132,8 @@ _frxt_int_enter: l32i a2, a2, 0 /* a2 = current TCB */ beqz a2, 1f s32i a1, a2, TOPOFSTACK_OFFS /* pxCurrentTCB->pxTopOfStack = SP */ - movi a1, port_IntStackTop /* a1 = top of intr stack */ - movi a2, configISR_STACK_SIZE + movi a1, port_IntStack+configISR_STACK_SIZE /* a1 = top of intr stack for CPU 0 */ + movi a2, configISR_STACK_SIZE /* add configISR_STACK_SIZE * cpu_num to arrive at top of stack for cpu_num */ mull a2, a4, a2 add a1, a1, a2 /* for current proc */