Subject: Re: CardBus on Libretto L2
To: Hayakawa Koichi <haya@ilink.sony.co.jp>
From: Curt Sampson <cjs@cynic.net>
List: tech-kern
Date: 08/27/2001 20:32:22
On Mon, 27 Aug 2001, Hayakawa Koichi wrote:

>  > Unfortunately, maybe BIOS does not set PCI interrupt router
>  > to route CardBus bridge's INTA line.  We must write setup
>  > routine for ALi PCI-ISA bridges to route PCI intr.
>
> I added code for ALi's bridge to setup PCI intrrupt router.
> I hope it will help your machine.

Sad to say, it doesn't seem to. Without my "force it to irq 6 hacks,"
the cbb won't attach due to an unconfigured interrupt (see the second
dmesg below); with my hacks, again, I still never get any interrupts on
IRQ 6, even after inserting a card (see first dmesg below).

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 3 5778 0123   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC


NetBSD 1.5X (ANGELIC-$Revision$) #20: Mon Aug 27 20:10:30 JST 2001
    cjs@angelic.cynic.net:/u/netbsd/sys.cardbus/arch/i386/compile/ANGELIC
cpu0: GenuineTMx86  (586-class), 597.78 MHz
cpu0: features 80893f<FPU,VME,DE,PSE,TSC,MSR,CX8,SEP>
cpu0: features 80893f<CMOV,MMX>
total memory = 238 MB
avail memory = 205 MB
using 6110 buffers containing 24440 KB of memory
BIOS32 rev. 0 found at 0xfb5bb
PCI BIOS rev. 2.1 found at 0xfcd73
pcibios: config mechanism [1][x], special cycles [x][x], last bus 1
pcibios_init: pcibios present
No PCI IRQ Routing Table found.
pcibios_pir_init: $PIR malloc'd at c094be00
No PCI IRQ Routing information available.
pcibios_init: pcibios_pir_init complete
pcibios_init: inter fixup complete
PCI fixup examining 1279:395
PCI fixup examining 1279:396
PCI fixup examining 1279:397
PCI fixup examining 5333:8c12
PCI fixup examining 10b9:5451
PCI fixup examining 10b9:1533
PCI fixup examining 8086:1229
PCI fixup examining 10b9:5229
PCI fixup examining 10b9:7101
PCI fixup examining 1179:617
PCI bridge 0: primary 0, secondary 1, subordinate 1
PCI fixup examining 10b9:5237
PCI bus #1 is the last bus
pcibios_init: bus fixup complete
[System BIOS Setting]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x1279 0x0395
	10h mem  0xefd00000 0x00100000
		[OK]
000:00:1 0x1279 0x0396
		[OK]
000:00:2 0x1279 0x0397
		[OK]
000:04:0 0x5333 0x8c12
	10h mem  0xe0000000 0x08000000
		[OK]
000:06:0 0x10b9 0x5451
	10h port 0x00000000 0x00000100
	14h mem  0x00000000 0x00001000
		[NG]
000:07:0 0x10b9 0x1533
		[OK]
000:14:0 0x8086 0x1229
	10h mem  0xdffff000 0x00001000
	14h port 0x0000edc0 0x00000040
	18h mem  0xdfe00000 0x00100000
		[OK]
000:16:0 0x10b9 0x5229
	20h port 0x0000edb0 0x00000010
		[OK]
000:17:0 0x10b9 0x7101
		[OK]
000:18:0 0x1179 0x0617
	10h mem  0x00000000 0x00001000
		[NG]
000:20:0 0x10b9 0x5237
	10h mem  0xdfdfe000 0x00001000
		[OK]
--------------------------[  2 devices bogus]
 Physical memory end: 0x0ef4c000
 PCI memory mapped I/O space start: 0x0f000000
[PCIBIOS fixup stage]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x1279 0x0395
	10h mem  0xefd00000 0x00100000
		[OK]
000:00:1 0x1279 0x0396
		[OK]
000:00:2 0x1279 0x0397
		[OK]
000:04:0 0x5333 0x8c12
	10h mem  0xe0000000 0x08000000
		[OK]
000:06:0 0x10b9 0x5451
	10h port 0x00005800 0x00000100
	14h mem  0x0f000000 0x00001000
		[OK]
000:07:0 0x10b9 0x1533
		[OK]
000:14:0 0x8086 0x1229
	10h mem  0xdffff000 0x00001000
	14h port 0x0000edc0 0x00000040
	18h mem  0xdfe00000 0x00100000
		[OK]
000:16:0 0x10b9 0x5229
	20h port 0x0000edb0 0x00000010
		[OK]
000:17:0 0x10b9 0x7101
		[OK]
000:18:0 0x1179 0x0617
	10h mem  0x0f001000 0x00001000
		[OK]
000:20:0 0x10b9 0x5237
	10h mem  0xdfdfe000 0x00001000
		[OK]
--------------------------[  0 devices bogus]
pcibios_init complete
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 0 function 0
pchb0: Transmeta Corp LongRun Northbridge (rev. 0x01)
Transmeta Corp SDRAM Controller (RAM memory) at pci0 dev 0 function 1 not configured
Transmeta Corp BIOS Scratchpad (RAM memory) at pci0 dev 0 function 2 not configured
vga1 at pci0 dev 4 function 0: S3 Savage/IX+MV (rev. 0x13)
wsdisplay0 at vga1: console (80x25, vt100 emulation)
Acer Labs M5451 AC-Link Controller Audio Device (audio multimedia, revision 0x01) at pci0 dev 6 function 0 not configured
pcib0 at pci0 dev 7 function 0
pcib0: Acer Labs M1543 PCI-ISA Bridge (rev. 0x00)
fxp0 at pci0 dev 14 function 0: i82559 Ethernet, rev 8
fxp0: interrupting at irq 10
fxp0: detected 64 word EEPROM
fxp0: Ethernet address 00:00:39:9d:43:99
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pciide0 at pci0 dev 16 function 0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc3)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <TOSHIBA MK1016GAP>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 9590 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 19640880 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
pciide0: secondary channel ignored (disabled)
Acer Labs M7101 Power Management Controller (miscellaneous bridge) at pci0 dev 17 function 0 not configured
cbb0 at pci0 dev 18 function 0: Toshiba ToPIC100 CardBus-PCI Bridge (rev. 0x32) (chipflags 2)
cbb0: socket base address 0xf001000
cbb0: Forcing interrupt to 6.
cbb0: intrpin A, intrtag 6
ohci0 at pci0 dev 20 function 0: Acer Labs M5237 USB Host Controller (rev. 0x03)
ohci0: interrupting at irq 7
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Acer Labs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
isa0 at pcib0
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
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
lptprobe: mask ff data 55 failed
lptprobe: mask ff data 55 failed
lptprobe: mask ff data 55 failed
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
npx0 at isa0 port 0xf0-0xff: using exception 16
CardBus latency timer 0x20 (10100)
PCI latency timer 0x40 (824000)
cbb0: topic slot ctrl reg 0x860016c0 -> 0x860016e0
pccbb_power: CARDBUS_VCC_0V and CARDBUS_VPP_0V [44]
cbb0: bad Vcc request. sock_ctrl 0xffffff88, sock_status 0xffffffff
pccbb_power: CARDBUS_VCC_0V and CARDBUS_VPP_0V [44]
cbb0: interrupting at irq 6
cardslot0 at cbb0 slot 0 flags 1
cardslot0 attaching CardBus bus...
cardbus0 at cardslot0: bus 1 device 0 cacheline 0x0, lattimer 0x0
cardslotattach: found cardbus on cardslot0
cardbusmatch: busname differs pcmcia <=> cardbus
pcmcia0 at cardslot0
cardslotattach: found 16-bit pcmcia bus
pccbb_pcmcia_card_detect
pccbbattach: found cardslot
biomask ebfd netmask effd ttymask ffff
boot device: wd0
root on wd0a dumps on wd0b
mountroot: trying coda...
mountroot: trying msdos...
mountroot: trying cd9660...
mountroot: trying ntfs...
mountroot: trying nfs...
mountroot: trying lfs...
mountroot: trying ext2fs...
mountroot: trying ffs...
root file system type: ffs
init: copying out path `/sbin/init' 11
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)
wsdisplay0: screen 5 added (80x25, vt100 emulation)
wsdisplay0: screen 6 added (80x25, vt100 emulation)
wsdisplay0: screen 7 added (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
syncing disks... done
unmounting /kern (kernfs)...
unmounting /proc (procfs)...
unmounting /u (/dev/wd0h)...
unmounting /home (/dev/wd0g)...
unmounting /usr (/dev/wd0e)...
unmounting /var (/dev/wd0f)...
unmounting / (/dev/wd0a)...
cbb0: shutdown
pccbb_power: CARDBUS_VCC_0V and CARDBUS_VPP_0V [44]
cbb0: bad Vcc request. sock_ctrl 0xffffff88, sock_status 0xffffffff
pccbb_power: CARDBUS_VCC_0V and CARDBUS_VPP_0V [44]
rebooting...
NetBSD 1.5X (ANGELIC-$Revision$) #21: Mon Aug 27 20:23:48 JST 2001
    cjs@angelic.cynic.net:/u/netbsd/sys.cardbus/arch/i386/compile/ANGELIC
cpu0: GenuineTMx86  (586-class), 597.78 MHz
cpu0: features 80893f<FPU,VME,DE,PSE,TSC,MSR,CX8,SEP>
cpu0: features 80893f<CMOV,MMX>
total memory = 238 MB
avail memory = 205 MB
using 6110 buffers containing 24440 KB of memory
BIOS32 rev. 0 found at 0xfb5bb
PCI BIOS rev. 2.1 found at 0xfcd73
pcibios: config mechanism [1][x], special cycles [x][x], last bus 1
pcibios_init: pcibios present
No PCI IRQ Routing Table found.
pcibios_pir_init: $PIR malloc'd at c094be00
No PCI IRQ Routing information available.
pcibios_init: pcibios_pir_init complete
pcibios_init: inter fixup complete
PCI fixup examining 1279:395
PCI fixup examining 1279:396
PCI fixup examining 1279:397
PCI fixup examining 5333:8c12
PCI fixup examining 10b9:5451
PCI fixup examining 10b9:1533
PCI fixup examining 8086:1229
PCI fixup examining 10b9:5229
PCI fixup examining 10b9:7101
PCI fixup examining 1179:617
PCI bridge 0: primary 0, secondary 1, subordinate 1
PCI fixup examining 10b9:5237
PCI bus #1 is the last bus
pcibios_init: bus fixup complete
[System BIOS Setting]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x1279 0x0395
	10h mem  0xefd00000 0x00100000
		[OK]
000:00:1 0x1279 0x0396
		[OK]
000:00:2 0x1279 0x0397
		[OK]
000:04:0 0x5333 0x8c12
	10h mem  0xe0000000 0x08000000
		[OK]
000:06:0 0x10b9 0x5451
	10h port 0x00000000 0x00000100
	14h mem  0x00000000 0x00001000
		[NG]
000:07:0 0x10b9 0x1533
		[OK]
000:14:0 0x8086 0x1229
	10h mem  0xdffff000 0x00001000
	14h port 0x0000edc0 0x00000040
	18h mem  0xdfe00000 0x00100000
		[OK]
000:16:0 0x10b9 0x5229
	20h port 0x0000edb0 0x00000010
		[OK]
000:17:0 0x10b9 0x7101
		[OK]
000:18:0 0x1179 0x0617
	10h mem  0x00000000 0x00001000
		[NG]
000:20:0 0x10b9 0x5237
	10h mem  0xdfdfe000 0x00001000
		[OK]
--------------------------[  2 devices bogus]
 Physical memory end: 0x0ef4c000
 PCI memory mapped I/O space start: 0x0f000000
[PCIBIOS fixup stage]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x1279 0x0395
	10h mem  0xefd00000 0x00100000
		[OK]
000:00:1 0x1279 0x0396
		[OK]
000:00:2 0x1279 0x0397
		[OK]
000:04:0 0x5333 0x8c12
	10h mem  0xe0000000 0x08000000
		[OK]
000:06:0 0x10b9 0x5451
	10h port 0x00005800 0x00000100
	14h mem  0x0f000000 0x00001000
		[OK]
000:07:0 0x10b9 0x1533
		[OK]
000:14:0 0x8086 0x1229
	10h mem  0xdffff000 0x00001000
	14h port 0x0000edc0 0x00000040
	18h mem  0xdfe00000 0x00100000
		[OK]
000:16:0 0x10b9 0x5229
	20h port 0x0000edb0 0x00000010
		[OK]
000:17:0 0x10b9 0x7101
		[OK]
000:18:0 0x1179 0x0617
	10h mem  0x0f001000 0x00001000
		[OK]
000:20:0 0x10b9 0x5237
	10h mem  0xdfdfe000 0x00001000
		[OK]
--------------------------[  0 devices bogus]
pcibios_init complete
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 0 function 0
pchb0: Transmeta Corp LongRun Northbridge (rev. 0x01)
Transmeta Corp SDRAM Controller (RAM memory) at pci0 dev 0 function 1 not configured
Transmeta Corp BIOS Scratchpad (RAM memory) at pci0 dev 0 function 2 not configured
vga1 at pci0 dev 4 function 0: S3 Savage/IX+MV (rev. 0x13)
wsdisplay0 at vga1: console (80x25, vt100 emulation)
Acer Labs M5451 AC-Link Controller Audio Device (audio multimedia, revision 0x01) at pci0 dev 6 function 0 not configured
pcib0 at pci0 dev 7 function 0
pcib0: Acer Labs M1543 PCI-ISA Bridge (rev. 0x00)
fxp0 at pci0 dev 14 function 0: i82559 Ethernet, rev 8
fxp0: interrupting at irq 10
fxp0: detected 64 word EEPROM
fxp0: Ethernet address 00:00:39:9d:43:99
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pciide0 at pci0 dev 16 function 0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc3)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <TOSHIBA MK1016GAP>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 9590 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 19640880 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
pciide0: secondary channel ignored (disabled)
Acer Labs M7101 Power Management Controller (miscellaneous bridge) at pci0 dev 17 function 0 not configured
cbb0 at pci0 dev 18 function 0: Toshiba ToPIC100 CardBus-PCI Bridge (rev. 0x32) (chipflags 2)
cbb0: socket base address 0xf001000
cbb0: NOT USED because of unconfigured interrupt
ohci0 at pci0 dev 20 function 0: Acer Labs M5237 USB Host Controller (rev. 0x03)
ohci0: interrupting at irq 7
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Acer Labs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
isa0 at pcib0
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
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
lptprobe: mask ff data 55 failed
lptprobe: mask ff data 55 failed
lptprobe: mask ff data 55 failed
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
npx0 at isa0 port 0xf0-0xff: using exception 16
biomask ebfd netmask effd ttymask ffff
boot device: wd0
root on wd0a dumps on wd0b
mountroot: trying coda...
mountroot: trying msdos...
mountroot: trying cd9660...
mountroot: trying ntfs...
mountroot: trying nfs...
mountroot: trying lfs...
mountroot: trying ext2fs...
mountroot: trying ffs...
root file system type: ffs
init: copying out path `/sbin/init' 11
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)
wsdisplay0: screen 5 added (80x25, vt100 emulation)
wsdisplay0: screen 6 added (80x25, vt100 emulation)
wsdisplay0: screen 7 added (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0