Interrupts

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Thomas

Interrupts

Post 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
Ranieri

Re: Interrupts

Post 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?
thomas

Re: Interrupts

Post 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.
thomas

Re: Interrupts

Post 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?
mansonbound

Re: Interrupts

Post 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*
Post Reply