Commit 0a30cf54 authored by Andrew Thoelke's avatar Andrew Thoelke
Browse files

Place assembler functions in separate sections

This extends the --gc-sections behaviour to the many assembler
support functions in the firmware images by placing each function
into its own code section. This is achieved by creating a 'func'
macro used to declare each function label.

Fixes ARM-software/tf-issues#80

Change-Id: I301937b630add292d2dec6d2561a7fcfa6fec690
parent dccc537a
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
* saved. * saved.
* --------------------------------------------- * ---------------------------------------------
*/ */
tspd_enter_sp: func tspd_enter_sp
/* Make space for the registers that we're going to save */ /* Make space for the registers that we're going to save */
mov x3, sp mov x3, sp
str x3, [x0, #0] str x3, [x0, #0]
...@@ -79,7 +79,7 @@ tspd_enter_sp: ...@@ -79,7 +79,7 @@ tspd_enter_sp:
* --------------------------------------------- * ---------------------------------------------
*/ */
.global tspd_exit_sp .global tspd_exit_sp
tspd_exit_sp: func tspd_exit_sp
/* Restore the previous stack */ /* Restore the previous stack */
mov sp, x0 mov sp, x0
......
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
.globl __psci_cpu_off .globl __psci_cpu_off
.globl __psci_cpu_suspend .globl __psci_cpu_suspend
.section .text, "ax"; .align 3
/* ----------------------------------------------------- /* -----------------------------------------------------
* This cpu has been physically powered up. Depending * This cpu has been physically powered up. Depending
* upon whether it was resumed from suspend or simply * upon whether it was resumed from suspend or simply
...@@ -55,7 +53,7 @@ ...@@ -55,7 +53,7 @@
* all this is done. * all this is done.
* ----------------------------------------------------- * -----------------------------------------------------
*/ */
psci_aff_on_finish_entry: func psci_aff_on_finish_entry
adr x23, psci_afflvl_on_finishers adr x23, psci_afflvl_on_finishers
b psci_aff_common_finish_entry b psci_aff_common_finish_entry
...@@ -120,7 +118,7 @@ _panic: ...@@ -120,7 +118,7 @@ _panic:
* suffering from stack coherency issues * suffering from stack coherency issues
* ----------------------------------------------------- * -----------------------------------------------------
*/ */
__psci_cpu_off: func __psci_cpu_off
func_prologue func_prologue
sub sp, sp, #0x10 sub sp, sp, #0x10
stp x19, x20, [sp, #0] stp x19, x20, [sp, #0]
...@@ -137,7 +135,7 @@ __psci_cpu_off: ...@@ -137,7 +135,7 @@ __psci_cpu_off:
func_epilogue func_epilogue
ret ret
__psci_cpu_suspend: func __psci_cpu_suspend
func_prologue func_prologue
sub sp, sp, #0x20 sub sp, sp, #0x20
stp x19, x20, [sp, #0] stp x19, x20, [sp, #0]
...@@ -162,7 +160,7 @@ __psci_cpu_suspend: ...@@ -162,7 +160,7 @@ __psci_cpu_suspend:
func_epilogue func_epilogue
ret ret
final_wfi: func final_wfi
dsb sy dsb sy
wfi wfi
wfi_spill: wfi_spill:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment