[PATCH][AArch64] [AArch64][libgloss] Clear WXN bit from SCTLR_EL3 when initialising page tables

Kyrill Tkachov kyrylo.tkachov@arm.com
Fri Jan 24 12:28:00 GMT 2014


Hi all,

In ARMv8 cores on reset the WXN bit from SCTLR_EL3 can be set by the core (the 
architecture says that on reset it's UNKNOWN, so the core can do whatever it 
wants). If we don't clear it all memory regions with write permissions will be 
marked as non-executable, potentially causing a permission fault in the startup 
code.

This patch clears that bit and adds a dsb to ensure that everything is committed 
properly.

Tested aarch64-none-elf on a model with no problems.

Ok to go in?

Thanks,
Kyrill

P.S. If this is approved can somebody please commit it for me?

[libgloss/]
2014-01-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * aarch64/cpu-init/rdimon-aem-el3.S (flat_map): Clear WXN bit
     in SCTLR_EL3. Add dsb.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libgloss-clear-wxn.patch
Type: text/x-patch
Size: 554 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20140124/2c970ba4/attachment.bin>


More information about the Newlib mailing list