summaryrefslogtreecommitdiff
path: root/arch/arm/lib/bootm.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2013-10-04 13:17:48 -0400
committerTom Rini <trini@ti.com>2013-10-04 13:17:48 -0400
commitf835c77fb7e57508ffe8d8ca3a092ee28add77b2 (patch)
treec3cecbfc7fa6adc834c6d2a365bb4e571a388b49 /arch/arm/lib/bootm.c
parent0c5274e6f3231a3a28dafc1204b3f71a3534c520 (diff)
parente261c83aa04ce0396d57aaecf8dfe0970ffac03e (diff)
downloadu-boot-imx-f835c77fb7e57508ffe8d8ca3a092ee28add77b2.zip
u-boot-imx-f835c77fb7e57508ffe8d8ca3a092ee28add77b2.tar.gz
u-boot-imx-f835c77fb7e57508ffe8d8ca3a092ee28add77b2.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'arch/arm/lib/bootm.c')
-rw-r--r--arch/arm/lib/bootm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index eefb456..f476a89 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -22,6 +22,10 @@
#include <asm/bootm.h>
#include <linux/compiler.h>
+#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
+#include <asm/armv7.h>
+#endif
+
DECLARE_GLOBAL_DATA_PTR;
static struct tag *params;
@@ -181,6 +185,19 @@ static void setup_end_tag(bd_t *bd)
__weak void setup_board_tags(struct tag **in_params) {}
+static void do_nonsec_virt_switch(void)
+{
+#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
+ if (armv7_switch_nonsec() == 0)
+#ifdef CONFIG_ARMV7_VIRT
+ if (armv7_switch_hyp() == 0)
+ debug("entered HYP mode\n");
+#else
+ debug("entered non-secure state\n");
+#endif
+#endif
+}
+
/* Subcommand: PREP */
static void boot_prep_linux(bootm_headers_t *images)
{
@@ -217,6 +234,7 @@ 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 */