From d230708bcfbe50b9fb09fb510b96586e1d7f8046 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Mon, 5 Sep 2011 10:49:32 +0000 Subject: [PATCH] * 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. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42715 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/boot/platform/bios_ia32/platform_kernel_args.h | 6 +++--- src/system/boot/platform/bios_ia32/mmu.cpp | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h b/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h index ef24b3ad7a..e66bebe92c 100644 --- a/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h +++ b/headers/private/kernel/boot/platform/bios_ia32/platform_kernel_args.h @@ -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 diff --git a/src/system/boot/platform/bios_ia32/mmu.cpp b/src/system/boot/platform/bios_ia32/mmu.cpp index 05cb1c68c6..a808be9eaf 100644 --- a/src/system/boot/platform/bios_ia32/mmu.cpp +++ b/src/system/boot/platform/bios_ia32/mmu.cpp @@ -676,7 +676,12 @@ mmu_init(void) 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); }