diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2014-04-26 13:17:02 +0100 |
---|---|---|
committer | Dennis Gilmore <dennis@ausil.us> | 2014-04-26 09:18:50 -0500 |
commit | f2c485bd04fe493ff06255a8be2bd754f6f0f766 (patch) | |
tree | 6bdf9179154f59ea39defa7d240733d5e7750a69 | |
parent | f66618b23bc59f2a6374edd2611e88838dc6e854 (diff) | |
download | u-boot-f2c485bd04fe493ff06255a8be2bd754f6f0f766.tar.gz u-boot-f2c485bd04fe493ff06255a8be2bd754f6f0f766.tar.xz u-boot-f2c485bd04fe493ff06255a8be2bd754f6f0f766.zip |
ARM: HYP/non-sec: move switch to non-sec to the last boot phase
Having the switch to non-secure in the "prep" phase is causing
all kind of troubles, as that stage can be called multiple times.
Instead, move the switch to non-secure to the last possible phase,
when there is no turning back anymore.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
-rw-r--r-- | arch/arm/lib/bootm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 47ee070593..10634a4083 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -242,7 +242,6 @@ static void boot_prep_linux(bootm_headers_t *images) printf("FDT and ATAGS support not compiled in - hanging\n"); hang(); } - do_nonsec_virt_switch(); } /* Subcommand: GO */ @@ -287,8 +286,10 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) else r2 = gd->bd->bi_boot_params; - if (!fake) + if (!fake) { + do_nonsec_virt_switch(); kernel_entry(0, machid, r2); + } #endif } |