diff options
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/gdt/gdt.c | 4 | ||||
-rw-r--r-- | src/kernel/interact.asm | 4 | ||||
-rw-r--r-- | src/kernel/interrupts/irq.c | 16 | ||||
-rw-r--r-- | src/kernel/interrupts/isr.c | 2 | ||||
-rw-r--r-- | src/kernel/tasks/process.c | 2 |
5 files changed, 6 insertions, 22 deletions
diff --git a/src/kernel/gdt/gdt.c b/src/kernel/gdt/gdt.c index 79a52a4..4f98056 100644 --- a/src/kernel/gdt/gdt.c +++ b/src/kernel/gdt/gdt.c @@ -61,12 +61,10 @@ void gdt_set_gate(s32 num, u32 base, u32 limit, u8 access, u8 gran) gdt[num].base_low = (u16)(base & 0xFFFF); gdt[num].base_middle = (u8)((base >> 16) & 0xFF); gdt[num].base_high = (u8)((base >> 24) & 0xFF); - - // Set descriptor limits gdt[num].limit_low = (u16)(limit & 0xFFFF); - gdt[num].granularity = (u8)((limit >> 16) & 0x0F); // Set granularity and access flags + gdt[num].granularity = (u8)((limit >> 16) & 0x0F); gdt[num].granularity |= (gran & 0xF0); gdt[num].access = access; } diff --git a/src/kernel/interact.asm b/src/kernel/interact.asm index e7d7e86..00cdbe0 100644 --- a/src/kernel/interact.asm +++ b/src/kernel/interact.asm @@ -32,7 +32,7 @@ endstruc section .text int32: use32 ; by Napalm _int32: - cli ; disable interrupts + ;cli ; disable interrupts pusha ; save register state to 32bit stack mov esi, reloc ; set source to code below mov edi, INT32_BASE ; set destination to new base address @@ -113,7 +113,7 @@ section .text cld ; clear direction flag (so we copy forward) rep movsb ; do the actual copy (16bit stack to 32bit stack) popa ; restore registers - ; sti ; enable interrupts + ;sti ; enable interrupts ret ; return to caller resetpic: ; reset's 8259 master and slave pic vectors diff --git a/src/kernel/interrupts/irq.c b/src/kernel/interrupts/irq.c index 7c45718..9fd0c31 100644 --- a/src/kernel/interrupts/irq.c +++ b/src/kernel/interrupts/irq.c @@ -3,36 +3,22 @@ #include <system.h> extern void irq0(); - extern void irq1(); - extern void irq2(); - extern void irq3(); - extern void irq4(); - extern void irq5(); - extern void irq6(); - extern void irq7(); - extern void irq8(); - extern void irq9(); - extern void irq10(); - extern void irq11(); - extern void irq12(); - extern void irq13(); - extern void irq14(); - extern void irq15(); +extern void irq128(); // Array to handle custom IRQ handlers void *irq_routines[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; diff --git a/src/kernel/interrupts/isr.c b/src/kernel/interrupts/isr.c index 3bfc2b8..b24529f 100644 --- a/src/kernel/interrupts/isr.c +++ b/src/kernel/interrupts/isr.c @@ -47,7 +47,7 @@ void isrs_install() idt_set_gate(30, (unsigned)isr30, 0x08, 0x8E); idt_set_gate(31, (unsigned)isr31, 0x08, 0x8E); - idt_set_gate(0x80, (unsigned)isr128, 0x08, 0xEE); + idt_set_gate(0x80, (unsigned)isr128, 0x08, 0x8E); info("Installed Interrupt Service Routines"); } diff --git a/src/kernel/tasks/process.c b/src/kernel/tasks/process.c index 0ba3fbe..b86620d 100644 --- a/src/kernel/tasks/process.c +++ b/src/kernel/tasks/process.c @@ -21,6 +21,7 @@ extern u32 stack_hold; void scheduler(struct regs *regs) { + serial_put('+'); memcpy(¤t_proc->registers, regs, sizeof(struct regs)); timer_handler(regs); @@ -32,7 +33,6 @@ void scheduler(struct regs *regs) /* debug("Max pid: %d", pid); */ /* debug("Task switch to %s with pid %d", current_proc->name, current_proc->pid); */ - serial_put('+'); while (current_proc->state == PROC_ASLEEP) { current_proc = current_proc->next; |