refactor: striped more arch-related code from the kernel code base
[lunaix-os.git] / lunaix-os / hal / apic.c
index 2f5b5be02afe5c092c16242a1c41bd8660bd2ceb..099fd503559ef21e4ea5d52de4042e9d5a1e1823 100644 (file)
@@ -13,7 +13,7 @@
 #include <hal/pic.h>
 #include <hal/rtc.h>
 
-#include <arch/x86/interrupts.h>
+#include <sys/interrupts.h>
 
 #include <lunaix/mm/mmio.h>
 #include <lunaix/spike.h>
@@ -34,12 +34,14 @@ apic_init()
 
     // Make sure the APIC is there
     //  FUTURE: Use 8259 as fallback
-    assert_msg(cpu_has_apic(), "No APIC detected!");
+
+    // FIXME apic abstraction as local interrupt controller
+    // assert_msg(cpu_has_apic(), "No APIC detected!");
 
     // As we are going to use APIC, disable the old 8259 PIC
     pic_disable();
 
-    _apic_base = ioremap(__APIC_BASE_PADDR, 4096);
+    _apic_base = (ptr_t)ioremap(__APIC_BASE_PADDR, 4096);
 
     // Hardware enable the APIC
     // By setting bit 11 of IA32_APIC_BASE register