Triple Fault

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.
Post Reply
Whatever5k

Triple Fault

Post by Whatever5k »

Hm, when I boot my kernel, it triple-faults. Why? I haven't set up a IDT yet, neither a exception handler. Do I have to do this? But why does the kernel triple-fault. Is there a General Protection Faul in my code?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Triple Fault

Post by Pype.Clicker »

any exception that occurs before IDT setting *will* reset the CPU...
Whatever5k

Re:Triple Fault

Post by Whatever5k »

And what is an exception, for example?
So something must be wrong in my code...what can that be?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Triple Fault

Post by Pype.Clicker »

- accessing a selector that is invalid
- push/p?p without a valid ss/esp pair
- some invalid info in the GDT (setting CS with a data segment, etc)
- running some invalid opcode (*very* common when you forget the "here: jmp here" at the end of your code and sweep the whole memory until you fall in the empty bios (0xffff) area)
- division by zero

...
Whatever5k

Re:Triple Fault

Post by Whatever5k »

Thanks!
Post Reply