lkml.org 
[lkml]   [2000]   [Jan]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 20 Jan 2000 15:36:27 +0100
FromPauline Middelink <>
SubjectRe: Grabbing physical memory ranges.
On Wed, Jan 19, 2000 at 08:35:59AM -0500, Mike A. Harris wrote:
> I have code for 2.2 that grabs a specific memory range of
> physical memory based on the maximum amount of physical memory.
>
> I'm wondering what would be the prescribed way of doing this
> under 2.3.x? Is it possible to do this entirely in a separate
> module or must it be done in setup.c?

Have a look at the bootmem stuff, escp. reserve_bootmem()
It can be done during __setup time. Not __initcall, since
by then the bootmem is frozen.

> I want to grab x megs of physical memory for my own private
> permanent usage (by the kernel). I need to choose the EXACT
> start and end ranges of this memory.

To bad, else you could have used the bigphysarea patch...
Maybe we can augment this patch with a startregion? The
size is already given...

> Also, what method would I use (in kernel) for accessing this
> memory. I've got some examples for 2.2, etc.. but I want to know
> if anything has changed for 2.3.x in this arena, and also if
> there are multiple ways, what each method is, and what
> advantages/disadvantages are.

As far as I can see, it's just memory ala kmalloc(), only
with the exception you shouldn't kfree() it :)
So the usual stuff like virt_to_bus() before DMA applies.

Met vriendelijke groet,
Pauline Middelink
--
PGP Key fingerprint = DE 6B D0 D9 19 AD A7 A0 58 A3 06 9D B6 34 39 E2
For more details look at my website http://www.polyware.nl/~middelink

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [from the cache]
©2003-2009