summaryrefslogtreecommitdiff
path: root/Source/Kernel/SyscallManager
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-08-28 15:13:28 +0200
committerAlexis211 <alexis211@gmail.com>2009-08-28 15:13:28 +0200
commita2e5fb565df070825c71fb60e5e70b9a03879073 (patch)
tree3741d2e57a17f92da8d680115d17faf557749010 /Source/Kernel/SyscallManager
parent2582a11c37ccc22d64974b20b0793e5ba873fe1f (diff)
downloadMelon-a2e5fb565df070825c71fb60e5e70b9a03879073.tar.gz
Melon-a2e5fb565df070825c71fb60e5e70b9a03879073.zip
Some changes
Diffstat (limited to 'Source/Kernel/SyscallManager')
-rw-r--r--Source/Kernel/SyscallManager/IDT.ns.cpp13
-rw-r--r--Source/Kernel/SyscallManager/IDT.ns.h2
2 files changed, 9 insertions, 6 deletions
diff --git a/Source/Kernel/SyscallManager/IDT.ns.cpp b/Source/Kernel/SyscallManager/IDT.ns.cpp
index 6ad17b5..4635f5f 100644
--- a/Source/Kernel/SyscallManager/IDT.ns.cpp
+++ b/Source/Kernel/SyscallManager/IDT.ns.cpp
@@ -58,9 +58,12 @@ extern "C" void idt_flush(u32int);
extern "C" void interrupt_handler(registers_t regs) {
if (regs.int_no < 32) {
- IDT::handleException(&regs, regs.int_no);
+ IDT::handleException(regs, regs.int_no);
} else if (regs.int_no < 48) {
- Dev::handleIRQ(&regs, (regs.int_no - 32));
+ if (regs.int_no >= 40)
+ outb(0xA0, 0x20);
+ outb(0x20, 0x20);
+ Dev::handleIRQ(regs, (regs.int_no - 32));
}
}
@@ -149,7 +152,7 @@ void init() {
idt_flush((u32int)&idt_ptr);
}
-void handleException(registers_t *regs, int no) {
+void handleException(registers_t regs, int no) {
asm volatile("cli;");
char* exceptions[] = {
"Division by zero", "Debug exception", "Non maskable interrupt",
@@ -167,8 +170,8 @@ void handleException(registers_t *regs, int no) {
VirtualTerminal *vt = new VirtualTerminal(5, 50, 0, 15);
vt->map();
- *vt << "\n Unhandled exception " << (s32int)no << " at " << (u32int)regs->cs << ":" <<
- (u32int)regs->eip << "\n :: " << exceptions[no];
+ *vt << "\n Unhandled exception " << (s32int)no << " at " << (u32int)regs.cs << ":" <<
+ (u32int)regs.eip << "\n :: " << exceptions[no];
asm volatile("hlt");
}
diff --git a/Source/Kernel/SyscallManager/IDT.ns.h b/Source/Kernel/SyscallManager/IDT.ns.h
index 0a79100..cf8e9f2 100644
--- a/Source/Kernel/SyscallManager/IDT.ns.h
+++ b/Source/Kernel/SyscallManager/IDT.ns.h
@@ -25,7 +25,7 @@ namespace IDT {
}__attribute__((packed));
void init();
- void handleException(registers_t *regs, int no);
+ void handleException(registers_t regs, int no);
}
#endif