summaryrefslogtreecommitdiff
path: root/plat/juno/aarch64/bl1_plat_helpers.S
diff options
context:
space:
mode:
Diffstat (limited to 'plat/juno/aarch64/bl1_plat_helpers.S')
-rw-r--r--plat/juno/aarch64/bl1_plat_helpers.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/plat/juno/aarch64/bl1_plat_helpers.S b/plat/juno/aarch64/bl1_plat_helpers.S
index 785aa15..3054eab 100644
--- a/plat/juno/aarch64/bl1_plat_helpers.S
+++ b/plat/juno/aarch64/bl1_plat_helpers.S
@@ -32,10 +32,27 @@
#include <asm_macros.S>
#include "../juno_def.h"
+ .globl platform_is_primary_cpu
.globl platform_get_entrypoint
.globl platform_cold_boot_init
.globl plat_secondary_cold_boot_setup
+ /* -----------------------------------------------------
+ * unsigned int platform_is_primary_cpu (unsigned int mpid);
+ *
+ * Given the mpidr say whether this cpu is the primary
+ * cpu (applicable ony after a cold boot)
+ * -----------------------------------------------------
+ */
+func platform_is_primary_cpu
+ mov x9, x30
+ bl platform_get_core_pos
+ ldr x1, =SCP_BOOT_CFG_ADDR
+ ldr x1, [x1]
+ ubfx x1, x1, #PRIMARY_CPU_SHIFT, #PRIMARY_CPU_MASK
+ cmp x0, x1
+ cset x0, eq
+ ret x9
/* -----------------------------------------------------
* void plat_secondary_cold_boot_setup (void);