Rationalize reset handling code
The attempt to run the CPU reset code as soon as possible after reset
results in highly complex conditional code relating to the
RESET_TO_BL31 option.

This patch relaxes this requirement a little. In the BL1, BL3-1 and
PSCI entrypoints code, the sequence of operations is now as follows:
 1) Detect whether it is a cold or warm boot;
 2) For cold boot, detect whether it is the primary or a secondary
    CPU. This is needed to handle multiple CPUs entering cold reset
    simultaneously;
 3) Run the CPU init code.

This patch also abstracts the EL3 registers initialisation done by
the BL1, BL3-1 and PSCI entrypoints into common code.

This improves code re-use and consolidates the code flows for
different types of systems.

NOTE: THE FUNCTION plat_secondary_cold_boot() IS NOW EXPECTED TO
NEVER RETURN. THIS PATCH FORCES PLATFORM PORTS THAT RELIED ON THE
FORMER RETRY LOOP AT THE CALL SITE TO MODIFY THEIR IMPLEMENTATION.
OTHERWISE, SECONDARY CPUS WILL PANIC.

Change-Id: If5ecd74d75bee700b1bd718d23d7556b8f863546
1 parent 452b7fa commit 52010cc779a59f2bc8a23fa5754630a6e63119a4
@Sandrine Bailleux Sandrine Bailleux authored on 19 May 2015
Showing 8 changed files
View
bl1/aarch64/bl1_entrypoint.S
View
bl31/aarch64/bl31_entrypoint.S
View
docs/firmware-design.md
View
docs/porting-guide.md
View
include/common/asm_macros.S
View
include/common/bl_common.h
View
include/common/el3_common_macros.S 0 → 100644
View
services/std_svc/psci/psci_entry.S