Small Interrupt Problem.....?

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
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Small Interrupt Problem.....?

Post by Perica »

..
Last edited by Perica on Sun Dec 03, 2006 9:08 pm, edited 2 times in total.
Thunder

Re:Small Interrupt Problem.....?

Post by Thunder »

Show us you code example,
are you working in C or asm?

Just then we'll can help you...
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Re:Small Interrupt Problem.....?

Post by Perica »

..
Last edited by Perica on Sun Dec 03, 2006 9:08 pm, edited 1 time in total.
Tim

Re:Small Interrupt Problem.....?

Post by Tim »

The error codes don't mean much on their own. You should search for that text in the Bochs source code and examine what it's doing there.

However, that "io write to address" error implies that you're writing where you shouldn't. Specifically, you're writing 4 bytes when you should probably be only writing 1.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Small Interrupt Problem.....?

Post by distantvoices »

the bochs error regarding the length...

perica, as tim says, it is the length you try to write to the 0x3f2 register: do you say in your code mov eax,[value], then out 0x3f2,eax? Using smaller register will help out: ax=16 bits,ah=8 bits.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Re:Small Interrupt Problem.....?

Post by Perica »

..
Last edited by Perica on Sun Dec 03, 2006 9:08 pm, edited 1 time in total.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Small Interrupt Problem.....?

Post by distantvoices »

You output something to a port, perica, else bochs wouldn't complain about that.0x3f0 is the base of the fdc controller. stop ****ing on my back and telling me it's raining, gosh.

The second, your stack problem: I've encountered this too. I've solved it by giving the kernel a valid esp0 to push things to when an interrupt occurs.

I DOUBT, that your idt setup code is to blame for that. It rather seems as if some valid stack is missing. you can load a system tss and enter esp0 ss0 values to get this issue running.

stay safe.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Re:Small Interrupt Problem.....?

Post by Perica »

..
Last edited by Perica on Sun Dec 03, 2006 9:08 pm, edited 1 time in total.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Small Interrupt Problem.....?

Post by distantvoices »

I don't think you are stupid, perica. take it with a grain of salt. 8)

I tell you the following: you say, you fire an interrupt and it executes. Fine. Then with your IDT-Padding, everything is ALL RIGHT. I have not tested it. It looks all right. Bochs would give you a triple fault if your idt was wrong.

You shall trace the execution of your code with bochs debug. You can send bochs debug output to a text file. It will show you where your code craps out.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Post Reply