[u-boot] rk33plat: enable exception rounting to EL2 when running EL2.
Change-Id: If81e8ea0b2cc42356658194b2516b820f12e6775 Signed-off-by: Firefly <service@t-firefly.com> (cherry picked from commit 6a8ab9e6142cb781595e502cabc7cad5b5954873)
This commit is contained in:
@ -225,6 +225,23 @@ el1_start:
|
||||
bl gic_init_secure_percpu
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ROCKCHIP)
|
||||
/*
|
||||
* Setting HCR_EL2.TGE AMO IMO FMO for exception rounting to EL2
|
||||
*/
|
||||
mrs x0, CurrentEL /* check currentEL */
|
||||
cmp x0, 0x8
|
||||
b.ne endseting /* currentEL != EL2 */
|
||||
|
||||
mrs x9, hcr_el2
|
||||
orr x9, x9, #(7 << 3) /* HCR_EL2.AMO IMO FMO set */
|
||||
orr x9, x9, #(1 << 27) /* HCR_EL2.TGE set */
|
||||
msr hcr_el2, x9
|
||||
|
||||
endseting:
|
||||
nop
|
||||
#endif /* CONFIG_ROCKCHIP */
|
||||
|
||||
branch_if_master x0, x1, 2f
|
||||
|
||||
/*
|
||||
|
||||
@ -65,9 +65,6 @@
|
||||
#define CONFIG_SWITCH_EL3_TO_EL1
|
||||
#endif
|
||||
|
||||
/* do_nonsec_virt_switch when enter kernel */
|
||||
#define CONFIG_ARMV8_SWITCH_TO_EL1
|
||||
|
||||
/* icache enable when start to kernel */
|
||||
#define CONFIG_ICACHE_ENABLE_FOR_KERNEL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user