Commit db7bc010 authored by Sandrine Bailleux's avatar Sandrine Bailleux
Browse files

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
parent c8deb8b4
......@@ -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
......
......@@ -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)
......
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