Subject: pci-cardbus bridge woes
To: None <tech-kern@netbsd.org>
From: Jolan Luff <jolan@cryptonomicon.org>
List: tech-kern
Date: 08/19/2002 05:04:55
i have a pci cardbus adapter that i use in conjunction with my
orinoco wavelan card.  unfortunately, my BIOS doesn't assign the
card an interrupt correctly.  freebsd has some clever hacks to
overcome this and the card does indeed get an interrupt assigned to
it.  i made a kernel with all of the pcibios code and it didn't help
any.  i also tried another kernel with PCI_INTR_FIXUP_FORCE enabled,
but that didn't produce any results.  so i have a couple of
questions here.

1) some of the pcibios interrupt message don't make into the dmesg.
anyway to fix this?

2) can someone point me to a good source of information on how
bioses map interrupts?  i'd really like to get a solid understanding
of what is going on before i start trying to modify pcibios to use
the hacks from freebsd.

3) is there anyone who is good at this stuff that has any
suggestions?

anyway. the dmesg output is below.

thanks,

- jolan

p.s. the card doesn't get an interrupt mapped under openbsd either.


 0xdcf8
                INTC: link 0x03 bitmap 0xdcf8
                INTD: link 0x05 bitmap 0xdcf8
PIR Entry 3:
        Bus: 0  Device: 6
                INTA: link 0x02 bitmap 0xdcf8
                INTB: link 0x03 bitmap 0xdcf8
                INTC: link 0x05 bitmap 0xdcf8
                INTD: link 0x01 bitmap 0xdcf8
PIR Entry 4:
        Bus: 0  Device: 7
                INTA: link 0x03 bitmap 0xdcf8
                INTB: link 0x05 bitmap 0xdcf8
                INTC: link 0x01 bitmap 0xdcf8
                INTD: link 0x02 bitmap 0xdcf8
PIR Entry 5:
        Bus: 0  Device: 8
                INTA: link 0x05 bitmap 0xdcf8
                INTB: link 0x01 bitmap 0xdcf8
                INTC: link 0x02 bitmap 0xdcf8
                INTD: link 0x03 bitmap 0xdcf8
PIR Entry 6:
        Bus: 0  Device: 9
                INTA: link 0x01 bitmap 0xdcf8
                INTB: link 0x02 bitmap 0xdcf8
                INTC: link 0x03 bitmap 0xdcf8
                INTD: link 0x05 bitmap 0xdcf8
PIR Entry 7:
        Bus: 0  Device: 11
                INTA: link 0x01 bitmap 0xdcf8
                INTB: link 0x02 bitmap 0xdcf8
                INTC: link 0x03 bitmap 0xdcf8
                INTD: link 0x00 bitmap 0x0000
PIR Entry 8:
        Bus: 0  Device: 12
                INTA: link 0x02 bitmap 0xdcf8
                INTB: link 0x00 bitmap 0x0000
                INTC: link 0x00 bitmap 0x0000
                INTD: link 0x00 bitmap 0x0000
PIR Entry 9:
        Bus: 0  Device: 18
                INTA: link 0x01 bitmap 0xdcf8
                INTB: link 0x00 bitmap 0x0000
                INTC: link 0x00 bitmap 0x0000
                INTD: link 0x00 bitmap 0x0000
pci_intr_fixup: no compatible PCI ICU found: ICU vendor 0x1106
        product 0x3074
pciintr_guess_irq (stage 1): guessing PIRQ 0xfe to be IRQ 14
pciintr_guess_irq (stage 1): guessing PIRQ 0xff to be IRQ 15
------------------------------------------
  device vendor product pin PIRQ IRQ stage
------------------------------------------
pciintr_header_fixup: no entry for link 0x69 (0:1:0:@)
000:05:0 0x104c 0xac50   A  0x01   -  0    WARNING: missing IRQ
000:06:0 0x8086 0x1229   A  0x02   -  0   
000:17:2 0x1106 0x3038   D  0x05   -  0   
000:17:3 0x1106 0x3038   D  0x05   -  0   
000:17:5 0x1106 0x3059   C  0x03   -  0   
------------------------------------------
PCI fixup examining 1106:3099
PCI fixup examining 1106:b099
PCI fixup examining 10de:110
PCI bridge 0: primary 0, secondary 1, subordinate 1
PCI fixup examining 104c:ac50
PCI bridge 1: primary 0, secondary 2, subordinate 2
PCI fixup examining 8086:1229
PCI fixup examining 1106:3074
PCI fixup examining 1106:571
PCI fixup examining 1106:3038
PCI fixup examining 1106:3038
PCI fixup examining 1106:3059
PCI bus #2 is the last bus
[System BIOS Setting]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x1106 0x3099 
        10h mem  0xe0000000 0x04000000
                [OK]
000:01:0 0x1106 0xb099 
                [OK]
000:05:0 0x104c 0xac50 
        10h mem  0x00000000 0x00001000
                [NG]
000:06:0 0x8086 0x1229 
        10h mem  0xdffff000 0x00001000
        14h port 0x0000ec00 0x00000040
        18h mem  0xdffc0000 0x00020000
                [OK]
000:17:0 0x1106 0x3074 
                [OK]
000:17:1 0x1106 0x0571 
        20h port 0x0000fc00 0x00000010
                [OK]
000:17:2 0x1106 0x3038 
        20h port 0x0000e000 0x00000020
                [OK]
000:17:3 0x1106 0x3038 
        20h port 0x0000e400 0x00000020
                [OK]
000:17:5 0x1106 0x3059 
        10h port 0x0000e800 0x00000100
                [OK]
001:00:0 0x10de 0x0110 
        10h mem  0xde000000 0x01000000
        14h mem  0xd0000000 0x08000000
                [OK]
--------------------------[  1 devices bogus]
 Physical memory end: 0x1ffee000
 PCI memory mapped I/O space start: 0x20000000
[PCIBIOS fixup stage]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x1106 0x3099 
        10h mem  0xe0000000 0x04000000
                [OK]
000:01:0 0x1106 0xb099 
                [OK]
000:05:0 0x104c 0xac50 
        10h mem  0x20000000 0x00001000
                [OK]
000:06:0 0x8086 0x1229 
        10h mem  0xdffff000 0x00001000
        14h port 0x0000ec00 0x00000040
        18h mem  0xdffc0000 0x00020000
                [OK]
000:17:0 0x1106 0x3074 
                [OK]
000:17:1 0x1106 0x0571 
        20h port 0x0000fc00 0x00000010
                [OK]
000:17:2 0x1106 0x3038 
        20h port 0x0000e000 0x00000020
                [OK]
000:17:3 0x1106 0x3038 
        20h port 0x0000e400 0x00000020
                [OK]
000:17:5 0x1106 0x3059
        10h port 0x0000e800 0x00000100
                [OK]
001:00:0 0x10de 0x0110 
        10h mem  0xde000000 0x01000000
        14h mem  0xd0000000 0x08000000
                [OK]
--------------------------[  0 devices bogus]
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: VIA Technologies VT8366 (Apollo KT266) CPU-PCI Bridge (rev.
0x00)
agp0 at pchb0: aperture at 0xe0000000, size 0x10000000
ppb0 at pci0 dev 1 function 0: VIA Technologies VT8366 CPU-AGP
Bridge (rev. 0x00
)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga1 at pci1 dev 0 function 0: Nvidia Corporation GeForce2 MX [NV11]
(rev. 0xb2)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
Texas Instruments PCI1410 PCI-CardBus Bridge (CardBus bridge,
revision 0x01) at 
pci0 dev 5 function 0 not configured
fxp0 at pci0 dev 6 function 0: i82550 Ethernet, rev 12
fxp0: interrupting at irq 10
fxp0: Ethernet address 00:02:b3:2b:12:7c
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib0 at pci0 dev 17 function 0
pcib0: VIA Technologies VT8233 PCI-ISA Bridge (rev. 0x00)
pciide0 at pci0 dev 17 function 1: VIA Technologies VT8233 ATA100
controller
pciide0: bus-master DMA support present
pciide0: primary channel configured to compatibility mode
wd0 at pciide0 channel 0 drive 0: <Maxtor 5T030H3>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 29311 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 60030432
sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5
(Ultra/100)
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100)
(using DMA data
 transfers)
pciide0: secondary channel configured to compatibility mode
atapibus0 at pciide0 channel 1: 2 targets
cd0 at atapibus0 drive 0: <HITACHI DVD-ROM GD-5000, , 0213> type 5
cdrom removab
le
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2
pciide0: secondary channel interrupting at irq 15
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2 (using DMA data
transfers)
uhci0 at pci0 dev 17 function 2: VIA Technologies VT83C572 USB
Controller (rev. 
0x1b)
uhci0: interrupting at irq 5
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: VIA Technologie UHCI root hub, class 9/0, rev 1.00/1.00, addr
1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 17 function 3: VIA Technologies VT83C572 USB
Controller (rev. 
0x1b)
uhci1: interrupting at irq 5
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: VIA Technologie UHCI root hub, class 9/0, rev 1.00/1.00, addr
1
uhub1: 2 ports with 2 removable, self powered
auvia0 at pci0 dev 17 function 5: VIA VT8233 AC97 Audio
auvia0: interrupting at irq 5
auvia0: ALG16 codec; headphone, 18 bit DAC, 18 bit ADC, Realtek 3D
audio0 at auvia0: full duplex, mmap, independent
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
lpt0 at isa0 port 0x378-0x37b irq 7
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: no ISA Plug 'n Play devices found
biomask eb65 netmask ef65 ttymask ffe7
Kernelized RAIDframe activated
uhub0: port error, restarting port 1
uhub1: port error, restarting port 1
uhub1: port error, giving up port 1
uhub1: port error, restarting port 2
uhub1: port error, giving up port 2
ugen0 at uhub0 port 2
ugen0: Logitech Camera, rev 1.00/1.00, addr 2
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)