The bootloader can leave the system control register
in at state that doesn't match our setup. make no assumptions
and configure TRE and AFE.
for(i = 0; i < ARM_VM_DIR_ENTRIES; i++) {
u32_t flags = ARM_VM_SECTION
| ARM_VM_SECTION_USER
+ | ARM_VM_SECTION_DEVICE
| ARM_VM_SECTION_DOMAIN;
phys = i * ARM_SECTION_SIZE;
pagedir[i] = phys | flags;
/* AFE set to zero (default reset value): not using simplified model. */
/* TRE set to zero (default reset value): TEX[2:0] are used, plus C and B bits.*/
+ sctlr &= ~SCTLR_TRE;
+
+ /* AFE set to zero (default reset value): not using simplified model. */
+ sctlr &= ~SCTLR_AFE;
/* Enable instruction and data cache */
sctlr |= SCTLR_C;