Page 1 of 1

Interrupts

Posted: Mon Oct 22, 2001 11:02 pm
by Thomas
I got pretty faR SINCE I my last post. I now load a small Testkernel into a new Segment and start it by jumping to a selector of a tss. The problem is that interrupts dont wrk.
if i cli then everything is fine. if i dont the machine resets.
Kernel and Loader (Prog. that loads the kernel) run in PL 0
InterrupttaBLE ISstill OK and ISR Code is not overwritten.

Please try to help me

Re: Interrupts

Posted: Wed Nov 14, 2001 4:36 am
by Ranieri
The rebooting reeks of a triple fault to me.
That happens when an exception is thrown while trying to handle an exception.

Do you have any exception handlers in place for things like page faults?

Re: Interrupts

Posted: Wed Nov 14, 2001 7:46 am
by thomas
I wrote handlers fpr interrupts 0-17. Sometimes theres an int 13. Every Exceptionhandler causes the pc to hang. And that works. (Hardware ints are shifted to 32++). AND: it works if interrupts are off. Also: there is nothing that could cause a triple fault. Code is:
BITS 32

GLOBAL start
start:
       cli
       mov     ax, 24
       mov     gs, ax
       mov     [gs:0], word 0x721
loopit:
       jmp     loopit

If i immediately switch back to the loader program everything is fine ... so i think that the timerinterrupt is the bad one. Theres a handler for it. Very misterious :-). I can send you the code if you want.

Re: Interrupts

Posted: Wed Nov 21, 2001 8:10 am
by thomas
i tried something else:
i loaded the kernelfile into the same segment as the loader and tata...interrupts work....
...why dont they when i load loader and kernle to different segs?

Re: Interrupts

Posted: Fri Nov 23, 2001 6:33 am
by mansonbound
aha aha aha....i know now.
I asked my it-prof...but he dont know nothing *g*
(he lives in his 16bit realmode world)

I now loaded kernel into a segment and used the dataseg of the loader program....and tata......

The problem was the printtime function that used some vars that lay in the dataseg of the loader.

Ok...thank you all.....or so...
nice monologue *g*