aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2014-05-01 15:22:18 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2014-06-05 17:39:40 +0100
commitdb7bc010ecb30513b6c9aeecd427559dcf1a62ff (patch)
treee7fae59bba5c941e3220951e6fb36844ebfb2755
parentc8deb8b4824ff423ad5f70ca384a9a6ef388f863 (diff)
juno: Place assembler functions in separate sections
This extends the --gc-sections behaviour to the Juno-specific assembler support functions in the firmware images by placing each function into its own code section. This is achieved by using the 'func' macro when declaring a function label. Change-Id: I738370c0515face104531ab7944cc5bbdad49a9d
-rw-r--r--plat/juno/aarch64/bl1_plat_helpers.S10
-rw-r--r--plat/juno/aarch64/plat_helpers.S9
2 files changed, 8 insertions, 11 deletions
diff --git a/plat/juno/aarch64/bl1_plat_helpers.S b/plat/juno/aarch64/bl1_plat_helpers.S
index 61b1716..c9a581f 100644
--- a/plat/juno/aarch64/bl1_plat_helpers.S
+++ b/plat/juno/aarch64/bl1_plat_helpers.S
@@ -30,15 +30,13 @@
#include <arch.h>
#include <platform.h>
+#include <asm_macros.S>
.globl platform_get_entrypoint
.globl platform_cold_boot_init
.globl plat_secondary_cold_boot_setup
- .section .text, "ax"; .align 3
-
-
/* -----------------------------------------------------
* void plat_secondary_cold_boot_setup (void);
*
@@ -48,7 +46,7 @@
* holding pen etc.
* -----------------------------------------------------
*/
-plat_secondary_cold_boot_setup: ; .type plat_secondary_cold_boot_setup, %function
+func plat_secondary_cold_boot_setup
/* Juno todo: Implement secondary CPU cold boot setup on Juno */
cb_panic:
b cb_panic
@@ -69,7 +67,7 @@ cb_panic:
* TODO: Not a good idea to save lr in a temp reg
* -----------------------------------------------------
*/
-platform_get_entrypoint: ; .type platform_get_entrypoint, %function
+func platform_get_entrypoint
mov x9, x30 // lr
bl platform_get_core_pos
ldr x1, =TRUSTED_MAILBOXES_BASE
@@ -85,7 +83,7 @@ platform_get_entrypoint: ; .type platform_get_entrypoint, %function
* boot to perform early platform initialization
* -----------------------------------------------------
*/
-platform_cold_boot_init: ; .type platform_cold_boot_init, %function
+func platform_cold_boot_init
mov x20, x0
bl read_mpidr
mov x19, x0
diff --git a/plat/juno/aarch64/plat_helpers.S b/plat/juno/aarch64/plat_helpers.S
index 24bf812..c9cbb2d 100644
--- a/plat/juno/aarch64/plat_helpers.S
+++ b/plat/juno/aarch64/plat_helpers.S
@@ -30,11 +30,10 @@
#include <arch.h>
#include <platform.h>
+#include <asm_macros.S>
.globl plat_report_exception
- .section .text, "ax"
-
/* ---------------------------------------------
* void plat_report_exception(unsigned int type)
* Function to report an unhandled exception
@@ -43,7 +42,7 @@
* to indicate where we are
* ---------------------------------------------
*/
-plat_report_exception:
+func plat_report_exception
mrs x1, CurrentEl
lsr x1, x1, #MODE_EL_SHIFT
lsl x1, x1, #SYS_LED_EL_SHIFT
@@ -60,7 +59,7 @@ plat_report_exception:
* Return 0 to 3 for the A53s and 4 or 5 for the A57s
*/
.globl platform_get_core_pos
-platform_get_core_pos:; .type platform_get_core_pos, %function
+func platform_get_core_pos
and x1, x0, #MPIDR_CPU_MASK
and x0, x0, #MPIDR_CLUSTER_MASK
eor x0, x0, #(1 << MPIDR_AFFINITY_BITS) // swap A53/A57 order
@@ -76,7 +75,7 @@ platform_get_core_pos:; .type platform_get_core_pos, %function
* -----------------------------------------------------
*/
.globl platform_is_primary_cpu
-platform_is_primary_cpu:; .type platform_is_primary_cpu, %function
+func platform_is_primary_cpu
/* Warning: this function is called without a valid stack */
/* Juno todo: allow configuration of primary CPU using SCC */
and x0, x0, #(MPIDR_CLUSTER_MASK | MPIDR_CPU_MASK)