[haiku-commits] r42715 - in haiku/trunk: headers/private/kernel/boot/platform/bios_ia32 src/system/boot/platform/bios_ia32

  • From: philippe.houdoin@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 5 Sep 2011 12:49:32 +0200 (CEST)

Author: phoudoin
Date: 2011-09-05 12:49:32 +0200 (Mon, 05 Sep 2011)
New Revision: 42715
Changeset: https://dev.haiku-os.org/changeset/42715
Ticket: https://dev.haiku-os.org/ticket/7869

Modified:
   
haiku/trunk/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h
   haiku/trunk/src/system/boot/platform/bios_ia32/mmu.cpp
Log:
* Expand kernel_args addresses ranges size, 8 is somewhat too small, leading
  to a panic at boot.
* Make the panic message more explicit when there is no more room left.

This should hopefully fix #7869.


Modified: 
haiku/trunk/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h
===================================================================
--- 
haiku/trunk/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h
   2011-09-04 21:34:34 UTC (rev 42714)
+++ 
haiku/trunk/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h
   2011-09-05 10:49:32 UTC (rev 42715)
@@ -16,9 +16,9 @@
 
 // must match SMP_MAX_CPUS in arch_smp.h
 #define MAX_BOOT_CPUS 8
-#define MAX_PHYSICAL_MEMORY_RANGE 8
-#define MAX_PHYSICAL_ALLOCATED_RANGE 8
-#define MAX_VIRTUAL_ALLOCATED_RANGE 8
+#define MAX_PHYSICAL_MEMORY_RANGE 32
+#define MAX_PHYSICAL_ALLOCATED_RANGE 32
+#define MAX_VIRTUAL_ALLOCATED_RANGE 32
 
 #define MAX_SERIAL_PORTS 4
 

Modified: haiku/trunk/src/system/boot/platform/bios_ia32/mmu.cpp
===================================================================
--- haiku/trunk/src/system/boot/platform/bios_ia32/mmu.cpp      2011-09-04 
21:34:34 UTC (rev 42714)
+++ haiku/trunk/src/system/boot/platform/bios_ia32/mmu.cpp      2011-09-05 
10:49:32 UTC (rev 42715)
@@ -676,8 +676,13 @@
                                if (end <= base)
                                        continue;
 
-                               if (insert_physical_memory_range(base, end - 
base) != B_OK) {
+                               status_t status = 
insert_physical_memory_range(base, end - base);
+                               if (status == B_ENTRY_NOT_FOUND) {
                                        panic("mmu_init(): Failed to add 
physical memory range "
+                                               "%#" B_PRIx64 " - %#" B_PRIx64 
" : all %d entries are "
+                                               "used already!\n", base, end, 
MAX_PHYSICAL_MEMORY_RANGE);
+                               } else if (status != B_OK) {
+                                       panic("mmu_init(): Failed to add 
physical memory range "
                                                "%#" B_PRIx64 " - %#" B_PRIx64 
"\n", base, end);
                                }
                        } else if (extMemoryBlock[i].type == 3) {


Other related posts:

  • » [haiku-commits] r42715 - in haiku/trunk: headers/private/kernel/boot/platform/bios_ia32 src/system/boot/platform/bios_ia32 - philippe . houdoin