Triple-fault when switching to usermode
Posted: Mon Feb 15, 2016 5:34 am
Hello, I am following James Malloy's, Everything went fine until I got to the usermode chapter.
Note: I fixed every bug I found listed in the wiki page about his tutorial's bugs.
I think it faults when tss_flush is called.
Here is the definition of tss_flush
Note: I fixed every bug I found listed in the wiki page about his tutorial's bugs.
I think it faults when tss_flush is called.
Here is the definition of tss_flush
Code: Select all
tss_flush:
mov ax, 0x2B ; Load the index of our TSS structure - The index is
; 0x28, as it is the 5th selector and each is 8 bytes
; long, but we set the bottom two bits (making 0x2B)
; so that it has an RPL of 3, not zero.
ltr ax ; Load 0x2B into the task state register.
ret