how to reserve memory in linux?

Eric Nuckols jrocnuck at hotmail.com
Sun Oct 22 03:48:57 EST 2006


Have you tried the function

alloc_bootmem_low() early in the boot process in main.c ?



----Original Message Follows----
From: "Ming Liu" <eemingliu at hotmail.com>
To: urwithsudheer at gmail.com
CC: linuxppc-embedded at ozlabs.org
Subject: Re: how to reserve memory in linux?
Date: Sat, 21 Oct 2006 14:22:25 +0000

Dear sudheer,
About the "mem=xx" argument, I checked it from the website and got such a 
explanation:

This argument has several purposes: The original purpose was to specify the 
amount of installed memory (or a value less than that if you wanted to limit 
the amount of memory available to linux).

>From the argument above, it says "mem=xx" is to specify the amount of memory 
available to Linux. I am not sure if I am right, but I think if I use such 
an argument, that reserved part (that 5MB you mentioned), is not available 
any more for Linux to access it.

My original meaning is: specify a fixed physical address for a mount of 
memory for reserved use. The point is to make this part of memory fixed in 
the memory of physical address, and then another I/O peripheral could use 
DMA to access such a fixed physical address memory. However if I don't 
reserve such a part, I must let Linux to allocate such a memory part. And 
then Linux will not put it in a fixed physical address and then the 
peripheral will not know where is this part.

Am I right? Thanks for your idea.

Also other ideas are appreciated.

Regards
Ming

>Considering your setup as normal desktop, I hope this can be done by giving
>"mem= xxm"  as the boot arguments.  Say the dmesg in your system shows   "
>495MB LOWMEM available."  .  In the boot arguments you can give mem=490m
>saying the linux to use only 490MB . The rest 5MB can be used later as you
>wish.

_________________________________________________________________
ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£  http://www.hotmail.com



_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded at ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

_________________________________________________________________
Get FREE company branded e-mail accounts and business Web site from 
Microsoft Office Live 
http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/




More information about the Linuxppc-embedded mailing list