summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2015-10-28 09:50:21 +0000
committerdanh-arm <dan.handley@arm.com>2015-10-28 09:50:21 +0000
commitece32c4f1b192e9fa25f1563844a76e37961aacd (patch)
treebfa013547e07f1b6a844a8e07b9147247d8639c8
parent368bb87b349e7fec70cd507653adb73a949180c5 (diff)
parent371d4399d1f42a48705e316ef378553218195612 (diff)
Merge pull request #416 from davwan01/dw/css-common
Allow CSS to redefine function `plat_arm_calc_core_pos`
-rw-r--r--plat/arm/board/juno/aarch64/juno_helpers.S11
-rw-r--r--plat/arm/css/common/aarch64/css_helpers.S10
2 files changed, 15 insertions, 6 deletions
diff --git a/plat/arm/board/juno/aarch64/juno_helpers.S b/plat/arm/board/juno/aarch64/juno_helpers.S
index ce41baee..263a9805 100644
--- a/plat/arm/board/juno/aarch64/juno_helpers.S
+++ b/plat/arm/board/juno/aarch64/juno_helpers.S
@@ -37,7 +37,7 @@
.globl plat_reset_handler
-
+ .globl plat_arm_calc_core_pos
/* --------------------------------------------------------------------
* void plat_reset_handler(void);
@@ -117,3 +117,12 @@ ret:
isb
ret
endfunc plat_reset_handler
+
+ /* -----------------------------------------------------
+ * unsigned int plat_arm_calc_core_pos(uint64_t mpidr)
+ * Helper function to calculate the core position.
+ * -----------------------------------------------------
+ */
+func plat_arm_calc_core_pos
+ b css_calc_core_pos_swap_cluster
+endfunc plat_arm_calc_core_pos
diff --git a/plat/arm/css/common/aarch64/css_helpers.S b/plat/arm/css/common/aarch64/css_helpers.S
index 1137a492..d1702708 100644
--- a/plat/arm/css/common/aarch64/css_helpers.S
+++ b/plat/arm/css/common/aarch64/css_helpers.S
@@ -34,7 +34,7 @@
.weak plat_secondary_cold_boot_setup
.weak plat_get_my_entrypoint
- .globl plat_arm_calc_core_pos
+ .globl css_calc_core_pos_swap_cluster
.weak plat_is_my_cpu_primary
/* -----------------------------------------------------
@@ -73,20 +73,20 @@ func plat_get_my_entrypoint
endfunc plat_get_my_entrypoint
/* -----------------------------------------------------------
- * unsigned int plat_arm_calc_core_pos(uint64_t mpidr)
- * Function to calculate the core position by
+ * unsigned int css_calc_core_pos_swap_cluster(uint64_t mpidr)
+ * Utility function to calculate the core position by
* swapping the cluster order. This is necessary in order to
* match the format of the boot information passed by the SCP
* and read in plat_is_my_cpu_primary below.
* -----------------------------------------------------------
*/
-func plat_arm_calc_core_pos
+func css_calc_core_pos_swap_cluster
and x1, x0, #MPIDR_CPU_MASK
and x0, x0, #MPIDR_CLUSTER_MASK
eor x0, x0, #(1 << MPIDR_AFFINITY_BITS) // swap cluster order
add x0, x1, x0, LSR #6
ret
-endfunc plat_arm_calc_core_pos
+endfunc css_calc_core_pos_swap_cluster
/* -----------------------------------------------------
* unsigned int plat_is_my_cpu_primary (void);