Fix for Cortex-M7 basepri errata.

This commit is contained in:
forg0ne
2021-05-03 18:26:41 -04:00
parent cec4ab5ab6
commit f4cbc0ba08
4 changed files with 16 additions and 0 deletions
@@ -361,7 +361,11 @@ OS_CPU_PendSVHandler
MSR PSP, R0 ; Load PSP with new process SP
MOV32 R2, #0 ; Restore BASEPRI priority level to 0
CPSID I
MSR BASEPRI, R2
DSB
ISB
CPSIE I
BX LR ; Exception return will restore remaining context
ALIGN ; Removes warning[A1581W]: added <no_padbytes> of padding at <address>
@@ -382,7 +382,11 @@ OS_CPU_PendSVHandler:
MSR PSP, R0 ; Load PSP with new process SP
MOV R2, #0 ; Restore BASEPRI priority level to 0
CPSID I
MSR BASEPRI, R2
DSB
ISB
CPSIE I
BX LR ; Exception return will restore remaining context
.endasmfunc
@@ -379,7 +379,11 @@ OS_CPU_PendSVHandler:
MSR PSP, R0 @ Load PSP with new process SP
MOV R2, #0 @ Restore BASEPRI priority level to 0
CPSID I
MSR BASEPRI, R2
DSB
ISB
CPSIE I
BX LR @ Exception return will restore remaining context
.end
@@ -355,7 +355,11 @@ OS_CPU_PendSVHandler
MSR PSP, R0 ; Load PSP with new process SP
MOV32 R2, #0 ; Restore BASEPRI priority level to 0
CPSID I
MSR BASEPRI, R2
DSB
ISB
CPSIE I
BX LR ; Exception return will restore remaining context
END