Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the memory alignment within the Cortex-A9 port asm code #426

Merged
merged 20 commits into from
Dec 9, 2023
Merged
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ac50eb5
Update alignment in ARM_CA9 port.
Nov 20, 2021
b3543a8
Merge branch 'main' of https://github.com/FreeRTOS/FreeRTOS-Kernel in…
Dec 19, 2021
b9476bc
Merge branch 'main' into update-cortex-a9-alignment
kar-rahul-aws Aug 30, 2023
e77a97d
Fix formatting
kar-rahul-aws Aug 30, 2023
5c58a83
Fix CLRF line endings
kar-rahul-aws Aug 30, 2023
a9644b5
Merge branch 'main' into update-cortex-a9-alignment
chinglee-iot Sep 22, 2023
50e6924
Merge branch 'main' into update-cortex-a9-alignment
chinglee-iot Sep 25, 2023
6495e17
Uncrustify: triggered by comment.
actions-user Sep 25, 2023
c81c35a
Merge branch 'main' into update-cortex-a9-alignment
chinglee-iot Sep 26, 2023
9a8f49f
Merge branch 'main' into update-cortex-a9-alignment
kar-rahul-aws Sep 26, 2023
cae9808
Merge branch 'main' into update-cortex-a9-alignment
chinglee-iot Sep 26, 2023
d43b2b9
Merge branch 'main' into update-cortex-a9-alignment
chinglee-iot Sep 27, 2023
cd6022a
Merge branch 'main' into update-cortex-a9-alignment
kar-rahul-aws Oct 5, 2023
4ac7f58
Merge branch 'main' into update-cortex-a9-alignment
kar-rahul-aws Oct 13, 2023
3f37c64
Merge branch 'main' into update-cortex-a9-alignment
kar-rahul-aws Oct 17, 2023
b166d2b
Merge branch 'main' into update-cortex-a9-alignment
kar-rahul-aws Oct 18, 2023
a47f536
Merge branch 'main' into update-cortex-a9-alignment
Skptak Oct 19, 2023
784f450
Merge branch 'main' into update-cortex-a9-alignment
chinglee-iot Oct 27, 2023
481620f
Merge branch 'main' into update-cortex-a9-alignment
kar-rahul-aws Nov 29, 2023
32462fd
Merge branch 'main' into update-cortex-a9-alignment
kar-rahul-aws Dec 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions portable/GCC/ARM_CA9/portASM.S
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@

/* Save the floating point context, if any. */
FMRXNE R1, FPSCR
PUSHNE {R1}
VPUSHNE {D0-D15}
VPUSHNE {D16-D31}
PUSHNE {R1}

/* Save ulPortTaskHasFPUContext itself. */
PUSH {R3}
Expand Down Expand Up @@ -106,9 +106,9 @@
CMP R1, #0

/* Restore the floating point context, if any. */
POPNE {R0}
VPOPNE {D16-D31}
VPOPNE {D0-D15}
POPNE {R0}
VMSRNE FPSCR, R0

/* Restore the critical section nesting depth. */
Expand Down Expand Up @@ -145,8 +145,15 @@
FreeRTOS_SWI_Handler:
/* Save the context of the current task and select a new task to run. */
portSAVE_CONTEXT

/* Ensure bit 2 of the stack pointer is clear. */
MOV r2, sp
AND r2, r2, #4
SUB sp, sp, r2

LDR R0, vTaskSwitchContextConst
BLX R0

portRESTORE_CONTEXT


Expand Down Expand Up @@ -256,7 +263,13 @@ switch_before_exit:
/* Call the function that selects the new task to execute.
vTaskSwitchContext() if vTaskSwitchContext() uses LDRD or STRD
instructions, or 8 byte aligned stack allocated data. LR does not need
saving as a new LR will be loaded by portRESTORE_CONTEXT anyway. */
saving as a new LR will be loaded by portRESTORE_CONTEXT anyway.
Ensure bit 2 of the stack pointer is clear. r2 holds the bit 2 value for
future use. */
MOV r2, sp
AND r2, r2, #4
SUB sp, sp, r2

LDR R0, vTaskSwitchContextConst
BLX R0

Expand Down