Subject: fixing IRQs
To: None <port-i386@NetBSD.org>
From: Rui Paulo <rpaulo@fnop.net>
List: port-i386
Date: 12/25/2005 19:11:24
--mvpLiMfbWzRoNl4x
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,
I have some problems using PCI_INTR_FIXUP:

PCI BIOS rev. 2.1 found at 0xfd7be
pcibios: config mechanism [1][x], special cycles [x][x], last bus 7
PCI IRQ Routing Table rev. 1.0 found at 0xfdd70, size 0 bytes (-2 entries)
pcibios_pir_init: bad IRQ table size
PCI BIOS has 12 Interrupt Routing table entries
PIR Entry 0:
        Bus: 0  Device: 28
                INTA: link 0x02 bitmap 0x0400
                INTB: link 0x01 bitmap 0x0400
                INTC: link 0x03 bitmap 0x0840
                INTD: link 0x04 bitmap 0x0840
PIR Entry 1:
        Bus: 2  Device: 0
                INTA: link 0x00 bitmap 0xdef8
                INTB: link 0x00 bitmap 0xdef8
                INTC: link 0x00 bitmap 0xdef8
                INTD: link 0x00 bitmap 0xdef8
PIR Entry 2:
        Bus: 0  Device: 29
                INTA: link 0x08 bitmap 0x0840
                INTB: link 0x04 bitmap 0x0840
                INTC: link 0x03 bitmap 0x0840
                INTD: link 0x01 bitmap 0x0400
PIR Entry 3:
        Bus: 0  Device: 30
                INTA: link 0x02 bitmap 0x0400
                INTB: link 0x05 bitmap 0x0840
                INTC: link 0x01 bitmap 0x0400
                INTD: link 0x05 bitmap 0x0840
PIR Entry 4:
        Bus: 0  Device: 31
                INTA: link 0x03 bitmap 0x0840
                INTB: link 0x04 bitmap 0x0840
                INTC: link 0x00 bitmap 0xdef8
                INTD: link 0x01 bitmap 0x0400
PIR Entry 5:
        Bus: 1  Device: 0
                INTA: link 0x01 bitmap 0x0400
                INTB: link 0x02 bitmap 0x0400
                INTC: link 0x03 bitmap 0x0840
                INTD: link 0x04 bitmap 0x0840
PIR Entry 6:
        Bus: 0  Device: 0
                INTA: link 0x01 bitmap 0x0400
                INTB: link 0x00 bitmap 0xdef8
                INTC: link 0x00 bitmap 0xdef8
                INTD: link 0x00 bitmap 0xdef8
PIR Entry 7:
        Bus: 0  Device: 2
                INTA: link 0x01 bitmap 0x0400
                INTB: link 0x00 bitmap 0xdef8
                INTC: link 0x00 bitmap 0xdef8
                INTD: link 0x00 bitmap 0xdef8
PIR Entry 8:
        Bus: 0  Device: 1
                INTA: link 0x01 bitmap 0x0400
                INTB: link 0x00 bitmap 0xdef8
                INTC: link 0x00 bitmap 0xdef8
                INTD: link 0x00 bitmap 0xdef8
PIR Entry 9:
        Bus: 1  Device: 8
                INTA: link 0x01 bitmap 0x0400
                INTB: link 0x00 bitmap 0xdef8
                INTC: link 0x00 bitmap 0xdef8
                INTD: link 0x00 bitmap 0xdef8
PIR Entry 10:
        Bus: 1  Device: 1
                INTA: link 0x03 bitmap 0x0840
                INTB: link 0x00 bitmap 0xdef8
                INTC: link 0x04 bitmap 0x0840
                INTD: link 0x00 bitmap 0xdef8
PIR Entry 11:
        Bus: 1  Device: 3
                INTA: link 0x02 bitmap 0x0400
                INTB: link 0x04 bitmap 0x0840
                INTC: link 0x00 bitmap 0xdef8
                INTD: link 0x00 bitmap 0xdef8
pci_intr_fixup: no compatible PCI ICU found
pciintr_guess_irq (stage 1): guessing PIRQ 0x01 to be IRQ 10
pciintr_guess_irq (stage 1): guessing PIRQ 0x02 to be IRQ 10
------------------------------------------
  device vendor product pin PIRQ IRQ stage
------------------------------------------
000:01:0 0x8086 0x2591   A  0x01  10  1    already assigned
000:28:0 0x8086 0x2660   A  0x02  10  1    already assigned
000:28:1 0x8086 0x2662   B  0x01  10  1    already assigned
000:28:2 0x8086 0x2664   C  0x03   -  0  =20
000:29:0 0x8086 0x2658   A  0x08   -  0  =20
000:29:1 0x8086 0x2659   B  0x04   -  0  =20
000:29:2 0x8086 0x265a   C  0x03   -  0  =20
000:29:3 0x8086 0x265b   D  0x01  10  1    already assigned
000:29:7 0x8086 0x265c   A  0x08   -  0  =20
000:30:2 0x8086 0x266e   A  0x02  10  1    already assigned
000:30:3 0x8086 0x266d   B  0x05   -  0  =20
000:31:1 0x8086 0x266f   A  0x03   -  0    WARNING: missing IRQ
000:31:3 0x8086 0x266a   B  0x04   -  0  =20
001:00:0 0x1002 0x3150   A  0x01  10  1    already assigned
------------------------------------------
mainbus0 (root)
pci_addr_fixup: 000:31:1 0x8086 0x266f new address 0x00005800
pci_addr_fixup: 000:31:1 0x8086 0x266f new address 0x00005808
pci_addr_fixup: 000:31:1 0x8086 0x266f new address 0x00005810
pci_addr_fixup: 000:31:1 0x8086 0x266f new address 0x0000580c

I have no idea how this code works, so I need some help here.

1) I guess my ACPI implementation is badly broken. What can I do to
   fix it?
2) If it detects an invalid size, why does it magically detect 12 PIRs
   ?
3) What does the missing IRQ mean ?
4) What's a PCI ICU and what can I do to detect mine ?

Thanks in advance,
		-- Rui Paulo

--mvpLiMfbWzRoNl4x
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iD8DBQFDru7cZPqyxs9FH4QRAtyoAJ9HwfNUgVeCXzQqIfRyfdwZOXCoswCeJX/d
Ezbo9h2FCaWloo/ms9Olw3Y=
=UeyW
-----END PGP SIGNATURE-----

--mvpLiMfbWzRoNl4x--