move msi-related functionality to generic isrm
[lunaix-os.git] / lunaix-os / arch / x86 / exceptions / isrm.c
index dcd576aad1c5f177a873c8e45295e91b22d48973..a3c223d6833b3b52fd9d03c8b34d3e493574c5f4 100644 (file)
@@ -1,10 +1,10 @@
-#include <lunaix/generic/isrm.h>
 #include <lunaix/spike.h>
 #include <lunaix/owloysius.h>
 #include <lunaix/spike.h>
 #include <lunaix/owloysius.h>
+#include <asm/x86_isrm.h>
 
 
-#include "sys/x86_isa.h"
-#include "sys/ioapic.h"
-#include "sys/apic.h"
+#include "asm/x86.h"
+#include "asm/soc/ioapic.h"
+#include "asm/soc/apic.h"
 
 /*
     total: 256 ivs
 
 /*
     total: 256 ivs
@@ -165,6 +165,24 @@ isrm_notify_eos(cpu_t id)
     isrm_notify_eoi(id, LUNAIX_SCHED);
 }
 
     isrm_notify_eoi(id, LUNAIX_SCHED);
 }
 
+msi_vector_t
+isrm_msialloc(isr_cb handler)
+{
+    unsigned int iv = isrm_ivexalloc(handler);
+
+    return (msi_vector_t){ 
+        .msi_addr  = 0xfee00000,
+        .msi_data  = iv,
+        .mapped_iv = iv
+    };
+}
+
+int
+isrm_bind_dtnode(struct dt_intr_node* node)
+{
+    fail("not supported");
+}
+
 
 static void
 __intc_init()
 
 static void
 __intc_init()