feat: device subsystem rework
[lunaix-os.git] / lunaix-os / arch / i386 / exceptions / i386_isrm.c
index 1d5950ef37e1a4c12d023cf41c6722b29656a5b0..062853506cd9d4d14790d90603d3987e7808a9dc 100644 (file)
@@ -12,6 +12,7 @@
 
 static char iv_bmp[(IV_EX_END - IV_BASE_END) / 8];
 static isr_cb handlers[TOTAL_IV];
+static ptr_t ivhand_payload[TOTAL_IV];
 
 extern void
 intr_routine_fallback(const isr_param* param);
@@ -117,4 +118,21 @@ isrm_get(int iv)
     assert(iv < 256);
 
     return handlers[iv];
+}
+
+ptr_t
+isrm_get_payload(const isr_param* param)
+{
+    int iv = param->execp->vector;
+    assert(iv < 256);
+
+    return ivhand_payload[iv];
+}
+
+void
+isrm_set_payload(int iv, ptr_t payload)
+{
+    assert(iv < 256);
+
+    ivhand_payload[iv] = payload;
 }
\ No newline at end of file