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
This commit is contained in:
parent
a0b5b08b2e
commit
0b102d72d5
@ -12,6 +12,8 @@
|
||||
#include <arch/int.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <int.h>
|
||||
#include <vm/vm.h>
|
||||
|
||||
|
||||
#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;
|
||||
|
Loading…
Reference in New Issue
Block a user