Floppy

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
DarylD

Floppy

Post by DarylD »

Actually I have a more serious problem now, any interrupt causes my machine to reset, it looks like it is the EOI commands but they are coded identical to the linux ones??

Weird!
PlayOS

RE:Floppy

Post by PlayOS »

Normally EOI commands will only affect the PIC, maybe you would like to share the code and we might be able to better help you.

EOI Must be coded like this:

For IRQ0-7 Do This:

  MOV AL, 0x20
  OUT 0x20, AL

For IRQ8-15 Do This:

  MOV AL, 0x20
  OUT 0x20, AL
  OUT 0xA0, AL
jamethiel

RE:Floppy

Post by jamethiel »

A missed EOI is just going to cause the interrupt to either retrigger or never trigger again (I forget which).

Without more information, I'd suspect either a corrupt IDT or that your interrupt handlers are corrupting the stack.
DarylD

RE:Floppy

Post by DarylD »

It works perfectly in VMWare, but resets the machine when I boot for real.

I am not even sure its the EOI command because it reboots the second I press a key (or a timer interrupt occurs)

Its baffling me, surely if it works in VMWare it should work for real?!
jamethiel

RE:Floppy

Post by jamethiel »

No, just because something works in an emulator doesn't necessarily mean it will work on the real thing.

I'd try adding infinite loop code at strategic places to see if the system locks up or still reboots. The first four places I'd try are just before enabling interrupts (to make sure that the problem doesn't happen earlier), just after enabling interrupts (to make sure that the problem is in the interrupt path), the start of the interrupt handler (to make sure that the problem isn't in the IDT or related tables), the end of the interrupt handler (to see if the problem is in the interrupt return path).
Post Reply