mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
System: move interrupt stack to .bss instead of .data section
The interrupt stack for Xtensa targets is now declared in C, automatically moving it to .bss section instead of .data section. * Closes https://github.com/espressif/esp-idf/issues/9188
This commit is contained in:
parent
422ccad211
commit
bac62cfac8
@ -293,7 +293,7 @@ Default values for trace macros added by ESP-IDF and are not part of Vanilla Fre
|
|||||||
|
|
||||||
#ifndef __ASSEMBLER__
|
#ifndef __ASSEMBLER__
|
||||||
#if CONFIG_APPTRACE_SV_ENABLE
|
#if CONFIG_APPTRACE_SV_ENABLE
|
||||||
extern uint32_t port_switch_flag[];
|
extern volatile uint32_t port_switch_flag[portNUM_PROCESSORS];
|
||||||
#define os_task_switch_is_pended(_cpu_) (port_switch_flag[_cpu_])
|
#define os_task_switch_is_pended(_cpu_) (port_switch_flag[_cpu_])
|
||||||
#else
|
#else
|
||||||
#define os_task_switch_is_pended(_cpu_) (false)
|
#define os_task_switch_is_pended(_cpu_) (false)
|
||||||
|
@ -75,6 +75,16 @@ Variables used by IDF critical sections only (SMP tracks critical nesting inside
|
|||||||
BaseType_t port_uxCriticalNestingIDF[portNUM_PROCESSORS] = {0};
|
BaseType_t port_uxCriticalNestingIDF[portNUM_PROCESSORS] = {0};
|
||||||
BaseType_t port_uxCriticalOldInterruptStateIDF[portNUM_PROCESSORS] = {0};
|
BaseType_t port_uxCriticalOldInterruptStateIDF[portNUM_PROCESSORS] = {0};
|
||||||
|
|
||||||
|
/*
|
||||||
|
*******************************************************************************
|
||||||
|
* Interrupt stack. The size of the interrupt stack is determined by the config
|
||||||
|
* parameter "configISR_STACK_SIZE" in FreeRTOSConfig.h
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
volatile StackType_t DRAM_ATTR __attribute__((aligned(16))) port_IntStack[portNUM_PROCESSORS][configISR_STACK_SIZE];
|
||||||
|
/* One flag for each individual CPU. */
|
||||||
|
volatile uint32_t port_switch_flag[portNUM_PROCESSORS];
|
||||||
|
|
||||||
BaseType_t xPortEnterCriticalTimeout(portMUX_TYPE *lock, BaseType_t timeout)
|
BaseType_t xPortEnterCriticalTimeout(portMUX_TYPE *lock, BaseType_t timeout)
|
||||||
{
|
{
|
||||||
/* Interrupts may already be disabled (if this function is called in nested
|
/* Interrupts may already be disabled (if this function is called in nested
|
||||||
|
@ -61,23 +61,8 @@ Exit:
|
|||||||
and \reg_A, \reg_A, \reg_B /* Align CPSA pointer to 16 bytes */
|
and \reg_A, \reg_A, \reg_B /* Align CPSA pointer to 16 bytes */
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
/*
|
|
||||||
*******************************************************************************
|
|
||||||
* Interrupt stack. The size of the interrupt stack is determined by the config
|
|
||||||
* parameter "configISR_STACK_SIZE" in FreeRTOSConfig.h
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
.data
|
|
||||||
.align 16
|
|
||||||
.global port_IntStack
|
.global port_IntStack
|
||||||
.global port_switch_flag //Required by sysview_tracing build
|
.global port_switch_flag //Required by sysview_tracing build
|
||||||
port_IntStack:
|
|
||||||
.space configISR_STACK_SIZE*portNUM_PROCESSORS /* This allocates stacks for each individual CPU. */
|
|
||||||
port_IntStackTop:
|
|
||||||
.word 0
|
|
||||||
port_switch_flag:
|
|
||||||
.space portNUM_PROCESSORS*4 /* One flag for each individual CPU. */
|
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -752,7 +752,7 @@ bool xPortcheckValidStackMem(const void *ptr);
|
|||||||
// --------------------- App-Trace -------------------------
|
// --------------------- App-Trace -------------------------
|
||||||
|
|
||||||
#if CONFIG_APPTRACE_SV_ENABLE
|
#if CONFIG_APPTRACE_SV_ENABLE
|
||||||
extern uint32_t port_switch_flag[];
|
extern volatile uint32_t port_switch_flag[portNUM_PROCESSORS];
|
||||||
#define os_task_switch_is_pended(_cpu_) (port_switch_flag[_cpu_])
|
#define os_task_switch_is_pended(_cpu_) (port_switch_flag[_cpu_])
|
||||||
#else
|
#else
|
||||||
#define os_task_switch_is_pended(_cpu_) (false)
|
#define os_task_switch_is_pended(_cpu_) (false)
|
||||||
|
@ -89,6 +89,15 @@ unsigned port_interruptNesting[portNUM_PROCESSORS] = {0}; // Interrupt nesting
|
|||||||
BaseType_t port_uxCriticalNesting[portNUM_PROCESSORS] = {0};
|
BaseType_t port_uxCriticalNesting[portNUM_PROCESSORS] = {0};
|
||||||
BaseType_t port_uxOldInterruptState[portNUM_PROCESSORS] = {0};
|
BaseType_t port_uxOldInterruptState[portNUM_PROCESSORS] = {0};
|
||||||
|
|
||||||
|
/*
|
||||||
|
*******************************************************************************
|
||||||
|
* Interrupt stack. The size of the interrupt stack is determined by the config
|
||||||
|
* parameter "configISR_STACK_SIZE" in FreeRTOSConfig.h
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
volatile StackType_t DRAM_ATTR __attribute__((aligned(16))) port_IntStack[portNUM_PROCESSORS][configISR_STACK_SIZE];
|
||||||
|
/* One flag for each individual CPU. */
|
||||||
|
volatile uint32_t port_switch_flag[portNUM_PROCESSORS];
|
||||||
|
|
||||||
/* ------------------------------------------------ FreeRTOS Portable --------------------------------------------------
|
/* ------------------------------------------------ FreeRTOS Portable --------------------------------------------------
|
||||||
* - Provides implementation for functions required by FreeRTOS
|
* - Provides implementation for functions required by FreeRTOS
|
||||||
|
@ -36,23 +36,8 @@
|
|||||||
|
|
||||||
.extern pxCurrentTCB
|
.extern pxCurrentTCB
|
||||||
|
|
||||||
/*
|
|
||||||
*******************************************************************************
|
|
||||||
* Interrupt stack. The size of the interrupt stack is determined by the config
|
|
||||||
* parameter "configISR_STACK_SIZE" in FreeRTOSConfig.h
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
.data
|
|
||||||
.align 16
|
|
||||||
.global port_IntStack
|
.global port_IntStack
|
||||||
.global port_switch_flag //Required by sysview_tracing build
|
.global port_switch_flag //Required by sysview_tracing build
|
||||||
port_IntStack:
|
|
||||||
.space configISR_STACK_SIZE*portNUM_PROCESSORS /* This allocates stacks for each individual CPU. */
|
|
||||||
port_IntStackTop:
|
|
||||||
.word 0
|
|
||||||
port_switch_flag:
|
|
||||||
.space portNUM_PROCESSORS*4 /* One flag for each individual CPU. */
|
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user