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:
@@ -12,6 +12,8 @@
|
|||||||
#include <arch/int.h>
|
#include <arch/int.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <int.h>
|
#include <int.h>
|
||||||
|
#include <vm/vm.h>
|
||||||
|
|
||||||
|
|
||||||
#define TRACE_HPET
|
#define TRACE_HPET
|
||||||
#ifdef TRACE_HPET
|
#ifdef TRACE_HPET
|
||||||
@@ -171,9 +173,10 @@ hpet_init(struct kernel_args *args)
|
|||||||
|
|
||||||
if (sHPETRegs == NULL) {
|
if (sHPETRegs == NULL) {
|
||||||
sHPETRegs = (struct hpet_regs *)args->arch_args.hpet;
|
sHPETRegs = (struct hpet_regs *)args->arch_args.hpet;
|
||||||
if (map_physical_memory("hpet", (void *)args->arch_args.hpet_phys,
|
if (vm_map_physical_memory(B_SYSTEM_TEAM, "hpet",
|
||||||
B_PAGE_SIZE, B_EXACT_ADDRESS, B_KERNEL_READ_AREA |
|
(void **)&sHPETRegs, B_EXACT_ADDRESS, B_PAGE_SIZE,
|
||||||
B_KERNEL_WRITE_AREA, (void **)&sHPETRegs) < B_OK) {
|
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?
|
// Would it be better to panic here?
|
||||||
dprintf("hpet_init: Failed to map memory for the HPET registers.");
|
dprintf("hpet_init: Failed to map memory for the HPET registers.");
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|||||||
Reference in New Issue
Block a user