diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -247,6 +247,16 @@ b.eq 1f ret 1: + /* + * Disable the MMU. If the HCR_EL2.E2H field is set we will clear it + * which may break address translation. + */ + dsb sy + mrs x2, sctlr_el2 + bic x2, x2, SCTLR_M + msr sctlr_el2, x2 + isb + /* Configure the Hypervisor */ ldr x2, =(HCR_RW | HCR_APK | HCR_API) msr hcr_el2, x2