diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2015-05-19 11:54:45 +0100 |
---|---|---|
committer | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2015-06-04 11:38:54 +0100 |
commit | 52010cc779a59f2bc8a23fa5754630a6e63119a4 (patch) | |
tree | 500fca98f3a6c1211e2939309c9dfaaa3cbd61b6 /docs | |
parent | 452b7fa25ef0381e75a1c066cc2898dd424cabfa (diff) |
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
Diffstat (limited to 'docs')
-rw-r--r-- | docs/firmware-design.md | 3 | ||||
-rw-r--r-- | docs/porting-guide.md | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/docs/firmware-design.md b/docs/firmware-design.md index 68e3f3ad..95bb8f1f 100644 --- a/docs/firmware-design.md +++ b/docs/firmware-design.md @@ -414,8 +414,7 @@ updated to develop and exploit new functionality. #### Required CPU state when calling `bl31_entrypoint()` during cold boot -This function must only be called by the primary CPU, if this is called by any -other CPU the firmware will abort. +This function must only be called by the primary CPU. On entry to this function the calling primary CPU must be executing in AArch64 EL3, little-endian data access, and all interrupt sources masked: diff --git a/docs/porting-guide.md b/docs/porting-guide.md index 05a99758..436dc106 100644 --- a/docs/porting-guide.md +++ b/docs/porting-guide.md @@ -434,7 +434,7 @@ This function fulfills requirement 1 and 3 listed above. This function is called with the MMU and data caches disabled. It is responsible for placing the executing secondary CPU in a platform-specific state until the primary CPU performs the necessary actions to bring it out of that state and -allow entry into the OS. +allow entry into the OS. This function must not return. In the ARM FVP port, each secondary CPU powers itself off. The primary CPU is responsible for powering up the secondary CPU when normal world software |