summaryrefslogtreecommitdiff
path: root/src/arch/x86_common/include/pic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86_common/include/pic.h')
-rw-r--r--src/arch/x86_common/include/pic.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/arch/x86_common/include/pic.h b/src/arch/x86_common/include/pic.h
new file mode 100644
index 0000000..2a4670e
--- /dev/null
+++ b/src/arch/x86_common/include/pic.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#define PIC_REMAP_OFFSET 0x20
+
+/**
+ * Remaps the pie, i.e. initializes it
+ */
+void pic_remap(void);
+
+/**
+ * Masks an external irq to stop firing until un masked
+ * @param irq - the irq to mask
+ */
+void pic_mask(int irq);
+
+/**
+ * Unmasks an external irq to allow interrupts to continue for that irq
+ * @param irq - the irq to unmask
+ */
+void pic_unmask(int irq);
+
+/**
+ * Disabled the pick
+ */
+void pic_disable(void);
+
+/**
+ * Tells the pick that the interrupt has ended
+ * @param irq - the irq that has ended
+ */
+void pic_eoi(int irq);