RE: Memory Pre-allocation (mem=xxx)

3 messages, 2 authors, 2002-02-24 · open the first message on its own page

RE: Memory Pre-allocation (mem=xxx)

From: David C. Chiu <hidden>
Date: 2002-02-23 03:11:00

Thanks for the response. Would you be so kind to be more specific? I did
a coarse search of the kernel documentation subdirectory contents, but
fail to find what you are referring to (although I have been referred to
as the seeing blind in the past.)

The basic goal was to have a singular location in which buffer size is
specified so that future changes doesn't turn into a nightmare, and
computing the delta between mem=xxx and actual memory size seem logical,
but the present method employed by yours truely felt ugly and... so
wrong. ^^;

-----Original Message-----
From: Tom Rini [mailto:trini@kernel.crashing.org]
Sent: Friday, February 22, 2002 6:38 PM
To: Wolfgang Denk
Cc: David C. Chiu; linuxppc-embedded@lists.linuxppc.org
Subject: Re: Memory Pre-allocation (mem=xxx)


On Sat, Feb 23, 2002 at 01:57:24AM +0100, Wolfgang Denk wrote:
In message [off-list ref]
you wrote:
quoted
We're working on a project that requires a two megabytes block of
contiguous memory in kernel space. Although it is well documented
that
quoted
memory can be reserved by using mem=xx arguments during boot time,
it is
quoted
unclear (to me) as to how a driver can automatically detect the size
of
quoted
the said reserved block.
Pass an extra boot argument?
Basically.  IIRC there's a clean way to do it now (tho it can fail, so
you'd have to catch that in the driver, but early on it shouldn't be a
problem).  Look around in Documentation/

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Memory Pre-allocation (mem=xxx)

From: Tom Rini <hidden>
Date: 2002-02-23 17:14:00

On Fri, Feb 22, 2002 at 07:11:00PM -0800, David C. Chiu wrote:
Thanks for the response. Would you be so kind to be more specific? I did
a coarse search of the kernel documentation subdirectory contents, but
fail to find what you are referring to (although I have been referred to
as the seeing blind in the past.)
Sorry, I don't recall exactly where/what it is.  I do remember there
being a few projects which required a large chunk of contigious memory,
and having to do mem=XXm in 2.0 (2.2?) but in 2.2 (2.4?) there's kernel
calls you can make to get a large contig section of memory, if it
exists.
The basic goal was to have a singular location in which buffer size is
specified so that future changes doesn't turn into a nightmare, and
computing the delta between mem=xxx and actual memory size seem logical,
but the present method employed by yours truely felt ugly and... so
wrong. ^^;
Well, if you pass along mem=xxx, then the kernel will not try and figure
ou the actual memory size, unless you do some hacking around.

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Memory Pre-allocation (mem=xxx)

From: Tom Rini <hidden>
Date: 2002-02-24 00:15:04

On Sat, Feb 23, 2002 at 10:14:00AM -0700, Tom Rini wrote:
On Fri, Feb 22, 2002 at 07:11:00PM -0800, David C. Chiu wrote:
quoted
Thanks for the response. Would you be so kind to be more specific? I did
a coarse search of the kernel documentation subdirectory contents, but
fail to find what you are referring to (although I have been referred to
as the seeing blind in the past.)
Sorry, I don't recall exactly where/what it is.  I do remember there
being a few projects which required a large chunk of contigious memory,
and having to do mem=XXm in 2.0 (2.2?) but in 2.2 (2.4?) there's kernel
calls you can make to get a large contig section of memory, if it
exists.
... and it might even be the 'alloc_bootmem' call Jim Lewis mentioned,
now that I think about it..

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help