|
@@ -534,13 +534,8 @@ ENTRY(kimage_vaddr)
|
|
|
ENTRY(el2_setup)
|
|
ENTRY(el2_setup)
|
|
|
mrs x0, CurrentEL
|
|
mrs x0, CurrentEL
|
|
|
cmp x0, #CurrentEL_EL2
|
|
cmp x0, #CurrentEL_EL2
|
|
|
- b.ne 1f
|
|
|
|
|
- mrs x0, sctlr_el2
|
|
|
|
|
-CPU_BE( orr x0, x0, #(1 << 25) ) // Set the EE bit for EL2
|
|
|
|
|
-CPU_LE( bic x0, x0, #(1 << 25) ) // Clear the EE bit for EL2
|
|
|
|
|
- msr sctlr_el2, x0
|
|
|
|
|
- b 2f
|
|
|
|
|
-1: mrs x0, sctlr_el1
|
|
|
|
|
|
|
+ b.eq 1f
|
|
|
|
|
+ mrs x0, sctlr_el1
|
|
|
CPU_BE( orr x0, x0, #(3 << 24) ) // Set the EE and E0E bits for EL1
|
|
CPU_BE( orr x0, x0, #(3 << 24) ) // Set the EE and E0E bits for EL1
|
|
|
CPU_LE( bic x0, x0, #(3 << 24) ) // Clear the EE and E0E bits for EL1
|
|
CPU_LE( bic x0, x0, #(3 << 24) ) // Clear the EE and E0E bits for EL1
|
|
|
msr sctlr_el1, x0
|
|
msr sctlr_el1, x0
|
|
@@ -548,7 +543,11 @@ CPU_LE( bic x0, x0, #(3 << 24) ) // Clear the EE and E0E bits for EL1
|
|
|
isb
|
|
isb
|
|
|
ret
|
|
ret
|
|
|
|
|
|
|
|
-2:
|
|
|
|
|
|
|
+1: mrs x0, sctlr_el2
|
|
|
|
|
+CPU_BE( orr x0, x0, #(1 << 25) ) // Set the EE bit for EL2
|
|
|
|
|
+CPU_LE( bic x0, x0, #(1 << 25) ) // Clear the EE bit for EL2
|
|
|
|
|
+ msr sctlr_el2, x0
|
|
|
|
|
+
|
|
|
#ifdef CONFIG_ARM64_VHE
|
|
#ifdef CONFIG_ARM64_VHE
|
|
|
/*
|
|
/*
|
|
|
* Check for VHE being present. For the rest of the EL2 setup,
|
|
* Check for VHE being present. For the rest of the EL2 setup,
|