Reserving a fixed physical address page of RAM.
Quoted 40 lines · Jesper Juhl
Quoted 4 lines · Fawad Lateef
Quoted 1 line · Dave Airlie
On 11/28/06, Jon Ringle <[email protected]> wrote:
<snip>
Quoted 1 line
Quoted 1 line
It looks promising, however, I need to reserve a
physical address
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
area that is well known (so that the code running on the other processor knows where in PCI memory to write to). It
appears that
Quoted 1 line
Quoted 1 line
Quoted 1 line
dma_alloc_coherentreturns the address that itallocated. Instead
Quoted 1 line
Quoted 1 line
Quoted 1 line
I need something where I can tell it what physical
address and range I want to use.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
I've seen other projects just boot a 128M board with mem=120M and just use the 8MB at 120 to talk to the other processor..
Yes, this can be used if required physical-memory exists in
the last
Quoted 1 line
part of RAM as if you use mem=<xxxM> then kernel will only
use memory
Quoted 1 line
less than or equal-to <xxxM> and above can be used by
drivers (or any
Quoted 1 line
kernel module) might be through ioremap which takes
physical-address.
Quoted 2 lines
But if lets say we need only 1MB portion of specific
physical-memory
Quoted 2 lines
region then AFAIK it must be done by hacking in kernel code during memory-initialization (
mem_initfunction) where it ismarking/checking
Quoted 6 lines
pages as/are reserved; you can simply mark you required pages as reserved too and set their count to some-value if you want to know later which pages are reserved by you. (can do this reservation work
here: http://lxr.free-electrons.com/source/arch/i386/mm/init.c#605).
CMIIW
Quoted 3 lines
Can you not use the 'memmap=' kernel option to reserve the specific area you need?
(SeeDocumentation/kernel-parameters.txtfor details)
This looks like what I want, but after searching for this, I found that memmap= is implemented for i386 and ia64 only. My arch is arm (processor is an IXP455).
I'll explore the mem= option to see if it will work out.
Jon