diff --git a/u-boot/arch/arm/cpu/armv8/start.S b/u-boot/arch/arm/cpu/armv8/start.S index 1c94bb64a6..8810f251d5 100644 --- a/u-boot/arch/arm/cpu/armv8/start.S +++ b/u-boot/arch/arm/cpu/armv8/start.S @@ -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 /* diff --git a/u-boot/include/configs/rk33plat.h b/u-boot/include/configs/rk33plat.h index d7f52c27d7..238f379834 100755 --- a/u-boot/include/configs/rk33plat.h +++ b/u-boot/include/configs/rk33plat.h @@ -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