Ticket #5193: 0001-Revert-r36886-adapt-to-API-changes.patch

File 0001-Revert-r36886-adapt-to-API-changes.patch, 1.7 KB (added by andreasf, 10 years ago)

proposed patch: revert hrev36886 and update insert_virtual_range_to_keep

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

    From a2f6ec2acabc28b2bf3614eb5511b44e8e76187e 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/3] Revert r36886, adapt to API changes
    
    ---
     .../boot/platform/openfirmware/arch/ppc/mmu.cpp    |   10 +++-------
     1 files changed, 3 insertions(+), 7 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..816c588 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,  
    302300// cannot preserve, since that doesn't lie in the kernel address space. Mappings
    303301// >= 2 GB are probably memory mapped hardware registers or the frame buffer
    304302// (i.e. non-RAM), which we don't handle correctly ATM.
    305 #if 0
    306303        if (keepRange) {
    307304            if (insert_virtual_range_to_keep(map->virtual_address,
    308305                    map->length) != B_OK) {
    find_allocated_ranges(void *oldPageTable, void *pageTable,  
    310307                    gKernelArgs.num_virtual_allocated_ranges);
    311308            }
    312309        }
    313 #endif
    314310
    315311        total += map->length;
    316312    }