Memory resource problems with CardBus

Pavel Roskin proski at gnu.org
Sat May 15 14:29:03 EDT 2004


Hi, Russell!

On Sat, 15 May 2004, Russell King wrote:

> On Sat, May 15, 2004 at 05:23:09PM -0400, Pavel Roskin wrote:
> > ef00c000-ef00cfff : 0000:00:0b.0
> >   ef00c000-ef00cfff : yenta_socket
> > ef00d000-ef00efff : PCI CardBus #0a
> > ef00f000-ef010fff : PCI CardBus #0a
> >
> > I don't see how an 8k (0x2000) size-aligned window can be allocated in
> > this configuration.
>
> You can, however, allocate two 4K resources successfully.  However, one
> wonders why the bus is being allocated only 8K windows in the first place.

Indeed.  If I reserve the region that the card uses by default
(reserve=0xef00d000,0x10000), the resources are moved elsewhere:

40000000-403fffff : PCI CardBus #0a
40400000-407fffff : PCI CardBus #0a
  40400000-40401fff : 0000:0a:00.0
    40400000-40401fff : prism54

Every window is 4 megabytes long!  The prism54 card works now!  The
details are here: http://www.red-bean.com/~proski/ak77/with-reserve/

> >  It's interesting that lspci shows 4k long windows:
> >
> >         Memory window 0: ef00d000-ef00e000 (prefetchable)
> >         Memory window 1: ef00f000-ef010000
>
> That's a lspci bug - it's reporting exactly what is in the registers
> rather than converting it into "reality".  In reality, the windows
> for the above are:
>
>         Memory window 0: ef00d000-ef00efff (prefetchable)
>         Memory window 1: ef00f000-ef010fff
>
> since the lower 12 bits of the base _and_ limit registers are always
> zero.

I'll report it after checking the latest version of lspci.

> Maybe we should get the kernel to automatically reallocate the windows
> if they're smaller than a parameterised limit defaulting to, say, 1MB ?

Sounds reasonable if the window sizes are set by BIOS.  As I said, I have
no idea where those sizes come from.

-- 
Regards,
Pavel Roskin



More information about the linux-pcmcia mailing list