Tripple Fault
Tripple Fault
After the 1st stage boot loader relocates me and I setup protected mode I get a triple fault when I attempt to write to video memory at 0xb8000. ex mov [0xb8000], 'o' generates a triple fault
- Lionel
- Member
- Posts: 117
- Joined: Fri Jul 16, 2010 2:16 pm
- Libera.chat IRC: ryanel
- Location: California
Re: Tripple Fault
Are you testing this in an emulator? What does it output? I assume you are using your own bootloader, in which case I would check to see if you disable interupts. I would also advise you to click here, so you can get some required reading to learn how to ask a question properly.
So far, based on your (lack) of information (seriously, you just went to a craftsmen with no knowledge of what you wanted crafted), it could be:
I would also recommend reading (googling) on what a triple fault is, why it happens, and what you can do to fix it.
Thanks,
Lionel
So far, based on your (lack) of information (seriously, you just went to a craftsmen with no knowledge of what you wanted crafted), it could be:
- Your bootloader
- Your kernel
- No valid IDT
- Invalid segments (protected mode not setup correctly)
- Something else.
I would also recommend reading (googling) on what a triple fault is, why it happens, and what you can do to fix it.
Thanks,
Lionel
Re: Tripple Fault
This should be pretty trivial to debug. Single-step through the code until the faulting instruction and see what the fault is. You have, presumably, written some basic exception handlers to halt the processor as soon as an exception occurs. The exception triggered, plus the pushed error code, along with the state of the registers and memory, should tell you what the problem is.
Re: Tripple Fault
really you didn't give anywhere near enough information to even begin guessing on what is wrong, but the most common reason for new players to get this is either broken GDT (where triple-fault occurs first time you try to use an incorrect segment), or you have interrupts enabled but haven't yet installed an IDT, in which case its the timer interrupt, which automatically fires constantly that is causing the triple-fault
also, get yourself familiar with Bochs, using that will tell you lots of information about problems like this, especially in the stages where you don't yet have your own exception handlers working (though you should do that soon, as it will be great help tracking down other problems)
also, get yourself familiar with Bochs, using that will tell you lots of information about problems like this, especially in the stages where you don't yet have your own exception handlers working (though you should do that soon, as it will be great help tracking down other problems)