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.
How can I check if my GDT is loaded correctly, and populated correctly?
If the following code does not cause a triple fault, can I assume that the GDT is correct?
If the CPU does get past that, the chance you have a broken GDT is small - because at least you have a code selector (which at least references this part of your binary) and a data selector where you expect it. Whatever the other fields may be set to, you'll typically only notice them to be off when you actually start making memory references through those segments.
"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 ]
Combuster wrote:If the CPU does get past that, the chance you have a broken GDT is small - because at least you have a code selector (which at least references this part of your binary) and a data selector where you expect it. Whatever the other fields may be set to, you'll typically only notice them to be off when you actually start making memory references through those segments.
Then my GDT must be working, because the CPU gets past all of this.