From: Kees Jongenburger Date: Thu, 16 May 2013 07:50:55 +0000 (+0200) Subject: arm:make no assumptions about TRE and AFE X-Git-Tag: v3.3.0~982 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=refs%2Fchanges%2F63%2F563%2F1;p=minix.git 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. --- diff --git a/kernel/arch/earm/pg_utils.c b/kernel/arch/earm/pg_utils.c index eb2403ab6..2895aa314 100644 --- a/kernel/arch/earm/pg_utils.c +++ b/kernel/arch/earm/pg_utils.c @@ -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;