TSS
TSS
Do you need to setup a dummy TSS to make sure everything in pmode works properly? I never bothered with one and I am experiencing strange problems, and dont know if maybe this could be contributing.
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: TSS
You also need one if you ever want to use interrupts (and you will want to use interrupts for keyboard and other drivers).
Re: TSS
What would happen if an interrupt occured and you had everything setup except a TSS? Would you get a segmentation fault?
Re: TSS
Hi,
You would only have a problem if the interrupt happens in ring 3. Whether you would get an invalid TSS or GPF exception, I can't be bothered to look up at the moment, but you can find all this info in the Intel Manuals.
Cheers,
Adam
You would only have a problem if the interrupt happens in ring 3. Whether you would get an invalid TSS or GPF exception, I can't be bothered to look up at the moment, but you can find all this info in the Intel Manuals.
Cheers,
Adam
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: TSS
If you're in ring 3 without a TSS, you'll get a triple fault the moment the processor tries to get out of ring 3. (on practically all usable setups, that is)
Re: TSS
To sum up what everyone says above:yemista wrote:Do you need to setup a dummy TSS to make sure everything in pmode works properly? I never bothered with one and I am experiencing strange problems, and dont know if maybe this could be contributing.
- you do not need a TSS when you are not switching between rings
- you do need a TSS when you are switching between rings
- you will be switching rings when you are in ring 3, and an interrupt occurs
The CPU needs the TSS to set the SS:ESP registers for the ring 0 (or other non-ring 3) stack.
JAL
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: TSS
An argument which boils down to "Not if we have this hypothetical and impractical setup nobody sane would dare to use".
Yes you are right.
Yes you are right.