diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-11-01 21:18:17 +0200 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-11-01 21:35:57 +0200 |
commit | 2f82430b488878d321276e6efb10c61042ca2930 (patch) | |
tree | 34455e48a90eb61f1d814ff2c18cb962c02f89a6 /devices/pic_8259.c | |
parent | Add uppercase scancodes (diff) | |
download | kernel-2f82430b488878d321276e6efb10c61042ca2930.tar.xz |
Enable interrupts after enabling the PIC
Diffstat (limited to 'devices/pic_8259.c')
-rw-r--r-- | devices/pic_8259.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/devices/pic_8259.c b/devices/pic_8259.c index 74c576a..62164d3 100644 --- a/devices/pic_8259.c +++ b/devices/pic_8259.c @@ -1,4 +1,5 @@ #include "pic.h" +#include <sys/control.h> #include <sys/io.h> #define PIC1 0x20 @@ -28,8 +29,18 @@ pic_init() outb(ICW4_8086, PIC2 + DATA); // PIC masks + outb(0xff, PIC1 + DATA); + outb(0xff, PIC2 + DATA); +} + +void +pic_enable() +{ + // PIC masks outb(0xfc, PIC1 + DATA); outb(0xff, PIC2 + DATA); + + enable_interrupts(); } void |