Page 1 of 1

Please Help Me....

Posted: Fri Dec 09, 2005 5:25 am
by muthusrinivasan
Hello all ,

I'm new to interrupt programming ....

can any one list the interrupt no that control the hardwares ??

Thanx in Advance !

Re:Please Help Me....

Posted: Fri Dec 09, 2005 6:41 am
by Pype.Clicker
erhm ? "list the interrupt numbers that control the hardware" ? that sounds weirds ...

- You have Interrupt ReQuests that are triggered _by_ the hardware to notify the CPU of events (such as the arrival of a packet on a network card or the pressing of a key). Any tutorial about the Programmable Interrupt Controller (chip 8259A) or IRQs should list those.

- You have BIOS interrupts that can be used to access the Basic Input/Output System's services (see Ralf Brown Interrupt List) that will in turn control the hardware (such as, waiting for a keystroke and return it to you, switch video mode (int 10h) or read sectors out of floppy disks (int 13h)

But i fail to see a matching between what you request and what exists.

Re:Please Help Me....

Posted: Sat Dec 10, 2005 11:53 am
by OZ
  • IRQ 0 (timer)        
  • IRQ 1 (keyboard)    
  • IRQ 2 (cascade; reserved for 2nd 8259)    
  • IRQ 3 (COM2,4)    
  • IRQ 4 (COM1,3)   
  • IRQ 5 (LPT)
  • IRQ 6 (floppy)
  • IRQ 7 (free)       
  • IRQ 8 (realtime clock)
  • IRQ 9 (free)
  • IRQ 10 (free)
  • IRQ 11 (free)
  • IRQ 12 (PS/2 mouse)
  • IRQ 13 (386 coprocessor)
  • IRQ 14 (primary IDE drives)
  • IRQ 15 (secondary IDE drives)
hopefully correct - if so - hope uit helps
ps:
But Hardware Interupts are mapped a bit strange by default -
on entering pmode int 0 -7 are mapped to IDT entries 8-15, but
the first 32 entries of IDT are reserved for exception handlers therefore yo've got to remap it.
read Bran's kernel tutorial on that, it's really good
http://www.osdever.net/bkerndev/Docs/intro.htm

Re:Please Help Me....

Posted: Sun Dec 11, 2005 12:30 am
by pradeep
My AC97 soundcard fires IRQ3. So PCI devices are mapped to any IRQ's by default. if IRQ3 fires not necessarily it is a COM2,4 , it may be an AC97 soundcard. It is TRUE for all IRQ's.

AC97 is hardwired to PIRQB#. What is this PIRQB#? What is it's importance?

Re:Please Help Me....

Posted: Sun Dec 11, 2005 3:43 am
by Brendan
Hi,
pradeep wrote:AC97 is hardwired to PIRQB#. What is this PIRQB#? What is it's importance?
Roughly, each PCI "slot" can use up to 4 IRQ lines, called PIRQA#, PIRQB#, PIRQC# and PIRQD#. These lines are rotated along the bus, so for the first slot the card's PIRQA# might be connected to the buses PIRQA#, but the second card's PIRQA# would be connected to the buses PIRQB#, and the third card's PIRQA# would be connected to the buses PIRQC#.

For example:

Slot 1 = cardA->busA, cardB->busB, cardC->busC, cardD->busD
Slot 2 = cardA->busB, cardB->busC, cardC->busD, cardD->busA
Slot 3 = cardA->busC, cardB->busD, cardC->busA, cardD->busB
Slot 4 = cardA->busD, cardB->busA, cardC->busB, cardD->busC
Slot 5 = cardA->busA, cardB->busB, cardC->busC, cardD->busD

Because most cards use PIRQA# (and maybe PIRQB#), this rotation helps to spread the PCI IRQs across all IRQ lines on the PCI bus.

Then, the IRQ lines on the bus are connected to a PCI IRQ router. This thing is part of the chipset and is programmable. It determines which PIC (and/or I/O APIC) input pins the PCI IRQs are connected to.

The PCI IRQ router is configured by the BIOS during boot, and can usually be changed using the BIOS's "setup screen". It can also be changed by the OS, either directly (if you know what chipset is present and which I/O ports to use, etc), via. the PCI BIOS Specification functions, or using ACPI.


Cheers,

Brendan