Re: Looking for guidance on large memory allocation strategy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Sterian wrote:
Hello all,

I'm developing a driver for an embedded ARM system (2.6.24 system) and
have 128M of RAM which I have been given free reign over. I want to
How do you define this free reign? Who is managing it ? kernel?
carve out an 8M block of RAM for use by this driver and mmap() it into
user space for transferring data from the driver to userspace.
I had faced a similar problem.

I have the driver working with 8k of RAM, simply using kmalloc(). My
efforts to scale up to 8M have failed.

1) kmalloc() won't work at 8M
2) get_free_pages() doesn't work -- says it can't fulfill a request of
the necessary order
3) I tried ioremap() -- didn't work

4) kmap() -- didn't work
5) vmalloc() -- didn't work

what I did was ioremap.
My case:
1. m/c had 256M
2. Passed parameter mem=128M to limit what cpu sees.
3. used ioremap on 0xc800_0000 (32bit processor) for 128M
4. used the returned virtual address.
Make sure that your PCI address space starts well above the physical address present, so should the vmalloc_start address. I think you can change #defines for these if required to suit your need.

Thanks,
Om.


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux