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.
i seem to be using the same code as everyone else in remapping my IRQ's but of course when i do it an exception fires: gen protection fault int 0D. any ideas why this code that everyone uses is not workin for me?
Did you disable/unmask the IRQs. If not, it's likely that you get any exception if you don't have an interrupt handler installed for it.
Add this after your map_pics() function (or better: in it):
Disabling an IRQ means to not allow it to interrupt. As far as I remember, the PIC gets the signal but doesn't send it to the CPU. Unmasking an IRQ is another word for disabling it. See [1] for more informations on the PIC. So if you don't unmask/disable an IRQ, you will most likely receive several IRQs (timer, keyboard). Now consider what should happen. Interrupt handler for interrupt 0x20 would be called, that is the timer. I suppose you don't have an interrupt handler for this - therefore, on a IRQ you will receive a GPF since you don't have a handler installed for the appropriate IRQ.
abless wrote:
Did you disable/unmask the IRQs. If not, it's likely that you get any exception if you don't have an interrupt handler installed for it.
Add this after your map_pics() function (or better: in it):
that 0xFF stuff just disables IRQs...why would i do this if i wanted to enable them after remapping them?
Cannot really follow you here. You want to disable an IRQ if you don't have an interrupt handler for it installed, that's the one and only reason. If you have interrupt handlers installed for *every* IRQ, you needn't disable the IRQs - anyway, I don't think so and that's the reason why I suggest to disable all IRQs at startup and to enable them bit after bit when adding a driver for it.