diff options
-rw-r--r-- | arch/arm/cpu/armv7/virt-dt.c | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/armv7.h | 1 | ||||
-rw-r--r-- | arch/arm/lib/bootm.c | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/virt-dt.c b/arch/arm/cpu/armv7/virt-dt.c index 0b0d6a76fc..ad19e4c47c 100644 --- a/arch/arm/cpu/armv7/virt-dt.c +++ b/arch/arm/cpu/armv7/virt-dt.c @@ -90,6 +90,8 @@ static int fdt_psci(void *fdt) int armv7_update_dt(void *fdt) { + if (!armv7_boot_nonsec()) + return 0; #ifndef CONFIG_ARMV7_SECURE_BASE /* secure code lives in RAM, keep it alive */ fdt_add_mem_rsv(fdt, (unsigned long)__secure_start, diff --git a/arch/arm/include/asm/armv7.h b/arch/arm/include/asm/armv7.h index 323f282fb7..a13da23cf1 100644 --- a/arch/arm/include/asm/armv7.h +++ b/arch/arm/include/asm/armv7.h @@ -80,6 +80,7 @@ void v7_outer_cache_inval_range(u32 start, u32 end); int armv7_init_nonsec(void); int armv7_update_dt(void *fdt); +bool armv7_boot_nonsec(void); /* defined in assembly file */ unsigned int _nonsec_init(void); diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index a7f7c67997..0c1298a31e 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -238,7 +238,7 @@ static void boot_prep_linux(bootm_headers_t *images) } #if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT) -static bool boot_nonsec(void) +bool armv7_boot_nonsec(void) { char *s = getenv("bootm_boot_mode"); #ifdef CONFIG_ARMV7_BOOT_SEC_DEFAULT @@ -305,7 +305,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) if (!fake) { #if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT) - if (boot_nonsec()) { + if (armv7_boot_nonsec()) { armv7_init_nonsec(); secure_ram_addr(_do_nonsec_entry)(kernel_entry, 0, machid, r2); |