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 @@ -267,8 +267,9 @@ */ LENTRY(drop_to_el1) mrs x23, CurrentEL - lsr x23, x23, #2 - cmp x23, #0x2 + and x23, x23, #(CURRENTEL_EL_MASK) + lsr x23, x23, #(CURRENTEL_EL_SHIFT) + cmp x23, #(CURRENTEL_EL_EL2 >> CURRENTEL_EL_SHIFT) b.eq 1f ret 1: