Memory resource problems with CardBus

Russell King rmk+pcmcia at arm.linux.org.uk
Sat May 15 18:40:37 EDT 2004


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.

>  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.

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

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core



More information about the linux-pcmcia mailing list