diff options
author | Freya Murphy <freya@freyacat.org> | 2024-02-04 14:19:54 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-02-04 14:19:54 -0500 |
commit | 1b09896afcf562d199d4df8d671601bba2b1f081 (patch) | |
tree | b4ee4ae8e6e1ff5c5b27fe97509752b17fae330b /src/arch/x86_common/include/pic.h | |
parent | fix acpi on uefi, kprint fixes (diff) | |
download | corn-1b09896afcf562d199d4df8d671601bba2b1f081.tar.gz corn-1b09896afcf562d199d4df8d671601bba2b1f081.tar.bz2 corn-1b09896afcf562d199d4df8d671601bba2b1f081.zip |
Diffstat (limited to 'src/arch/x86_common/include/pic.h')
-rw-r--r-- | src/arch/x86_common/include/pic.h | 31 |
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); |