[haiku-commits] r39058 - haiku/trunk/src/system/boot/platform/u-boot

  • From: ithamar.adema@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 23 Oct 2010 10:51:09 +0200 (CEST)

Author: ithamar
Date: 2010-10-23 10:51:09 +0200 (Sat, 23 Oct 2010)
New Revision: 39058
Changeset: http://dev.haiku-os.org/changeset/39058

Modified:
   haiku/trunk/src/system/boot/platform/u-boot/mmu.cpp
Log:
* ARM: print memory map before starting kernel


Modified: haiku/trunk/src/system/boot/platform/u-boot/mmu.cpp
===================================================================
--- haiku/trunk/src/system/boot/platform/u-boot/mmu.cpp 2010-10-23 07:44:39 UTC 
(rev 39057)
+++ haiku/trunk/src/system/boot/platform/u-boot/mmu.cpp 2010-10-23 08:51:09 UTC 
(rev 39058)
@@ -32,15 +32,12 @@
 #endif
 
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-/*#define TRACE_MEMORY_MAP
+#define TRACE_MEMORY_MAP
        // Define this to print the memory map to serial debug,
        // You also need to define ENABLE_SERIAL in serial.cpp
        // for output to work.
-*/
 
 
-
-
 /*
 TODO:
        -recycle bit!
@@ -547,15 +544,27 @@
        gKernelArgs.virtual_allocated_range[0].size
                = sNextVirtualAddress - KERNEL_BASE;
        gKernelArgs.num_virtual_allocated_ranges = 1;
-/*
-       // sort the address ranges
-       sort_addr_range(gKernelArgs.physical_memory_range,
-               gKernelArgs.num_physical_memory_ranges);
-       sort_addr_range(gKernelArgs.physical_allocated_range,
-               gKernelArgs.num_physical_allocated_ranges);
-       sort_addr_range(gKernelArgs.virtual_allocated_range,
-               gKernelArgs.num_virtual_allocated_ranges);
-*/
+
+#ifdef TRACE_MEMORY_MAP
+       {
+               uint32 i;
+
+               dprintf("phys memory ranges:\n");
+               for (i = 0; i < gKernelArgs.num_physical_memory_ranges; i++) {
+                       dprintf("    base 0x%08lx, length 0x%08lx\n", 
gKernelArgs.physical_memory_range[i].start, 
gKernelArgs.physical_memory_range[i].size);
+               }
+
+               dprintf("allocated phys memory ranges:\n");
+               for (i = 0; i < gKernelArgs.num_physical_allocated_ranges; i++) 
{
+                       dprintf("    base 0x%08lx, length 0x%08lx\n", 
gKernelArgs.physical_allocated_range[i].start, 
gKernelArgs.physical_allocated_range[i].size);
+               }
+
+               dprintf("allocated virt memory ranges:\n");
+               for (i = 0; i < gKernelArgs.num_virtual_allocated_ranges; i++) {
+                       dprintf("    base 0x%08lx, length 0x%08lx\n", 
gKernelArgs.virtual_allocated_range[i].start, 
gKernelArgs.virtual_allocated_range[i].size);
+               }
+       }
+#endif
 }
 
 


Other related posts:

  • » [haiku-commits] r39058 - haiku/trunk/src/system/boot/platform/u-boot - ithamar . adema