diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-02-13 09:26:04 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-02-13 09:26:04 +0100 |
commit | 30139163b75970fcd58df6b6b987883e36571046 (patch) | |
tree | 00bd354cefa617f8474cc73994b1a72c11e770a0 /arch/arm/lib/bootm.c | |
parent | bb1a6a2fd3cc41be6db1a1362f311456019317b1 (diff) | |
parent | 19df384cec181be4407f82377ffbb3059b1ed748 (diff) | |
download | barebox-30139163b75970fcd58df6b6b987883e36571046.tar.gz barebox-30139163b75970fcd58df6b6b987883e36571046.tar.xz |
Merge branch 'for-next/imx'
Diffstat (limited to 'arch/arm/lib/bootm.c')
-rw-r--r-- | arch/arm/lib/bootm.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 9bd92f6181..8068a53be0 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -18,6 +18,7 @@ #include <magicvar.h> #include <binfmt.h> #include <restart.h> +#include <globalvar.h> #include <asm/byteorder.h> #include <asm/setup.h> @@ -133,6 +134,7 @@ static int __do_bootm_linux(struct image_data *data, unsigned long free_mem, int { unsigned long kernel; unsigned long initrd_start = 0, initrd_size = 0, initrd_end = 0; + enum arm_security_state state = bootm_arm_security_state(); int ret; kernel = data->os_res->start + data->os_entry; @@ -174,10 +176,20 @@ static int __do_bootm_linux(struct image_data *data, unsigned long free_mem, int printf("...\n"); } + if (IS_ENABLED(CONFIG_ARM_SECURE_MONITOR)) { + if (file_detect_type((void *)data->os_res->start, 0x100) == + filetype_arm_barebox) + state = ARM_STATE_SECURE; + + printf("Starting kernel in %s mode\n", + bootm_arm_security_state_name(state)); + } + if (data->dryrun) return 0; - start_linux((void *)kernel, swap, initrd_start, initrd_size, data->oftree); + start_linux((void *)kernel, swap, initrd_start, initrd_size, data->oftree, + state); restart_machine(); |