From 3a5655a50258fe19fdf452ed203bc38b85640959 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 21 May 2010 15:33:28 +0000 Subject: [PATCH] * Reverted r34863. * Don't keep any memory mappings from the OF for the time being. We can't keep mappings < 2 GB, since those aren't in the kernel address space and we don't handle memory mapped registers or the like correctly either. Ticket #5193. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36886 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../boot/platform/openfirmware/arch/ppc/mmu.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp b/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp index be4cd37e0c..0a798dbfb8 100644 --- a/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp +++ b/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp @@ -199,6 +199,7 @@ insert_virtual_allocated_range(void *start, uint32 size) } +#if 0 static status_t insert_virtual_range_to_keep(void *start, uint32 size) { @@ -206,6 +207,7 @@ insert_virtual_range_to_keep(void *start, uint32 size) gKernelArgs.arch_args.num_virtual_ranges_to_keep, MAX_VIRTUAL_RANGES_TO_KEEP, start, size); } +#endif static status_t @@ -474,10 +476,6 @@ find_allocated_ranges(void *oldPageTable, void *pageTable, } if (map->virtual_address == oldPageTable) keepRange = false; - if (!is_physical_memory(map->physical_address)) { - keepRange = false; - // we only get vm_pages for physical memory - } // insert range in virtual allocated @@ -494,6 +492,12 @@ find_allocated_ranges(void *oldPageTable, void *pageTable, // insert range in virtual ranges to keep +// TODO: ATM keeping the ranges doesn't make much sense. The OF usually identity +// maps stuff, which means that RAM will most likely be mapped < 2 GB, which we +// cannot preserve, since that doesn't lie in the kernel address space. Mappings +// >= 2 GB are probably memory mapped hardware registers or the frame buffer +// (i.e. non-RAM), which we don't handle correctly ATM. +#if 0 if (keepRange) { if (insert_virtual_range_to_keep(map->virtual_address, map->length) != B_OK) { @@ -501,6 +505,7 @@ find_allocated_ranges(void *oldPageTable, void *pageTable, gKernelArgs.num_virtual_allocated_ranges); } } +#endif total += map->length; }