PIC Setup
Posted: Tue Jul 28, 2009 10:49 pm
This: http://wiki.osdev.org/PIC is by far the best description PIC remapping I have found, however there is a part that I don't fully understand. After you send both master and slave the initialization (0x11) and then their new vector offsets, you send information that "Tell it how it is wired to master/slaves." The code in the wiki is:
Does this mean that any IRQ that fires on the slave PIC will also fire the 2nd IRQ on the slave PIC, which will in turn fire the 4th IRQ on the master PIC? I'm just looking for clarity here.
Also, just out of curiosity, what is the point of saving the bytes in the ports and restoring them afterwards if you're not going to use them anyway?
Help appreciated,
Brodeur235
Code: Select all
outb(PIC1_DATA, 4); // continue initialization sequence
io_wait();
outb(PIC2_DATA, 2);
io_wait();
Also, just out of curiosity, what is the point of saving the bytes in the ports and restoring them afterwards if you're not going to use them anyway?
Help appreciated,
Brodeur235