Ticket #11896: 0001-loader-arm-mmu-Set-first-available-va-to-KERNEL_LOAD.patch

File 0001-loader-arm-mmu-Set-first-available-va-to-KERNEL_LOAD.patch, 1.2 KB (added by kallisti5, 9 years ago)

patch. I need to test this evening.

  • src/system/boot/arch/arm/arch_mmu.cpp

    From f09980fb64bd5a07d34dedb560ff553a772cc1cb Mon Sep 17 00:00:00 2001
    From: Alexander von Gluck IV <kallisti5@unixzen.com>
    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.
    * This doesn't make sense as the pa and va shouldn't be
      at the same location.
    * The mmu_page code checkes that va >= KERNEL_LOAD_BASE,
      so that looks like a sane starting va.
    ---
     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 a00ce5b..4c2803d 100644
    a b mmu_init(void)  
    700700    sPageTableRegionEnd = (addr_t)sPageDirectory + 0x200000;
    701701
    702702    // Mark start for dynamic allocation
    703     sNextPhysicalAddress =
    704     sNextVirtualAddress = sPageTableRegionEnd;
     703    sNextPhysicalAddress = sPageTableRegionEnd;
     704    sNextVirtualAddress = KERNEL_LOAD_BASE;
    705705
    706706    // mark allocated ranges, so they don't get overwritten
    707707    insert_physical_allocated_range((addr_t)&_start, (addr_t)&_end - (addr_t)&_start);