qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Seabios: PCI interrupt routing question
@ 2009-12-13 15:12 Kevin O'Connor
  2009-12-14  9:23 ` [Qemu-devel] " Magnus Christensson
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin O'Connor @ 2009-12-13 15:12 UTC (permalink / raw)
  To: mch; +Cc: qemu-devel, Gleb Natapov

----- Forwarded message from Gleb Natapov <gleb@redhat.com> -----

From: Gleb Natapov <gleb@redhat.com>
To: Kevin O'Connor <kevin@koconnor.net>
Date: Sun, 13 Dec 2009 17:07:48 +0200
Subject: Re: [mch@virtutech.com: [coreboot] Seabios: PCI interrupt routing
	question]

On Thu, Dec 10, 2009 at 08:55:11AM -0500, Kevin O'Connor wrote:
> FYI.
> 
> ----- Forwarded message from Magnus Christensson <mch@virtutech.com> -----
> 
> From: Magnus Christensson <mch@virtutech.com>
> To: coreboot@coreboot.org
> Date: Fri, 27 Nov 2009 09:13:02 +0100
> Subject: [coreboot] Seabios: PCI interrupt routing question
> 
> Hi,
> 
> I have a question about the PCI INTx pin interrupt routing in Seabios.
> 
> Specifically, what does the pci_slot_get_pirq function do? It looks like  
> it assigns different interrupt numbers to devices depending on their  
> device number.
> 
This function implement the same logic as pci_swizzle_interrupt_pin() in
Linux kernel. This logic defines how PCI bridge connects INTx of each
devices behind it to system board interrupt line and it is part of PCI
spec (page 30 of PCI3.0 spec). Note that the function return pin, not
interrupt line. To get interrupt line we look into pci_irqs[] array.

> But the interrupt routing in the southbridge maps a given INTx to the same 
> interrupt number regardless of the device number (that mapping is  
> initialized by the code with the "activate irq remapping in PIIX" comment).
> 
> To me, this looks like the INTERRUPT_LINE would be set to a value that  
> does not match the actual interrupt routing (if (dev & 3) != 0).
> 
The code is correct if QEMU does interrupt swizzling on PIIX3 chipset
level. The code in incorrect if QEMU doesn't. Swizzling like this is
done by PCI-to-PCI bridges according to PCI spec, root bridge doesn't do
it AFAIK, so code looks suspicious, but not because of the reason stated
above.

--
			Gleb.

----- End forwarded message -----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-14  9:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-13 15:12 [Qemu-devel] Seabios: PCI interrupt routing question Kevin O'Connor
2009-12-14  9:23 ` [Qemu-devel] " Magnus Christensson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).