Do I need a TSS or LDT

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.
Post Reply
srg

Do I need a TSS or LDT

Post by srg »

Hi
On a 32-bit pmode os with a flat memory model and paging, I understand that one method to handle the Segmentation of the x86 CPU is to have four 4GB (supervisor code, supervisor data, user code and user data) Segments, a GDT of course and an IDT, not forgetting call gates for API calls etc.

What I'm not sure about is what to do with the Task Register (do I create any TSS's?) or the LDTR (I don't want an LDT). Do I simply set these to 0?

Plus where do I asign the stack (to the data segements possibly?).

Thanks
srg

Re:Do I need a TSS or LDT

Post by srg »

I guess I have answered my own questions :)
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Do I need a TSS or LDT

Post by Pype.Clicker »

a TSS is mandatory as soon as you want to have a user code at DPL3. this is mainly in order to have a SS0 and ESP0 that will be used by the CPU when an interrupt occurs and that a switch to mode 0 is necessary to handle it .
Post Reply