First post, by vladstamate
- Rank
- Oldbie
So I have 1 TSS set up in my global descriptor table so that when user mode is switching to kernel mode via an INT instruction that TSS is used to set up
a) kernel stack (SS0 and ESP0)
b) set all segments to the kernel's code and data descriptors.
Now on the other side of the INT (once I hit kernel mode) I still have access to all the user's registers (EAX, EBX, etc) however the segment registers that the user had are overwritten (as per TSS). How can I get access to the user's segment registers prior to the INT instruction (like I have access to the user's normal registers)?
Clearly the CPU knows them as upon IRET and return to user mode, those are being restored.
It feels like I am missing something very basic....
YouTube channel: https://www.youtube.com/channel/UC7HbC_nq8t1S9l7qGYL0mTA
Collection: http://www.digiloguemuseum.com/index.html
Emulator: https://sites.google.com/site/capex86/
Raytracer: https://sites.google.com/site/opaqueraytracer/