256MB Flash and 512MB SDRAM - out of vmalloc space

Chris Elston chris.elston at radstone.co.uk
Thu Mar 31 08:10:23 EST 2005


I've encountered a fairly fundamental problem with my Flash mapping driver,
and I was hoping that someone could check my proposed solution for sanity:

Problem:

I have a board with 512MB SDRAM and 256MB of Flash.  The SDRAM eats up a 
big chunk of kernel virtual addresses and therefore mapping the Flash with
ioremap fails because I've run out of contiguous virtual address space. 
I can't reserve more space with a "vmem=xxx" commandline because I'm on ppc
not x86.  I don't really want to go down that route anyway, because my 
company will eventually produce boards with 1GB SDRAM, which will only make
things worse.

Solution:

My proposed solution is to use the read/write and copy_from/copy_to hooks in
the map_info struct to provide access to the device through a window.  This
would obviously only apply to my board, but I'm thinking that as memory
sizes and Flash sizes increase this problem will become more common.  Should
I implement this in the main MTD code?  If so, has anyone any preferences
for how I do it?

Alternatively, I've completely missed the point and there's already a way to
do this, but I couldn't see anything in any of the other mapping drivers.

Thanks,

Chris.

PS: David, I've submitted a request to our IT dept for IMAP access to our
<spit> exchange server </spit> so I can use a less proprietary mail client.

Chris Elston
Principal Software Engineer, Processor Group
Radstone Digital Processing
Tove Valley Business Park
Towcester
Northants
NN12 6PF
United Kingdom 
Tel:         +44-(0)1327-359444
Fax:         +44-(0)1327-322817
Direct Line: +44-(0)1327-322876

mailto:chris.elston at radstone.com
http://www.radstone.com/ 


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________




More information about the linux-mtd mailing list