Hello,
I perfectly understand the need for a tss in interrupts when switching task in interrupts.
Could someone tell me if i still should bother with it when an interrupt occurs while treating a ring0 process?
I have no userspace yet in my os and I want to validate my understanding.
Thanks a lot
tss for ring0 processes?
- max
- Member
- Posts: 616
- Joined: Mon Mar 05, 2012 11:23 am
- Libera.chat IRC: maxdev
- Location: Germany
- Contact:
Re: tss for ring0 processes?
Hey Julien,
the TSS is only used by the CPU when it has to switch from a higher privilege level (ring 3) to a lower one (ring 0). As a kernel task in ring 0 never does this privilege switch, you won't have to write to the TSS in this case.
Greets,
Max
the TSS is only used by the CPU when it has to switch from a higher privilege level (ring 3) to a lower one (ring 0). As a kernel task in ring 0 never does this privilege switch, you won't have to write to the TSS in this case.
Greets,
Max
-
- Member
- Posts: 97
- Joined: Tue Mar 10, 2015 10:08 am
Re: tss for ring0 processes?
Thanks Max!
I UUUUUUNDERSSSTTTOOODDD!!!!!
I am so happy i will the whole afternoon
I UUUUUUNDERSSSTTTOOODDD!!!!!
I am so happy i will the whole afternoon
Re: tss for ring0 processes?
Note that intel manual specified a proper procedure to switch CPU mode, which include properly setup TSS. Although you may not observe any issue with bogus TSS since nothing could trigger a task switch, you are not following the manual at your own risk.
By the way, I advice to just do it, it's easy to setup TSS, and you need it anyway with user mode or double fault handler.
By the way, I advice to just do it, it's easy to setup TSS, and you need it anyway with user mode or double fault handler.
Last edited by bluemoon on Sun Mar 22, 2015 9:04 am, edited 1 time in total.
-
- Member
- Posts: 97
- Joined: Tue Mar 10, 2015 10:08 am
Re: tss for ring0 processes?
Yes you are right and I will set up a tss anyway because it is useful.
Thanks a lot!
Thanks a lot!