From 89fd02846ee2ae3fa3caf2b6e44ee26f3b398893 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Sun, 7 Sep 2014 21:46:54 +0000 Subject: [PATCH] When entering the kernel with the MMU off assume we are running from a va == pa map. I'm not sure the code would work if we are not running from the identity map as the ARM core may attempt to read the next instruction from an invalid memory location. --- sys/arm/arm/locore.S | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/arm/arm/locore.S b/sys/arm/arm/locore.S index 711799405df..5ed286308b3 100644 --- a/sys/arm/arm/locore.S +++ b/sys/arm/arm/locore.S @@ -127,10 +127,6 @@ Lram_offset: .word from_ram-_C_LABEL(_start) from_ram: nop #endif - adr r7, Lunmapped - bic r7, r7, #0xf0000000 - orr r7, r7, #PHYSADDR - disable_mmu: /* Disable MMU for a while */ @@ -144,7 +140,8 @@ disable_mmu: nop nop nop - mov pc, r7 + CPWAIT(r0) + Lunmapped: /* * Build page table from scratch.