summaryrefslogtreecommitdiff
path: root/include/common/asm_macros.S
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2015-05-19 11:54:45 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2015-06-04 11:38:54 +0100
commit52010cc779a59f2bc8a23fa5754630a6e63119a4 (patch)
tree500fca98f3a6c1211e2939309c9dfaaa3cbd61b6 /include/common/asm_macros.S
parent452b7fa25ef0381e75a1c066cc2898dd424cabfa (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 'include/common/asm_macros.S')
-rw-r--r--include/common/asm_macros.S35
1 files changed, 0 insertions, 35 deletions
diff --git a/include/common/asm_macros.S b/include/common/asm_macros.S
index f9e7823c..45058a60 100644
--- a/include/common/asm_macros.S
+++ b/include/common/asm_macros.S
@@ -99,41 +99,6 @@
.size \_name, . - \_name
.endm
- /* ---------------------------------------------
- * Find the type of reset and jump to handler
- * if present. If the handler is null then it is
- * a cold boot. The primary cpu will set up the
- * platform while the secondaries wait for
- * their turn to be woken up
- * ---------------------------------------------
- */
- .macro wait_for_entrypoint
-wait_for_entrypoint:
- mrs x0, mpidr_el1
- bl platform_get_entrypoint
- cbnz x0, do_warm_boot
- mrs x0, mpidr_el1
- bl platform_is_primary_cpu
- cbnz x0, do_cold_boot
-
- /* ---------------------------------------------
- * Perform any platform specific secondary cpu
- * actions
- * ---------------------------------------------
- */
- bl plat_secondary_cold_boot_setup
- b wait_for_entrypoint
-
- do_warm_boot:
- /* ---------------------------------------------
- * Jump to BL31 for all warm boot init.
- * ---------------------------------------------
- */
- blr x0
-
- do_cold_boot:
- .endm
-
/*
* This macro declares an array of 1 or more stacks, properly
* aligned and in the requested section