Subject: Re: pci/pcmcia bridges?
To: None <>
From: Hayakawa Koichi <>
List: current-users
Date: 04/03/2003 09:02:45
From: David Young <>
Subject: Re: pci/pcmcia bridges?
Date: Sat, 29 Mar 2003 17:55:09 -0600
Message-ID: <>

 > I am also oftentimes frustrated in my attempts to use a PCI/PCMCIA bridge
 > with a desktop machine in NetBSD. Either NetBSD will hang on on insertion
 > of a PC Card, or it will tell me that the bridge is not configured.
 > My naive understanding of the problem is that while NetBSD relies on the
 > BIOS to write each PCI device's registers with IRQ, mem- and I/O-address
 > assignments, most desktop BIOS's do not make correct/complete assignments
 > for Cardbus/PCMCIA bridges.

No.  We don't use BIOS information to determine I/O space
for CardBus/PCMCIA cards.  Memory space and PCI interrupt
for the bridge are assigned by default or NetBSD's pci fixup

 > This brings me to the following naive questions:
 >   * I have an inkling that on the same hardware, Linux & Windows do not
 >     have nearly as many problems

Maybe yes, especially for Windows.  Linux may have the same
problem (I'm not sure), because it uses XFree86.

The main reason why NetBSD suffers from it is NetBSD does
not have perfect control of I/O space usage.  NetBSD takes
account of I/O space occupied by devices recognised by
NetBSD's device drivers only.  Sometimes some unseed devices
occupy I/O space, but NetBSD does not know that space.  So
CardBus stack allocates conflicted I/O space, because it
can't know it is conflicted.

# That's why I don't use I/O space such as 0x3xx, which may
# occupied by legacy devices (i386 case).

XFree86 may cause same problem.  I'm not sure about newer
XFree86, older XFree86 will use I/O space without notice to
the kernel.  So we can't avoid I/O space occupied by XFree86
device driver.

I'm thinking MI way, but I have no time to implement it now.

 >     * are there problems as serious or worse in Linux & Windows, and
 >       if not
 >     * what does NetBSD do differently with bridges than Linux &
 >       Windows do? Why doesn't NetBSD do the same?
 >   * can NetBSD dispense with the PC BIOS and make its own IRQ/address
 >     assignments, or will that
 >     * make the BIOS terribly confused
 >     * fail because NetBSD is not privy to essential information which
 >       the BIOS has?

Uum.  I don't want to rely on PCI BIOS, because only i386
has it.

 >   * can there be no *algorithm* for patching up the PCMCIA/Cardbus
 >     bridges whose PCI configuration the BIOS botched?

We should have.  But...