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 #include +#include .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 @@ * 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 @@ * 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 #include +#include .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 @@ * 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 @@ * ----------------------------------------------------- */ .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)