Skip to content
Snippets Groups Projects
Commit c19e0dd7 authored by Marc Zyngier's avatar Marc Zyngier Committed by Albert ARIBAUD
Browse files

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: default avatarMarc Zyngier <marc.zyngier@arm.com>
Acked-by: default avatarIan Campbell <ijc@hellion.org.uk>
parent b1cdd8ba
No related branches found
No related tags found
No related merge requests found
...@@ -242,7 +242,6 @@ static void boot_prep_linux(bootm_headers_t *images) ...@@ -242,7 +242,6 @@ static void boot_prep_linux(bootm_headers_t *images)
printf("FDT and ATAGS support not compiled in - hanging\n"); printf("FDT and ATAGS support not compiled in - hanging\n");
hang(); hang();
} }
do_nonsec_virt_switch();
} }
/* Subcommand: GO */ /* Subcommand: GO */
...@@ -260,8 +259,10 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) ...@@ -260,8 +259,10 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
announce_and_cleanup(fake); announce_and_cleanup(fake);
if (!fake) if (!fake) {
do_nonsec_virt_switch();
kernel_entry(images->ft_addr); kernel_entry(images->ft_addr);
}
#else #else
unsigned long machid = gd->bd->bi_arch_number; unsigned long machid = gd->bd->bi_arch_number;
char *s; char *s;
...@@ -287,8 +288,10 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) ...@@ -287,8 +288,10 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
else else
r2 = gd->bd->bi_boot_params; r2 = gd->bd->bi_boot_params;
if (!fake) if (!fake) {
do_nonsec_virt_switch();
kernel_entry(0, machid, r2); kernel_entry(0, machid, r2);
}
#endif #endif
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment