I am rewriting my double fault exception handler to actually print the message in an extreme system error such as gdt entries being overwritten or an invalid stack
Is there any other correctable error that would cause the first int to fail resulting in a double fault?
I'm trying to just be able to maybe give/write some debug info and tell the user what happened
What are the things to consider in a double fault
Re:What are the things to consider in a double fault
The only case thats a real pain is if an exception handler causes a page fault, since this could be handled but won't be since you'll get a double fault rather than the page fault (so I think, but check with the manual).
The only correct way of handling an NMI or double fault is using a separate TSS with its own stack which is guarenteed to be empty and properly mapped. That way, the only thing I can see giving you a triple fault is:
1) overwriting the code for the double fault handler.
2) destroying the page tables that map the double fault handler.
These cases are impossible to handle, and will always triple-fault (maybe not imediately, but on a double-fault).
The only correct way of handling an NMI or double fault is using a separate TSS with its own stack which is guarenteed to be empty and properly mapped. That way, the only thing I can see giving you a triple fault is:
1) overwriting the code for the double fault handler.
2) destroying the page tables that map the double fault handler.
These cases are impossible to handle, and will always triple-fault (maybe not imediately, but on a double-fault).