[haiku-commits] r36886 - haiku/trunk/src/system/boot/platform/openfirmware/arch/ppc

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 21 May 2010 17:33:28 +0200 (CEST)

Author: bonefish
Date: 2010-05-21 17:33:28 +0200 (Fri, 21 May 2010)
New Revision: 36886
Changeset: http://dev.haiku-os.org/changeset/36886/haiku
Ticket: http://dev.haiku-os.org/ticket/5193

Modified:
   haiku/trunk/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp
Log:
* 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.


Modified: haiku/trunk/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp
===================================================================
--- haiku/trunk/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp  
2010-05-21 12:32:58 UTC (rev 36885)
+++ haiku/trunk/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp  
2010-05-21 15:33:28 UTC (rev 36886)
@@ -199,6 +199,7 @@
 }
 
 
+#if 0
 static status_t
 insert_virtual_range_to_keep(void *start, uint32 size)
 {
@@ -206,6 +207,7 @@
                gKernelArgs.arch_args.num_virtual_ranges_to_keep,
                MAX_VIRTUAL_RANGES_TO_KEEP, start, size);
 }
+#endif
 
 
 static status_t
@@ -474,10 +476,6 @@
                }
                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 @@
 
                // 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 @@
                                        
gKernelArgs.num_virtual_allocated_ranges);
                        }
                }
+#endif
 
                total += map->length;
        }


Other related posts:

  • » [haiku-commits] r36886 - haiku/trunk/src/system/boot/platform/openfirmware/arch/ppc - ingo_weinhold