From 0b102d72d5933cb730ca0a0dab29bad224180a14 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Thu, 11 Feb 2010 15:57:59 +0000 Subject: [PATCH] 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 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35453 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/timers/x86_hpet.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/system/kernel/arch/x86/timers/x86_hpet.cpp b/src/system/kernel/arch/x86/timers/x86_hpet.cpp index c873e7f5e4..d638de8b34 100644 --- a/src/system/kernel/arch/x86/timers/x86_hpet.cpp +++ b/src/system/kernel/arch/x86/timers/x86_hpet.cpp @@ -12,6 +12,8 @@ #include #include #include +#include + #define TRACE_HPET #ifdef TRACE_HPET @@ -171,9 +173,10 @@ hpet_init(struct kernel_args *args) 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;