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
1 parent dd2bdee commit 53fdcebd6d330183ce3e46f38bb50e838a6a60de
@Juan Castillo Juan Castillo authored on 16 Jul 2014
Showing 8 changed files
View
bl2/aarch64/bl2_entrypoint.S
View
bl31/aarch64/bl31_entrypoint.S
View
bl32/tsp/aarch64/tsp_entrypoint.S
View
docs/porting-guide.md
View
plat/common/aarch64/platform_helpers.S
View
plat/fvp/aarch64/fvp_helpers.S
View
plat/fvp/fvp_def.h
View
plat/fvp/include/platform_def.h