diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog index 5920a2336..3c0c02d9a 100644 --- a/libgloss/ChangeLog +++ b/libgloss/ChangeLog @@ -1,3 +1,8 @@ +2014-01-24 Kyrylo Tkachov + + * aarch64/cpu-init/rdimon-aem-el3.S (flat_map): Clear WXN bit + in SCTLR_EL3. Add dsb. + 2014-01-10 Jeff Johnston * arm/configure.in: Revert previous fix and change host_makefile_frag diff --git a/libgloss/aarch64/cpu-init/rdimon-aem-el3.S b/libgloss/aarch64/cpu-init/rdimon-aem-el3.S index 6ddf62345..463762703 100644 --- a/libgloss/aarch64/cpu-init/rdimon-aem-el3.S +++ b/libgloss/aarch64/cpu-init/rdimon-aem-el3.S @@ -138,9 +138,12 @@ _flat_map: mrs x0, sctlr_el3 ldr x1, =0x100d /* bits I(12) SA(3) C(2) M(0) */ - bic x0, x0, #2 /* clear bit A(1) */ + bic x0, x0, #(1 << 1) /* clear bit A(1) */ + mov x2, #(1 << 19) /* clear WXN */ + bic x0, x0, x2 orr x0, x0, x1 /* set bits */ + dsb sy msr sctlr_el3, x0 isb ret