mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
fix alignment exception for ullPortInterruptNesting. (#317)
* fix alignment exception for ullPortInterruptNesting. While loading (LDR X5, ullPortInterruptNestingConst) the ullPortInterruptNesting variable, the program control seems to be stuck and there is no abort or stack trace observed (as there is no exception handler is installed to catch unaligned access exception). Program control moves forward, if one just declares this varible to be 2 bytes aligned but then varible is not updated properly. One of my colleague, pointed out that issue is due to the fact that ullPortInterruptNesting must be at 8 bytes aligned address but since "vApplicationIRQHandler" (that has 4 bytes of address) is sitting between two 8 bytes aligned addresses that forces ullPortInterruptNesting to be at 4 byte aligned address, causing all sort of mess. It works on QEMU (on ARM64) as it is, since there is no such check for unaligned access but on real hardware it is prohibited. Workaround to this problem is, either we skip 4 byets (using .align 4) after vApplicationIRQHandler declaration or declare it the end of all declarations. This commit does the latter one. Signed-off-by: Amit Singh Tomar <atomar25opensource@gmail.com> * Update portASM.S Remove 1 tab = 4 spaces Co-authored-by: Amit Singh Tomar <atomar25opensource@gmail.com> Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com> Co-authored-by: Joseph Julicher <jjulicher@mac.com>
This commit is contained in:
parent
7b95420ad9
commit
c13719d2d0
|
@ -416,11 +416,11 @@ ullPortTaskHasFPUContextConst: .dword ullPortTaskHasFPUContext
|
||||||
|
|
||||||
ullICCPMRConst: .dword ullICCPMR
|
ullICCPMRConst: .dword ullICCPMR
|
||||||
ullMaxAPIPriorityMaskConst: .dword ullMaxAPIPriorityMask
|
ullMaxAPIPriorityMaskConst: .dword ullMaxAPIPriorityMask
|
||||||
vApplicationIRQHandlerConst: .word vApplicationIRQHandler
|
|
||||||
ullPortInterruptNestingConst: .dword ullPortInterruptNesting
|
ullPortInterruptNestingConst: .dword ullPortInterruptNesting
|
||||||
ullPortYieldRequiredConst: .dword ullPortYieldRequired
|
ullPortYieldRequiredConst: .dword ullPortYieldRequired
|
||||||
ullICCIARConst: .dword ullICCIAR
|
ullICCIARConst: .dword ullICCIAR
|
||||||
ullICCEOIRConst: .dword ullICCEOIR
|
ullICCEOIRConst: .dword ullICCEOIR
|
||||||
|
vApplicationIRQHandlerConst: .word vApplicationIRQHandler
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue