Page 2 of 2
Posted: Sun Sep 03, 2006 3:18 pm
by matthias
hailstorm wrote:Matthias: Ouch.
DELETED TEXT...
[dutch]
ach ja, iig bedankt voor het idee :p
[/dutch]
Posted: Sun Sep 03, 2006 3:24 pm
by carbonBased
matthias wrote:hailstorm wrote:I hope this helps:
Try to clear the busy bit of the tss you are switching to, before you make the switch. It might be the problem...
Uhm if you'd taken some time to read my code, you could have seen that the task only has the interruptable flag set. So won't help
That's what you create the TSS with, yes, but the processor can/will still set the busy bit itself. You're switch_to function doesn't check for the busy bit before jumping to the task.
Also, I hate to say it, but usually the more code that's posted, the less likely people are to actually look at it
I'm bad for it, myself.
Sadly, I can't be of much help...
Are you still not getting any exceptions? In other words, is it still just hanging? This seems weird to me... makes me think the jump is actually happening, but potentially to the wrong location. If something were wrong and/or corrupt, I would expect an exception (have you confirmed that all your exception handlers are functional, by the way?)
Cheers,
Jeff
Posted: Sun Sep 03, 2006 3:29 pm
by matthias
carbonBased wrote:snap
Sorry for the longish code, my ISR's are OK, and do you know what the strangest part is? On a real machine it hangs but in MSVPC it restarts due to an error, would like to know which. No exception is given not even an invalid TSS exception or something.
Posted: Sun Sep 03, 2006 3:36 pm
by hailstorm
You are welcome!
I thought I saw an error, but luckily i saw just in time your type of linked list handling.. Sorry for that.
[dutch]
Dat vind ik trouwens een beetje vage code, het is volgens mij nog niet helemaal af...
In die zin, het is waarschijnlijk niet volledig operationeel. Helaas lag daar de fout echter niet...
[/dutch]
Posted: Sun Sep 03, 2006 3:42 pm
by matthias
hailstorm wrote:You are welcome!
I thought I saw an error, but luckily i saw just in time your type of linked list handling.. Sorry for that.
[dutch]
Dat vind ik trouwens een beetje vage code, het is volgens mij nog niet helemaal af...
In die zin, het is waarschijnlijk niet volledig operationeel. Helaas lag daar de fout echter niet...
[/dutch]
offtopic:
Ik kan wel die code helemaal uitschrijven, maar wat heeft dat voor zin als de basis niet werkt?! Het is idd nog niet af dat klopt, maar ik wil eerst even het switchen aan de praat krijgen, daarna ga ik verder op prioriteiten, mutexes semaphores noem het maar op
Posted: Sun Sep 03, 2006 3:45 pm
by hailstorm
B.t.w. Can you explain in detail how the cpu is going to use the/your stack on a task switch? I think that the stack is initialized in an faulty way.
Posted: Sun Sep 03, 2006 3:55 pm
by matthias
Tomorrow, I have to go and sleep now, have to go and study tomorrow.
Regards,
Matthias
Posted: Sat Sep 09, 2006 4:39 am
by blackcatcoder
I think the problem is in the GDT table.
Can you please post the GDT entry for the tss ?