diff options
author | Freya Murphy <freya@freyacat.org> | 2024-01-29 18:20:21 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-01-29 18:20:21 -0500 |
commit | 0d2f0d2491be3429a634f1470701bf0790f05111 (patch) | |
tree | 0c6cd737ca3a5bcda049539bb1e93322790c7634 /src/arch/amd64/pic.h | |
parent | things (diff) | |
download | corn-0d2f0d2491be3429a634f1470701bf0790f05111.tar.gz corn-0d2f0d2491be3429a634f1470701bf0790f05111.tar.bz2 corn-0d2f0d2491be3429a634f1470701bf0790f05111.zip |
pic
Diffstat (limited to 'src/arch/amd64/pic.h')
-rw-r--r-- | src/arch/amd64/pic.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/arch/amd64/pic.h b/src/arch/amd64/pic.h new file mode 100644 index 0000000..2a4670e --- /dev/null +++ b/src/arch/amd64/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); |