Author: jackburton Date: 2010-02-11 16:57:59 +0100 (Thu, 11 Feb 2010) New Revision: 35453 Changeset: http://dev.haiku-os.org/changeset/35453/haiku Modified: haiku/trunk/src/system/kernel/arch/x86/timers/x86_hpet.cpp Log: The hpet registers area is already wired, so use the vm_map_physical_memory() call with the true parameter. Fixes a panic at boot when using the hpet timers Modified: haiku/trunk/src/system/kernel/arch/x86/timers/x86_hpet.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/x86/timers/x86_hpet.cpp 2010-02-11 15:45:46 UTC (rev 35452) +++ haiku/trunk/src/system/kernel/arch/x86/timers/x86_hpet.cpp 2010-02-11 15:57:59 UTC (rev 35453) @@ -12,7 +12,9 @@ #include <arch/int.h> #include <arch/cpu.h> #include <int.h> +#include <vm/vm.h> + #define TRACE_HPET #ifdef TRACE_HPET #define TRACE(x) dprintf x @@ -171,9 +173,10 @@ if (sHPETRegs == NULL) { sHPETRegs = (struct hpet_regs *)args->arch_args.hpet; - if (map_physical_memory("hpet", (void *)args->arch_args.hpet_phys, - B_PAGE_SIZE, B_EXACT_ADDRESS, B_KERNEL_READ_AREA | - B_KERNEL_WRITE_AREA, (void **)&sHPETRegs) < B_OK) { + if (vm_map_physical_memory(B_SYSTEM_TEAM, "hpet", + (void **)&sHPETRegs, B_EXACT_ADDRESS, B_PAGE_SIZE, + B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, + (addr_t)args->arch_args.hpet_phys, true) < B_OK) { // Would it be better to panic here? dprintf("hpet_init: Failed to map memory for the HPET registers."); return B_ERROR;