Commit fce0a90a68de507dc827c1ff40d9e446047fa043
Exists in
v2017.01-smarct4x
and in
37 other branches
Merge branch 'master' of git://git.denx.de/u-boot-arm
Showing 9 changed files Side-by-side Diff
Kconfig
... | ... | @@ -58,6 +58,14 @@ |
58 | 58 | |
59 | 59 | endmenu # General setup |
60 | 60 | |
61 | +menuconfig EXPERT | |
62 | + bool "Configure standard U-Boot features (expert users)" | |
63 | + help | |
64 | + This option allows certain base U-Boot options and settings | |
65 | + to be disabled or tweaked. This is for specialized | |
66 | + environments which can tolerate a "non-standard" U-Boot. | |
67 | + Only use this if you really know what you are doing. | |
68 | + | |
61 | 69 | menu "Boot images" |
62 | 70 | |
63 | 71 | config SPL_BUILD |
arch/arm/Kconfig
... | ... | @@ -415,6 +415,8 @@ |
415 | 415 | config TARGET_VEXPRESS_CA15_TC2 |
416 | 416 | bool "Support vexpress_ca15_tc2" |
417 | 417 | select CPU_V7 |
418 | + select CPU_V7_HAS_NONSEC | |
419 | + select CPU_V7_HAS_VIRT | |
418 | 420 | |
419 | 421 | config TARGET_VEXPRESS_CA5X2 |
420 | 422 | bool "Support vexpress_ca5x2" |
... | ... | @@ -825,6 +827,8 @@ |
825 | 827 | source "arch/arm/cpu/arm926ejs/versatile/Kconfig" |
826 | 828 | |
827 | 829 | source "arch/arm/cpu/armv7/zynq/Kconfig" |
830 | + | |
831 | +source "arch/arm/cpu/armv7/Kconfig" | |
828 | 832 | |
829 | 833 | source "board/aristainetos/Kconfig" |
830 | 834 | source "board/BuR/kwb/Kconfig" |
arch/arm/cpu/armv7/Kconfig
1 | +if CPU_V7 | |
2 | + | |
3 | +config CPU_V7_HAS_NONSEC | |
4 | + bool | |
5 | + | |
6 | +config CPU_V7_HAS_VIRT | |
7 | + bool | |
8 | + | |
9 | +config ARMV7_NONSEC | |
10 | + boolean "Enable support for booting in non-secure mode" if EXPERT | |
11 | + depends on CPU_V7_HAS_NONSEC | |
12 | + default y | |
13 | + ---help--- | |
14 | + Say Y here to enable support for booting in non-secure / SVC mode. | |
15 | + | |
16 | +config ARMV7_BOOT_SEC_DEFAULT | |
17 | + boolean "Boot in secure mode by default" if EXPERT | |
18 | + depends on ARMV7_NONSEC | |
19 | + default n | |
20 | + ---help--- | |
21 | + Say Y here to boot in secure mode by default even if non-secure mode | |
22 | + is supported. This option is useful to boot kernels which do not | |
23 | + suppport booting in non-secure mode. Only set this if you need it. | |
24 | + This can be overriden at run-time by setting the bootm_boot_mode env. | |
25 | + variable to "sec" or "nonsec". | |
26 | + | |
27 | +config ARMV7_VIRT | |
28 | + boolean "Enable support for hardware virtualization" if EXPERT | |
29 | + depends on CPU_V7_HAS_VIRT && ARMV7_NONSEC | |
30 | + default y | |
31 | + ---help--- | |
32 | + Say Y here to boot in hypervisor (HYP) mode when booting non-secure. | |
33 | + | |
34 | +endif |
arch/arm/cpu/armv7/exynos/Kconfig
arch/arm/lib/bootm.c
... | ... | @@ -237,6 +237,26 @@ |
237 | 237 | } |
238 | 238 | } |
239 | 239 | |
240 | +#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT) | |
241 | +static bool boot_nonsec(void) | |
242 | +{ | |
243 | + char *s = getenv("bootm_boot_mode"); | |
244 | +#ifdef CONFIG_ARMV7_BOOT_SEC_DEFAULT | |
245 | + bool nonsec = false; | |
246 | +#else | |
247 | + bool nonsec = true; | |
248 | +#endif | |
249 | + | |
250 | + if (s && !strcmp(s, "sec")) | |
251 | + nonsec = false; | |
252 | + | |
253 | + if (s && !strcmp(s, "nonsec")) | |
254 | + nonsec = true; | |
255 | + | |
256 | + return nonsec; | |
257 | +} | |
258 | +#endif | |
259 | + | |
240 | 260 | /* Subcommand: GO */ |
241 | 261 | static void boot_jump_linux(bootm_headers_t *images, int flag) |
242 | 262 | { |
243 | 263 | |
... | ... | @@ -285,12 +305,13 @@ |
285 | 305 | |
286 | 306 | if (!fake) { |
287 | 307 | #if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT) |
288 | - armv7_init_nonsec(); | |
289 | - secure_ram_addr(_do_nonsec_entry)(kernel_entry, | |
290 | - 0, machid, r2); | |
291 | -#else | |
292 | - kernel_entry(0, machid, r2); | |
308 | + if (boot_nonsec()) { | |
309 | + armv7_init_nonsec(); | |
310 | + secure_ram_addr(_do_nonsec_entry)(kernel_entry, | |
311 | + 0, machid, r2); | |
312 | + } else | |
293 | 313 | #endif |
314 | + kernel_entry(0, machid, r2); | |
294 | 315 | } |
295 | 316 | #endif |
296 | 317 | } |
board/sunxi/Kconfig
include/configs/arndale.h
include/configs/sun7i.h