problem with tss-based task switching
Posted: Tue Nov 08, 2005 12:00 am
hiya,
with a friend we're trying to code tss-based task switching into our system. i don't want to paste the code cause there's quite a bit of it, and it's (at least my version :p ) a bit of a mess but maybe someone has encountered the same problem, and found a way around it.
thing is that the system only performs the first switch, and then stops reacting to anything ? even irqs don?t work (but the process keeps going ? eg if it?s printing some text in a loop, it keeps doing so; even tried using 'sti' inside the 'new' process). the fact that it performs the first switch suggests, that the tss structure is set up properly (as the address of the process is in the tss). also the cs/ds/es regs are set up with the same addresses they were set when setting up the gdt, and entering pmode. interrupts are enabled in eflags (set to 0x0022 at ?startup?). we don?t use any ldt?s.
so basically when a far jump/call to a tss descriptor is performed, the system switches to the process the address of which is in the tss that the descriptor is pointing to but it?s a no-go from there. any ideas? where should we start searching for the reason? thanks.
oh, just wanted to add that we both did the thing independently (not viewing the other ones code), and we both have the same problem.
with a friend we're trying to code tss-based task switching into our system. i don't want to paste the code cause there's quite a bit of it, and it's (at least my version :p ) a bit of a mess but maybe someone has encountered the same problem, and found a way around it.
thing is that the system only performs the first switch, and then stops reacting to anything ? even irqs don?t work (but the process keeps going ? eg if it?s printing some text in a loop, it keeps doing so; even tried using 'sti' inside the 'new' process). the fact that it performs the first switch suggests, that the tss structure is set up properly (as the address of the process is in the tss). also the cs/ds/es regs are set up with the same addresses they were set when setting up the gdt, and entering pmode. interrupts are enabled in eflags (set to 0x0022 at ?startup?). we don?t use any ldt?s.
so basically when a far jump/call to a tss descriptor is performed, the system switches to the process the address of which is in the tss that the descriptor is pointing to but it?s a no-go from there. any ideas? where should we start searching for the reason? thanks.
oh, just wanted to add that we both did the thing independently (not viewing the other ones code), and we both have the same problem.