Ticket #5193: 0001-Revert-r36886.patch

File 0001-Revert-r36886.patch, 2.0 KB (added by andreasf, 14 years ago)

proposed patch: revert hrev36886 and update insert_virtual_range_to_keep

  • src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp

    From cae70a5244ef44a8bd5f300dc89c313c3c0f4890 Mon Sep 17 00:00:00 2001
    From: Andreas Faerber <andreas.faerber@web.de>
    Date: Sun, 6 Jun 2010 05:08:24 +0200
    Subject: [PATCH 1/5] Revert r36886
    
    Fix compilation of insert_virtual_range_to_keep.
    ---
     .../boot/platform/openfirmware/arch/ppc/mmu.cpp    |   15 +++------------
     1 files changed, 3 insertions(+), 12 deletions(-)
    
    diff --git a/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp b/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp
    index a5429ef..259d75c 100644
    a b extern "C" uint8 __text_begin;  
    4040extern "C" uint8 _end;
    4141
    4242
    43 #if 0
    4443static status_t
    4544insert_virtual_range_to_keep(void *start, uint32 size)
    4645{
    47     return insert_memory_range(gKernelArgs.arch_args.virtual_ranges_to_keep,
    48         gKernelArgs.arch_args.num_virtual_ranges_to_keep,
    49         MAX_VIRTUAL_RANGES_TO_KEEP, start, size);
     46    return insert_address_range(gKernelArgs.arch_args.virtual_ranges_to_keep,
     47        &gKernelArgs.arch_args.num_virtual_ranges_to_keep,
     48        MAX_VIRTUAL_RANGES_TO_KEEP, (addr_t)start, size);
    5049}
    51 #endif
    5250
    5351
    5452static status_t
    find_allocated_ranges(void *oldPageTable, void *pageTable,  
    297295
    298296        // insert range in virtual ranges to keep
    299297
    300 // TODO: ATM keeping the ranges doesn't make much sense. The OF usually identity
    301 // maps stuff, which means that RAM will most likely be mapped < 2 GB, which we
    302 // cannot preserve, since that doesn't lie in the kernel address space. Mappings
    303 // >= 2 GB are probably memory mapped hardware registers or the frame buffer
    304 // (i.e. non-RAM), which we don't handle correctly ATM.
    305 #if 0
    306298        if (keepRange) {
    307299            if (insert_virtual_range_to_keep(map->virtual_address,
    308300                    map->length) != B_OK) {
    find_allocated_ranges(void *oldPageTable, void *pageTable,  
    310302                    gKernelArgs.num_virtual_allocated_ranges);
    311303            }
    312304        }
    313 #endif
    314305
    315306        total += map->length;
    316307    }