* 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
This commit is contained in:
Philippe Houdoin 2011-09-05 10:49:32 +00:00
parent 0e07be0657
commit d230708bcf
2 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -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);
}