From 46fb7adb706bd92c04ea1d578a167cf5dd3f0f16 Mon Sep 17 00:00:00 2001
From: Marvin Borner
Date: Sun, 15 Sep 2019 12:52:02 +0200
Subject: Added interrupt service routines and interrupt requests

---
 src/idt/idt.c | 48 ------------------------------------------------
 src/idt/idt.h |  8 --------
 2 files changed, 56 deletions(-)
 delete mode 100644 src/idt/idt.c
 delete mode 100644 src/idt/idt.h

(limited to 'src/idt')

diff --git a/src/idt/idt.c b/src/idt/idt.c
deleted file mode 100644
index c442044..0000000
--- a/src/idt/idt.c
+++ /dev/null
@@ -1,48 +0,0 @@
-#include "../memory/memory.h"
-
-/* Defines an IDT entry */
-struct idt_entry {
-    unsigned short base_lo;
-    unsigned short sel; // Kernel segment
-    unsigned char always0; // Always 0
-    unsigned char flags;
-    unsigned short base_hi;
-} __attribute__((packed));
-
-struct idt_ptr {
-    unsigned short limit;
-    unsigned int base;
-} __attribute__((packed));
-
-// Initialize IDT with 256 entries
-struct idt_entry idt[256];
-struct idt_ptr idtp;
-
-// Defined in boot.asm
-extern void idt_load();
-
-void idt_set_gate(unsigned char num, unsigned long base, unsigned short sel, unsigned char flags) {
-    // Specify the interrupt routine's base address
-    idt[num].base_lo = (base & 0xFFFF);
-    idt[num].base_hi = (base >> 16) & 0xFFFF;
-
-    // Set selector/segment of IDT entry
-    idt[num].sel = sel;
-    idt[num].always0 = 0;
-    idt[num].flags = flags;
-}
-
-
-// Install IDT
-void idt_install() {
-    // Set IDT pointer and limit
-    idtp.limit = (sizeof(struct idt_entry) * 256) - 1;
-    idtp.base = &idt;
-
-    // Clear IDT by setting memory cells to 0
-    memory_set(&idt, 0, sizeof(struct idt_entry) * 256);
-
-    // TODO: Add method to add ISRs to IDT
-
-    idt_load();
-}
diff --git a/src/idt/idt.h b/src/idt/idt.h
deleted file mode 100644
index 5771ff0..0000000
--- a/src/idt/idt.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef MELVIX_IDT_H
-#define MELVIX_IDT_H
-
-void idt_install();
-
-void idt_set_gate(unsigned char num, unsigned long base, unsigned short sel, unsigned char flags);
-
-#endif
-- 
cgit v1.2.3