From 401afabd40bf7e63b4b88b1bd9f23f8efc5d858b Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Thu, 12 Mar 2015 07:27:05 -0500 Subject: [PATCH] loader/arm/mmu: Set first available va to KERNEL_LOAD_BASE * The existing code set the first available pa and va to the end of the page dirctory. * The arm mmu code was attempting to identity map (va==pa) the memory, but also wanted memory to be in kernel space. This allocation method isn't possible on all boards (including the pi) * We're adjusting the dynamic ram to KERNEL_LOAD_BASE plus the max size of the kernel. (which is what most other platforms are doing) --- src/system/boot/arch/arm/arch_mmu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/boot/arch/arm/arch_mmu.cpp b/src/system/boot/arch/arm/arch_mmu.cpp index a00ce5bd11..9d6264bd50 100644 --- a/src/system/boot/arch/arm/arch_mmu.cpp +++ b/src/system/boot/arch/arm/arch_mmu.cpp @@ -700,8 +700,8 @@ mmu_init(void) sPageTableRegionEnd = (addr_t)sPageDirectory + 0x200000; // Mark start for dynamic allocation - sNextPhysicalAddress = - sNextVirtualAddress = sPageTableRegionEnd; + sNextPhysicalAddress = sPageTableRegionEnd; + sNextVirtualAddress = KERNEL_LOAD_BASE + kMaxKernelSize; // mark allocated ranges, so they don't get overwritten insert_physical_allocated_range((addr_t)&_start, (addr_t)&_end - (addr_t)&_start);