summaryrefslogtreecommitdiff
path: root/ioapic.c
diff options
context:
space:
mode:
Diffstat (limited to 'ioapic.c')
-rw-r--r--ioapic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ioapic.c b/ioapic.c
index cb0f015..bbe5f9b 100644
--- a/ioapic.c
+++ b/ioapic.c
@@ -4,6 +4,7 @@
#include "types.h"
#include "defs.h"
+#include "memlayout.h"
#include "traps.h"
#define IOAPIC 0xFEC00000 // Default physical address of IO APIC
@@ -50,7 +51,7 @@ ioapicinit(void)
{
int i, id, maxintr;
- ioapic = (volatile struct ioapic*)IOAPIC;
+ ioapic = P2V((volatile struct ioapic*)IOAPIC);
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
id = ioapicread(REG_ID) >> 24;
if(id != ioapicid)