Finxing interrupts...
This commit is contained in:
@@ -65,7 +65,7 @@ static void init_gdt() {
|
||||
static gdt_entry_t construct_entry(gdt_access_t access) {
|
||||
gdt_entry_t entry = (struct gdt_entry_struct) {
|
||||
.base_low = GDT_BASE & 0xFFFF,
|
||||
.base_middle = (GDT_BASE >> 16) % 0xFF,
|
||||
.base_middle = (GDT_BASE >> 16) & 0xFF,
|
||||
.base_high = (GDT_BASE >> 24) & 0xFF,
|
||||
.limit_low = (GDT_LIMIT & 0xFFFF),
|
||||
.access = access,
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
#define GDT_DATA_TYPE_READ_WRITE_ACCESSED 0x3
|
||||
#define GDT_DATA_TYPE_READ_ONLY_EXPAND_DOWN 0x4
|
||||
#define GDT_DATA_TYPE_READ_ONLY_EXPAND_DOWN_ACCESSED 0x5
|
||||
#define GDT_DATA_TYPE_READ_WRITE_EXPAND_DATA 0x6
|
||||
#define GDT_DATA_TYPE_READ_WRITE_EXPAND_DATA_ACCESSED 0x7
|
||||
#define GDT_DATA_TYPE_READ_WRITE_EXPAND_DOWN 0x6
|
||||
#define GDT_DATA_TYPE_READ_WRITE_EXPAND_DOWN_ACCESSED 0x7
|
||||
#define GDT_DATA_TYPE_EXEC_ONLY 0x8
|
||||
#define GDT_CODE_TYPE_EXEC_ONLY_ACCESSED 0x9
|
||||
#define GDT_CODE_TYPE_EXEC_READ 0xA
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <stdint.h>
|
||||
#include "isr.h"
|
||||
#include "../libc/string.h"
|
||||
#include "tty.h"
|
||||
#include "../libc/string.h"
|
||||
#include "ports.h"
|
||||
|
||||
#define PIC1 0x20 // I/O address for master PIC
|
||||
@@ -70,7 +70,7 @@ void ack_irq(uint32_t int_num) {
|
||||
// Send and End Of Interrupt(EOF) at the PICs.
|
||||
if(int_num >= 40)
|
||||
outb(PIC2_COMMAND, PIC_EOI); // Send reset signal to slave
|
||||
outb(PIC2_COMMAND, PIC_EOI); // In any case, reset the master
|
||||
outb(PIC1_COMMAND, PIC_EOI); // In any case, reset the master
|
||||
}
|
||||
|
||||
void irq_handler(registers_t regs) {
|
||||
|
||||
Reference in New Issue
Block a user