diff options
author | Jean-Philippe Brucker <jean-philippe.brucker@arm.com> | 2016-05-18 17:32:19 +0100 |
---|---|---|
committer | Mark Rutland <mark.rutland@arm.com> | 2016-06-15 10:27:35 +0100 |
commit | f01ed6c65ce267c37efc3d48fc68e36af2d00e62 (patch) | |
tree | cc6e87873aa70574bf54ca55c24a4fac922741ba /arch | |
parent | 0bb7b2545582accfdc440c099d9ccba4b3108c26 (diff) |
AArch64: get rid of EL2 trampoline
There is no harm in initialising the platform from EL3, so we move the
call into the boot_common path of CPU0, and take the opportunity to
rename ns_init_system to init_platform. Caches and MMU are now disabled
at EL3, and we can also move cache maintenance in the initial boot path
of each CPU. This allows us to get rid of the EL2 layer, which makes
AArch32 kernel support possible.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/aarch64/boot.S | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S index 8bb536f..1602807 100644 --- a/arch/aarch64/boot.S +++ b/arch/aarch64/boot.S @@ -75,28 +75,18 @@ jump_kernel: ldr w0, flag_no_el3 cmp w0, #0 // Prepare Z flag - b.ne el2_trampoline // No EL3 - - mov x4, #SPSR_KERNEL - adr x5, el2_trampoline - msr elr_el3, x5 - msr spsr_el3, x4 - eret - -el2_trampoline: - bl flush_caches - - cpuid x0, x1 - b.ne 1f - bl ns_init_system - - /* Load kernel parameters */ -1: mov x0, x20 + mov x0, x20 mov x1, x21 mov x2, x22 mov x3, x23 - br x19 + b.eq 1f + br x19 // No EL3 + +1: mov x4, #SPSR_KERNEL + msr elr_el3, x19 + msr spsr_el3, x4 + eret .ltorg |