Please Help Me....

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
muthusrinivasan

Please Help Me....

Post by muthusrinivasan »

Hello all ,

I'm new to interrupt programming ....

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

Thanx in Advance !
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Please Help Me....

Post 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.
OZ

Re:Please Help Me....

Post 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
pradeep

Re:Please Help Me....

Post 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?
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:Please Help Me....

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply