arm:make no assumptions about TRE and AFE
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.
This commit is contained in:
parent
8059318c3e
commit
85e0b9c805
|
|
@ -159,6 +159,7 @@ void pg_identity(kinfo_t *cbi)
|
|||
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;
|
||||
|
|
@ -201,6 +202,10 @@ void vm_enable_paging(void)
|
|||
|
||||
/* 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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user