Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
int main(){
gdt_init();
idt_init();
pic_init();
printf("started:)");
}
the strange thing is that i can call each interrupt via "asm volatile ("int $0x2");" but i don't get any hardware interrupts e.g. the keyboard. so i looked in the tuts and found that i've to call "asm volatile("sti");" but if i add this line below "pic_init();" i recieve a int 8 with i linked with the string "double fault"
the problem is i don't know where the error is and hope somebody can help me to get around this problem
Did you try to run your OS in bochs? Does it give more detailed complaints?
Does you init_pic code work as expected? Most initial set-ups aren't that advanced so that the problems causing a doublefault do not apply to that specific handler, and you're looking at a timer interrupt (which is routed through int8 at boot).
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
i use QEMU 0.9.1 (it didn't produce a register dump;) and my pic setup looks like the code block appended
i've seen implementations using a "sleep(1 sec)" between each command is this required?
Combuster wrote:
Does you init_pic code work as expected?
i really don't know is there a way to figure it out?
i think i figured it out. it was a more than stupid error. i swapped the the first and second param inside my outportb() function . now i receive a int 0x20 which might be a timer interrupt (IRQ 0) hooked with 0x20.
@Combuster thanks a lot for pushing me in the right direction