diff options
author | Juan Castillo <juan.castillo@arm.com> | 2014-07-16 15:53:43 +0100 |
---|---|---|
committer | Juan Castillo <juan.castillo@arm.com> | 2014-08-01 09:39:50 +0100 |
commit | 53fdcebd6d330183ce3e46f38bb50e838a6a60de (patch) | |
tree | c645c183657171bec5d4c8491f6d8dd360d384d9 /plat/common/aarch64 | |
parent | dd2bdee61682df0ec65dfc43371c126a86a30c30 (diff) |
Call platform_is_primary_cpu() only from reset handler
The purpose of platform_is_primary_cpu() is to determine after reset
(BL1 or BL3-1 with reset handler) if the current CPU must follow the
cold boot path (primary CPU), or wait in a safe state (secondary CPU)
until the primary CPU has finished the system initialization.
This patch removes redundant calls to platform_is_primary_cpu() in
subsequent bootloader entrypoints since the reset handler already
guarantees that code is executed exclusively on the primary CPU.
Additionally, this patch removes the weak definition of
platform_is_primary_cpu(), so the implementation of this function
becomes mandatory. Removing the weak symbol avoids other
bootloaders accidentally picking up an invalid definition in case the
porting layer makes the real function available only to BL1.
The define PRIMARY_CPU is no longer mandatory in the platform porting
because platform_is_primary_cpu() hides the implementation details
(for instance, there may be platforms that report the primary CPU in
a system register). The primary CPU definition in FVP has been moved
to fvp_def.h.
The porting guide has been updated accordingly.
Fixes ARM-software/tf-issues#219
Change-Id: If675a1de8e8d25122b7fef147cb238d939f90b5e
Diffstat (limited to 'plat/common/aarch64')
-rw-r--r-- | plat/common/aarch64/platform_helpers.S | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/plat/common/aarch64/platform_helpers.S b/plat/common/aarch64/platform_helpers.S index 5e2d1b11..6dc4ec68 100644 --- a/plat/common/aarch64/platform_helpers.S +++ b/plat/common/aarch64/platform_helpers.S @@ -34,7 +34,6 @@ .weak platform_get_core_pos - .weak platform_is_primary_cpu .weak platform_check_mpidr .weak plat_report_exception .weak plat_crash_console_init @@ -53,19 +52,6 @@ func platform_get_core_pos ret /* ----------------------------------------------------- - * void 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 - and x0, x0, #(MPIDR_CLUSTER_MASK | MPIDR_CPU_MASK) - cmp x0, #PRIMARY_CPU - cset x0, eq - ret - - /* ----------------------------------------------------- * Placeholder function which should be redefined by * each platform. * ----------------------------------------------------- |