qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: Seabios: PCI interrupt routing question


From: Kevin O'Connor
Subject: [Qemu-devel] Re: Seabios: PCI interrupt routing question
Date: Wed, 23 Dec 2009 19:27:40 -0500
User-agent: Mutt/1.5.19 (2009-01-05)

On Mon, Dec 14, 2009 at 10:23:39AM +0100, Magnus Christensson wrote:
>> 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.
> The swizzling of INTx-pins happens in PCI-to-PCI bridges. But it looks  
> like the pci_slot_get_pirq function is applied to all devices, including  
> those on the top-level bus that are not behind any PCI-to-PCI bridge.  
> Further, the function only looks at device (slot) and doesn't care where  
> the device is in the PCI hierarchy.

The pci_slot_get_pirq() appears to be taken directly from
hw/piix_pci.c in the qemu source.  So, it represents the "motherboard"
mapping of irq lines on bus 0.

Note, the mapping isn't the same as the swizzling of PCI-to-PCI
bridges - on a pci bridge, INTA# of device 0 would map to the upstream
INTA# pin, but the pci_slot_get_pirq() would actually map it to INTD#.

The code is in line with the ACPI mapping in src/acpi-dsdt.dsl and the
PIR mapping in src/pirtable.c.

-Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]