@ -69,6 +69,21 @@ void vRestoreContextOfFirstTask( void ) /* __attribute__ (( naked )) PRIVILEGED_
" ldmia r3!, {r4-r11} \n " /* Read 4 set of RBAR/RLAR registers from TCB. */
" stmia r2!, {r4-r11} \n " /* Write 4 set of RBAR/RLAR registers using alias registers. */
" \n "
# if ( configTOTAL_MPU_REGIONS == 16 )
" ldr r2, xRNRConst2 \n " /* r2 = 0xe000ed98 [Location of RNR]. */
" movs r4, #8 \n " /* r4 = 8. */
" str r4, [r2] \n " /* Program RNR = 8. */
" ldr r2, xRBARConst2 \n " /* r2 = 0xe000ed9c [Location of RBAR]. */
" ldmia r3!, {r4-r11} \n " /* Read 4 set of RBAR/RLAR registers from TCB. */
" stmia r2!, {r4-r11} \n " /* Write 4 set of RBAR/RLAR registers using alias registers. */
" ldr r2, xRNRConst2 \n " /* r2 = 0xe000ed98 [Location of RNR]. */
" movs r4, #12 \n " /* r4 = 12. */
" str r4, [r2] \n " /* Program RNR = 12. */
" ldr r2, xRBARConst2 \n " /* r2 = 0xe000ed9c [Location of RBAR]. */
" ldmia r3!, {r4-r11} \n " /* Read 4 set of RBAR/RLAR registers from TCB. */
" stmia r2!, {r4-r11} \n " /* Write 4 set of RBAR/RLAR registers using alias registers. */
# endif /* configTOTAL_MPU_REGIONS == 16 */
" \n "
" ldr r2, xMPUCTRLConst2 \n " /* r2 = 0xe000ed94 [Location of MPU_CTRL]. */
" ldr r4, [r2] \n " /* Read the value of MPU_CTRL. */
" orr r4, #1 \n " /* r4 = r4 | 1 i.e. Set the bit 0 in r4. */
@ -310,6 +325,21 @@ void PendSV_Handler( void ) /* __attribute__ (( naked )) PRIVILEGED_FUNCTION */
" ldmia r1!, {r4-r11} \n " /* Read 4 sets of RBAR/RLAR registers from TCB. */
" stmia r3!, {r4-r11} \n " /* Write 4 set of RBAR/RLAR registers using alias registers. */
" \n "
# if ( configTOTAL_MPU_REGIONS == 16 )
" ldr r3, xRNRConst \n " /* r3 = 0xe000ed98 [Location of RNR]. */
" movs r4, #8 \n " /* r4 = 8. */
" str r4, [r3] \n " /* Program RNR = 8. */
" ldr r3, xRBARConst \n " /* r3 = 0xe000ed9c [Location of RBAR]. */
" ldmia r1!, {r4-r11} \n " /* Read 4 sets of RBAR/RLAR registers from TCB. */
" stmia r3!, {r4-r11} \n " /* Write 4 set of RBAR/RLAR registers using alias registers. */
" ldr r3, xRNRConst \n " /* r3 = 0xe000ed98 [Location of RNR]. */
" movs r4, #12 \n " /* r4 = 12. */
" str r4, [r3] \n " /* Program RNR = 12. */
" ldr r3, xRBARConst \n " /* r3 = 0xe000ed9c [Location of RBAR]. */
" ldmia r1!, {r4-r11} \n " /* Read 4 sets of RBAR/RLAR registers from TCB. */
" stmia r3!, {r4-r11} \n " /* Write 4 set of RBAR/RLAR registers using alias registers. */
# endif /* configTOTAL_MPU_REGIONS == 16 */
" \n "
" ldr r3, xMPUCTRLConst \n " /* r3 = 0xe000ed94 [Location of MPU_CTRL]. */
" ldr r4, [r3] \n " /* Read the value of MPU_CTRL. */
" orr r4, #1 \n " /* r4 = r4 | 1 i.e. Set the bit 0 in r4. */