Curiosity and the PIC

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
elderK

Curiosity and the PIC

Post by elderK »

Hey all.
Im just curious...
At the moment, My IRQ Handler... sends EOI messages to PIC1 and PIC2 when an Interrupt is fired higher than 39. Obviously, this isnt right? right?.

If I want to be able to use the Interrupts provided to me by the Second PIC, would I not have to implement some check?

Like... Ok, the Cascading interrupt on PIC1 is firing! Time to check PIC2 for Activity?

Im just not really that sure?
paulbarker

Re:Curiosity and the PIC

Post by paulbarker »

This is all handled automagiacally by hardware, most probably in the north bridge.

As far as the PIC goes, first you set it up (mapping the IRQs is probably the only setup relevant for a modern PC, all other options are usually the same no matter what OS is running). Now add handlers, which must issue the correct EOI messages. The last thing to consider is masking and unmasking interrupts at the PIC (I do not mean cli/sti).

Thats it for the PIC. If you want more, use the LAPIC(s) and IOAPIC(s). The main concern for the actual handlers is telling the device (not the PIC) that you have dealt with the interrupt as this is done in a different way for every device.
mystran

Re:Curiosity and the PIC

Post by mystran »

Adding to those above, you might want to tell PIC whether you want edge or level triggered interrupts. As it is, there are systems where getting each PCI device it's own interrupt vector is impossible, yet APIC, if any, is buggy enough that you can't really use it.
elderK

Re:Curiosity and the PIC

Post by elderK »

Onto the next thing...
;) Anyone know any good websites explaining the FAT12 Filesystem?
bluecode

Re:Curiosity and the PIC

Post by bluecode »

zeii wrote:Anyone know any good websites explaining the FAT12 Filesystem?
google?
The official specs by Microsoft
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Curiosity and the PIC

Post by Candy »

Our very own OS FAQ, linked on its front page with the keyword "FAT12" ?
Post Reply