Re: Interrupts & IDT on i386

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas,

        Thanks for the reply, I am giving my understanding below. if
it is not correct, please correct me.

        The Processor gets interrupts through the PIC 8259A. Hence
during bootup we reprogram the 8259A to remap the IRQs from 0-31 range
to a more reasonable range.

For Example if we have an interrupt for an NIC, it will be shown as,
lets say, 17 in the PCI config space. But the 8259A (when we reprogram
it manually in the kernel) will remap it to some value like 49 or so.
So while registering the IRQ we use the same number 17 only to
register it. which is why ifconfig & /proc/interrupts show the number
- 17. The actual interrupt handler descriptor is placed at Index of 49
in the IDT.

       Please feel free to point out any gaps in my understanding.

Thanks & Regards,
Bhanu.

On 12/30/05, Thomas Petazzoni <thomas.petazzoni@xxxxxxxx> wrote:
> Hi,
>
> On Fri, 30 Dec 2005 00:16:18 +0530
> Bhanu Kalyan Chetlapalli <chbhanukalyan@xxxxxxxxx> wrote:
>
> >            I have a doubt with w.r.t interrupts and the IDT (Interrupt
> > Descriptor Table) on an i386. Volume 3 of Intel's IA-32 Intel(r)
> > Architecture Software Developer's Manual (System Programming Guide)
> > says that - Interrupt Vector Numbers 0-31 are Intel reserved, so do
> > not use.
>
> These are interrupt numbers, as seen from the processor.
>
> >           However, on my linux machine, when I did an "cat
> > /proc/interrupts", the Interrupt field has values like - 0 for Timer,
> > 7 for parport0, 8 for RTC etc. How can this be possible? Does the
> > IDT's number vector points to the Exception handler (as per intel's
> > doc) or to the Hardware's Interrupt handler?
>
> These are IRQ numbers (i.e hardware interrupts). They correspond to
> other interrupt from a processor point of view. The mapping of IRQ to
> processor interrupts depends on how the PIC (i8259) or APIC is
> configured.
>
> For example, IRQ 0 is the timer. If you program the PIC to set the base
> IRQ to interrupt 32, then interrupt 32 will be the timer (IRQ 0),
> interrupt 33 will be the PS/2 keyboard (IRQ 1), etc. I don't know how
> it works with APIC, but I assume it's something similar.
>
> Sincerly,
>
> Thomas
> --
> PETAZZONI Thomas - thomas.petazzoni@xxxxxxxx
> http://{thomas,sos,kos}.enix.org - Jabber: thomas.petazzoni@xxxxxxxxx
> http://{agenda,livret}dulibre.org - http://www.toulibre.org
> Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E  1624 F653 CB30 98D3 F7A7
>
>
>


--
The difference between Theory and Practice is more so in Practice than
in Theory.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux