From 0ad50c878838640ce53c202ab028d7b2c5810fe6 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Tue, 28 Sep 2021 09:04:01 -0500 Subject: arch: i386: add support for 8259 PIC Add support for the 8259 programmable interrupt controller. Signed-off-by: Danny Holman --- arch/i386/kernel/pic.h | 16 ---------------- arch/i386/kernel/serial.c | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 arch/i386/kernel/pic.h (limited to 'arch/i386/kernel') 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 - -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 +#include #include #include -#include "pic.h" #define PORT 0x3f8 -- cgit v1.2.3