Move all code paths touched by NMI to IRAM
Prerequisite for calling Cache_Read_Disable() for OTA updates. Massive thanks due to @foogod and their xtobjdis tool, creating the call graph of where the wDev_ProcessFiq touched (including in newlib, etc.) would have otherwise been very painful: https://bitbucket.org/foogod/xtobjdis
This commit is contained in:
parent
28fdebee92
commit
efc454035c
7 changed files with 44 additions and 24 deletions
|
|
@ -98,7 +98,7 @@ void vListInitialiseItem( xListItem * const pxItem )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vListInsertEnd( xList * const pxList, xListItem * const pxNewListItem )
|
||||
void IRAM vListInsertEnd( xList * const pxList, xListItem * const pxNewListItem )
|
||||
{
|
||||
xListItem * pxIndex;
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ xListItem * pxIndex;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vListInsert( xList * const pxList, xListItem * const pxNewListItem )
|
||||
void IRAM vListInsert( xList * const pxList, xListItem * const pxNewListItem )
|
||||
{
|
||||
xListItem *pxIterator;
|
||||
portTickType xValueOfInsertion;
|
||||
|
|
@ -177,7 +177,7 @@ portTickType xValueOfInsertion;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
unsigned portBASE_TYPE uxListRemove( xListItem * const pxItemToRemove )
|
||||
unsigned portBASE_TYPE IRAM uxListRemove( xListItem * const pxItemToRemove )
|
||||
{
|
||||
xList * pxList;
|
||||
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ void IRAM vPortExitCritical( void )
|
|||
|
||||
_xt_isr isr[16];
|
||||
|
||||
void _xt_isr_attach(uint8_t i, _xt_isr func)
|
||||
void IRAM _xt_isr_attach(uint8_t i, _xt_isr func)
|
||||
{
|
||||
isr[i] = func;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ typedef struct QueueDefinition
|
|||
* to indicate that a task may require unblocking. When the queue in unlocked
|
||||
* these lock counts are inspected, and the appropriate action taken.
|
||||
*/
|
||||
static void prvUnlockQueue( xQUEUE *pxQueue ) PRIVILEGED_FUNCTION;
|
||||
static void IRAM prvUnlockQueue( xQUEUE *pxQueue ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/*
|
||||
* Uses a critical section to determine if there is any data in a queue.
|
||||
|
|
@ -543,7 +543,7 @@ xQueueHandle xReturn = NULL;
|
|||
|
||||
#endif /* configUSE_COUNTING_SEMAPHORES */
|
||||
/*-----------------------------------------------------------*/
|
||||
signed portBASE_TYPE xQueueGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition )
|
||||
signed portBASE_TYPE IRAM xQueueGenericSend( xQueueHandle xQueue, const void * const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition )
|
||||
{
|
||||
signed portBASE_TYPE xEntryTimeSet = pdFALSE;
|
||||
xTimeOutType xTimeOut;
|
||||
|
|
@ -1316,7 +1316,7 @@ unsigned portBASE_TYPE uxReturn;
|
|||
} /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle xQueue )
|
||||
unsigned portBASE_TYPE IRAM uxQueueMessagesWaitingFromISR( const xQueueHandle xQueue )
|
||||
{
|
||||
unsigned portBASE_TYPE uxReturn;
|
||||
|
||||
|
|
@ -1374,7 +1374,7 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
|
|||
|
||||
#endif /* configUSE_TRACE_FACILITY */
|
||||
/*-----------------------------------------------------------*/
|
||||
static void prvCopyDataToQueue( xQUEUE *pxQueue, const void *pvItemToQueue, portBASE_TYPE xPosition )
|
||||
static void IRAM prvCopyDataToQueue( xQUEUE *pxQueue, const void *pvItemToQueue, portBASE_TYPE xPosition )
|
||||
{
|
||||
if( pxQueue->uxItemSize == ( unsigned portBASE_TYPE ) 0 )
|
||||
{
|
||||
|
|
@ -1436,7 +1436,7 @@ static void prvCopyDataFromQueue( xQUEUE * const pxQueue, const void * const pvB
|
|||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
static void prvUnlockQueue( xQUEUE *pxQueue )
|
||||
static void IRAM prvUnlockQueue( xQUEUE *pxQueue )
|
||||
{
|
||||
/* THIS FUNCTION MUST BE CALLED WITH THE SCHEDULER SUSPENDED. */
|
||||
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ static void prvCheckTasksWaitingTermination( void ) PRIVILEGED_FUNCTION;
|
|||
* The currently executing task is entering the Blocked state. Add the task to
|
||||
* either the current or the overflow delayed task list.
|
||||
*/
|
||||
static void prvAddCurrentTaskToDelayedList( portTickType xTimeToWake ) PRIVILEGED_FUNCTION;
|
||||
static void IRAM prvAddCurrentTaskToDelayedList( portTickType xTimeToWake ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/*
|
||||
* Allocates memory from the heap for a TCB and associated stack. Checks the
|
||||
|
|
@ -1297,7 +1297,7 @@ void vTaskEndScheduler( void )
|
|||
}
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
void vTaskSuspendAll( void )
|
||||
void IRAM vTaskSuspendAll( void )
|
||||
{
|
||||
/* A critical section is not required as the variable is of type
|
||||
portBASE_TYPE. */
|
||||
|
|
@ -1333,7 +1333,7 @@ void vTaskSuspendAll( void )
|
|||
#endif /* configUSE_TICKLESS_IDLE */
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xTaskResumeAll( void )
|
||||
signed portBASE_TYPE IRAM xTaskResumeAll( void )
|
||||
{
|
||||
tskTCB *pxTCB;
|
||||
portBASE_TYPE xAlreadyYielded = pdFALSE;
|
||||
|
|
@ -1568,7 +1568,7 @@ implementations require configUSE_TICKLESS_IDLE to be set to a value other than
|
|||
#endif /* configUSE_TICKLESS_IDLE */
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
portBASE_TYPE xTaskIncrementTick( void )
|
||||
portBASE_TYPE IRAM xTaskIncrementTick( void )
|
||||
{
|
||||
tskTCB * pxTCB;
|
||||
portTickType xItemValue;
|
||||
|
|
@ -1843,7 +1843,7 @@ void vTaskSwitchContext( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vTaskPlaceOnEventList( xList * const pxEventList, portTickType xTicksToWait )
|
||||
void IRAM vTaskPlaceOnEventList( xList * const pxEventList, portTickType xTicksToWait )
|
||||
{
|
||||
portTickType xTimeToWake;
|
||||
|
||||
|
|
@ -1936,7 +1936,7 @@ portTickType xTimeToWake;
|
|||
#endif /* configUSE_TIMERS */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xTaskRemoveFromEventList( const xList * const pxEventList )
|
||||
signed portBASE_TYPE IRAM xTaskRemoveFromEventList( const xList * const pxEventList )
|
||||
{
|
||||
tskTCB *pxUnblockedTCB;
|
||||
portBASE_TYPE xReturn;
|
||||
|
|
@ -1987,7 +1987,7 @@ portBASE_TYPE xReturn;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vTaskSetTimeOutState( xTimeOutType * const pxTimeOut )
|
||||
void IRAM vTaskSetTimeOutState( xTimeOutType * const pxTimeOut )
|
||||
{
|
||||
configASSERT( pxTimeOut );
|
||||
pxTimeOut->xOverflowCount = xNumOfOverflows;
|
||||
|
|
@ -1995,7 +1995,7 @@ void vTaskSetTimeOutState( xTimeOutType * const pxTimeOut )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portBASE_TYPE xTaskCheckForTimeOut( xTimeOutType * const pxTimeOut, portTickType * const pxTicksToWait )
|
||||
portBASE_TYPE IRAM xTaskCheckForTimeOut( xTimeOutType * const pxTimeOut, portTickType * const pxTicksToWait )
|
||||
{
|
||||
portBASE_TYPE xReturn;
|
||||
|
||||
|
|
@ -2044,7 +2044,7 @@ portBASE_TYPE xReturn;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vTaskMissedYield( void )
|
||||
void IRAM vTaskMissedYield( void )
|
||||
{
|
||||
xYieldPending = pdTRUE;
|
||||
}
|
||||
|
|
@ -2397,7 +2397,7 @@ static void prvCheckTasksWaitingTermination( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvAddCurrentTaskToDelayedList( portTickType xTimeToWake )
|
||||
static void IRAM prvAddCurrentTaskToDelayedList( portTickType xTimeToWake )
|
||||
{
|
||||
/* The list item will be inserted in wake time order. */
|
||||
listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake );
|
||||
|
|
@ -2676,7 +2676,7 @@ tskTCB *pxNewTCB;
|
|||
|
||||
#if ( configUSE_MUTEXES == 1 )
|
||||
|
||||
void vTaskPriorityDisinherit( xTaskHandle const pxMutexHolder )
|
||||
void IRAM vTaskPriorityDisinherit( xTaskHandle const pxMutexHolder )
|
||||
{
|
||||
tskTCB * const pxTCB = ( tskTCB * ) pxMutexHolder;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue