i have read over 10 tutorials and still am confused...
whats the point of remapping the IRQ's...cant i just rewrite the ISR's for them?
PIC, IDTs..
Re:PIC, IDTs..
Intel has reserved the first 32 interrupts for its own purposes. Right now this means all the processor exceptions (Eg divide by zero).
Now at boot time the IRQs are mapped to the first 15 interrupts. This means they overlap the interrupts reserved for exceptions.
Should you not remap the IRQs then when an IRQ fires you have to determine if it's an IRQ or an exception manually, because they are using the same interrupts.
This is a serious pain in the neck, so people just use the PIC to remap the IRQs to a higher set of interrupts (Usually starting at interrupt 0x20).
Once remapped the whole confusing issue of the IRQs and exceptions using the same interrupts disappears.
Hope that clears it up.
Now at boot time the IRQs are mapped to the first 15 interrupts. This means they overlap the interrupts reserved for exceptions.
Should you not remap the IRQs then when an IRQ fires you have to determine if it's an IRQ or an exception manually, because they are using the same interrupts.
This is a serious pain in the neck, so people just use the PIC to remap the IRQs to a higher set of interrupts (Usually starting at interrupt 0x20).
Once remapped the whole confusing issue of the IRQs and exceptions using the same interrupts disappears.
Hope that clears it up.