Page 1 of 1
TSS
Posted: Mon Jan 26, 2009 9:10 am
by yemista
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.
Re: TSS
Posted: Mon Jan 26, 2009 9:16 am
by giszo
You only need a TSS if you switch between different privilege levels.
Re: TSS
Posted: Mon Jan 26, 2009 9:17 am
by JohnnyTheDon
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
Posted: Mon Jan 26, 2009 9:45 am
by yemista
What would happen if an interrupt occured and you had everything setup except a TSS? Would you get a segmentation fault?
Re: TSS
Posted: Mon Jan 26, 2009 10:26 am
by AJ
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
Re: TSS
Posted: Mon Jan 26, 2009 5:15 pm
by Combuster
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
Posted: Fri Jan 30, 2009 9:43 am
by jal
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.
To sum up what everyone says above:
- 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
Re: TSS
Posted: Fri Jan 30, 2009 4:36 pm
by qw
jal wrote:you will be switching rings when you are in ring 3, and an interrupt occurs
Not necessarily. The interrupt service routine could be in ring 3 too, couldn't it?
Roel
Re: TSS
Posted: Fri Jan 30, 2009 5:03 pm
by Combuster
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.
Re: TSS
Posted: Sun Feb 01, 2009 1:24 pm
by qw
Combuster wrote: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.
Point taken!
It's nice to be right every now and then...
Roel