diff options
author | Danny Holman <dholman@gymli.xyz> | 2021-09-28 09:04:01 -0500 |
---|---|---|
committer | Danny Holman <dholman@gymli.xyz> | 2021-09-28 09:04:38 -0500 |
commit | 0ad50c878838640ce53c202ab028d7b2c5810fe6 (patch) | |
tree | 77f189f1369a31b1941dfc5cacb8da71fe343aca /arch/i386/kernel | |
parent | 7bf2c634fdb55d67affe74a2ed0a157610308942 (diff) |
arch: i386: add support for 8259 PIC
Add support for the 8259 programmable interrupt controller.
Signed-off-by: Danny Holman <dholman@gymli.xyz>
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r-- | arch/i386/kernel/pic.h | 16 | ||||
-rw-r--r-- | arch/i386/kernel/serial.c | 2 |
2 files changed, 1 insertions, 17 deletions
diff --git a/arch/i386/kernel/pic.h b/arch/i386/kernel/pic.h deleted file mode 100644 index da4a2ee..0000000 --- a/arch/i386/kernel/pic.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef PIC_H -#define PIC_H - -#include <stdint.h> - -static inline void outb(uint16_t port, uint8_t value) { - asm volatile("outb %0, %1" : : "a"(value), "Nd"(port)); -} - -static inline uint8_t inb(uint16_t port) { - uint8_t ret; - asm volatile("inb %1, %0" : "=a"(ret) : "Nd"(port)); - return ret; -} - -#endif diff --git a/arch/i386/kernel/serial.c b/arch/i386/kernel/serial.c index 20bd8f9..58163cb 100644 --- a/arch/i386/kernel/serial.c +++ b/arch/i386/kernel/serial.c @@ -1,7 +1,7 @@ #include <kernel/serial.h> +#include <kernel/pic.h> #include <kernel/string.h> #include <stddef.h> -#include "pic.h" #define PORT 0x3f8 |