Mercurial > lcfOS
diff cos/kernel/handlers.c @ 18:6129643f5c34
Fixed interrupt issue, ds, es, ss, fs and gs were not initialized to 0
author | windel |
---|---|
date | Sun, 20 Nov 2011 20:35:51 +0100 |
parents | f3e3e0e9c4bc |
children | b1fed2171e1a |
line wrap: on
line diff
--- a/cos/kernel/handlers.c Sat Nov 19 20:01:28 2011 +0100 +++ b/cos/kernel/handlers.c Sun Nov 20 20:35:51 2011 +0100 @@ -3,6 +3,7 @@ void panic(char *msg) { printf("Kernel panic: "); printf(msg); + magicBochsBreak(); halt(); } @@ -89,9 +90,9 @@ setIDTentry(19, INT19, 0x08, 0x8E); /* reserved interrupts: */ // From int20 - int31 - setIDTentry(32, INT32, 0x08, 0x8E); - setIDTentry(33, INT33, 0x08, 0x8E); - setIDTentry(34, INT34, 0x08, 0x8E); + setIDTentry(32, INT32, 0x08, 0x8F); + setIDTentry(33, INT33, 0x08, 0x8F); + setIDTentry(34, INT34, 0x08, 0x8F); // Set the correct values in the IDT pointer: idtP.base = (uint64_t)&idt; @@ -100,6 +101,7 @@ loadIDT(); PICremap(); + magicBochsBreak(); printf("enable ints\n"); asm("sti"); printf("Done!\n"); @@ -278,6 +280,7 @@ //printf("INT32 called!\n"); // called very frequent, what is this? timerDriverUpdate(); + // Acknowledge int: outb(0x20, 0x20); // EOI to master }