|
|
1619496 |
From f2c485bd04fe493ff06255a8be2bd754f6f0f766 Mon Sep 17 00:00:00 2001
|
|
|
1619496 |
From: Marc Zyngier <marc.zyngier@arm.com>
|
|
|
1619496 |
Date: Sat, 26 Apr 2014 13:17:02 +0100
|
|
|
1619496 |
Subject: [PATCH 27/36] ARM: HYP/non-sec: move switch to non-sec to the last
|
|
|
1619496 |
boot phase
|
|
|
1619496 |
|
|
|
1619496 |
Having the switch to non-secure in the "prep" phase is causing
|
|
|
1619496 |
all kind of troubles, as that stage can be called multiple times.
|
|
|
1619496 |
|
|
|
1619496 |
Instead, move the switch to non-secure to the last possible phase,
|
|
|
1619496 |
when there is no turning back anymore.
|
|
|
1619496 |
|
|
|
1619496 |
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
|
|
|
1619496 |
---
|
|
|
1619496 |
arch/arm/lib/bootm.c | 5 +++--
|
|
|
1619496 |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
1619496 |
|
|
|
1619496 |
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
|
|
|
1619496 |
index 47ee070..10634a4 100644
|
|
|
1619496 |
--- a/arch/arm/lib/bootm.c
|
|
|
1619496 |
+++ b/arch/arm/lib/bootm.c
|
|
|
1619496 |
@@ -242,7 +242,6 @@ static void boot_prep_linux(bootm_headers_t *images)
|
|
|
1619496 |
printf("FDT and ATAGS support not compiled in - hanging\n");
|
|
|
1619496 |
hang();
|
|
|
1619496 |
}
|
|
|
1619496 |
- do_nonsec_virt_switch();
|
|
|
1619496 |
}
|
|
|
1619496 |
|
|
|
1619496 |
/* Subcommand: GO */
|
|
|
1619496 |
@@ -287,8 +286,10 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
|
|
|
1619496 |
else
|
|
|
1619496 |
r2 = gd->bd->bi_boot_params;
|
|
|
1619496 |
|
|
|
1619496 |
- if (!fake)
|
|
|
1619496 |
+ if (!fake) {
|
|
|
1619496 |
+ do_nonsec_virt_switch();
|
|
|
1619496 |
kernel_entry(0, machid, r2);
|
|
|
1619496 |
+ }
|
|
|
1619496 |
#endif
|
|
|
1619496 |
}
|
|
|
1619496 |
|
|
|
1619496 |
--
|
|
|
1619496 |
1.9.0
|
|
|
1619496 |
|