diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2018-11-01 10:18:42 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-11-05 17:03:29 +0100 |
commit | 45ea4b2008613121df466e14c58c7d090f1b44a4 (patch) | |
tree | 8d1161e55bc377e79406affca135b7f118f5d8b7 /arch | |
parent | 245550bce79a6af34e767ebb0ed844a7e7eb582e (diff) | |
download | barebox-45ea4b2008613121df466e14c58c7d090f1b44a4.tar.gz barebox-45ea4b2008613121df466e14c58c7d090f1b44a4.tar.xz |
ARM: default to starting kernel in HYP mode when entered in HYP
When Barebox has been entered in HYP mode, there is a high chance that
the kernel is intended to be started in HYP mode also. Get this
default into place.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Roland Hieber <r.hieber@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/sm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c index 1246d8e3a4..6fad30adab 100644 --- a/arch/arm/cpu/sm.c +++ b/arch/arm/cpu/sm.c @@ -262,6 +262,9 @@ static int sm_init(void) bootm_secure_state_names, ARRAY_SIZE(bootm_secure_state_names)); + if (__boot_cpu_mode == HYP_MODE) + bootm_secure_state = ARM_STATE_HYP; + return 0; } device_initcall(sm_init);
\ No newline at end of file |