From 1b09896afcf562d199d4df8d671601bba2b1f081 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sun, 4 Feb 2024 14:19:54 -0500 Subject: refactor arch --- src/arch/x86_common/include/pic.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/arch/x86_common/include/pic.h (limited to 'src/arch/x86_common/include/pic.h') 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); -- cgit v1.2.3-freya