public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* Define Linux system memory
@ 2006-12-20 16:52 Clint Thomas
  2006-12-20 16:57 ` Frank
  2006-12-21  5:58 ` David H. Lynch Jr.
  0 siblings, 2 replies; 5+ messages in thread
From: Clint Thomas @ 2006-12-20 16:52 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 444 bytes --]

To anybody who has done this before or understands how to do this, I was
wondering if you know how to "tell" the kernel how much memory there is
in the system. An example would be if I have 512MB of RAM, but only want
the system to know that there is about 500MB in RAM, so that 12MB does
not exist to the OS/kernel. Would this require mucking about in U-boot?
or can I just define this in the kernel source? Thanks
 
Clinton Thomas
 

[-- Attachment #2: Type: text/html, Size: 863 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Define Linux system memory
  2006-12-20 16:52 Define Linux system memory Clint Thomas
@ 2006-12-20 16:57 ` Frank
  2006-12-20 18:02   ` Clint Thomas
  2006-12-21  5:58 ` David H. Lynch Jr.
  1 sibling, 1 reply; 5+ messages in thread
From: Frank @ 2006-12-20 16:57 UTC (permalink / raw)
  To: Clint Thomas, linuxppc-embedded


--- Clint Thomas <cthomas@Soneticom•com> wrote:

> To anybody who has done this before or understands how to do
> this, I was
> wondering if you know how to "tell" the kernel how much memory
> there is
> in the system. An example would be if I have 512MB of RAM, but
> only want
> the system to know that there is about 500MB in RAM, so that
> 12MB does
> not exist to the OS/kernel. Would this require mucking about
> in U-boot?
> or can I just define this in the kernel source? Thanks
>  
> Clinton Thomas
On the kernel command line passed by u-boot:
mem=500M

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Define Linux system memory
  2006-12-20 16:57 ` Frank
@ 2006-12-20 18:02   ` Clint Thomas
  0 siblings, 0 replies; 5+ messages in thread
From: Clint Thomas @ 2006-12-20 18:02 UTC (permalink / raw)
  To: Frank, linuxppc-embedded

 Yes, in my particular case I have 256MB of ram and want to cut off
about 16MB, so I passed it the argument mem=3D0x0EFFFFFF. I also tried
mem=3D240M, but it does not seem to work correctly. Whenever I pass it
those two options, Linux believes it has 191820K of memory, about 64MB
instead of the 16MB.

When I pass it a mem=3D argument that is lower than the 191820K, such as
mem=3D180M, the number decreases again, down to around 142M. Is there =
any
reason that Linux is allocating in huge blocks like that? Can I not be
so specific as to say the exact number of bytes I want Linux to see?

-----Original Message-----
From: Frank [mailto:frannk_m1@yahoo•com]=20
Sent: Wednesday, December 20, 2006 11:57 AM
To: Clint Thomas; linuxppc-embedded@ozlabs•org
Subject: Re: Define Linux system memory


--- Clint Thomas <cthomas@Soneticom•com> wrote:

> To anybody who has done this before or understands how to do this, I=20
> was wondering if you know how to "tell" the kernel how much memory=20
> there is in the system. An example would be if I have 512MB of RAM,=20
> but only want the system to know that there is about 500MB in RAM, so=20
> that 12MB does not exist to the OS/kernel. Would this require mucking=20
> about in U-boot?
> or can I just define this in the kernel source? Thanks
> =20
> Clinton Thomas
On the kernel command line passed by u-boot:
mem=3D500M

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com=20

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Define Linux system memory
  2006-12-20 16:52 Define Linux system memory Clint Thomas
  2006-12-20 16:57 ` Frank
@ 2006-12-21  5:58 ` David H. Lynch Jr.
  2006-12-21  7:05   ` Parav Pandit
  1 sibling, 1 reply; 5+ messages in thread
From: David H. Lynch Jr. @ 2006-12-21  5:58 UTC (permalink / raw)
  To: Clint Thomas; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]

Clint Thomas wrote:
> To anybody who has done this before or understands how to do this, I
> was wondering if you know how to "*tell*" the kernel how much memory
> there is in the system. An example would be if I have 512MB of RAM,
> but only want the system to know that there is about 500MB in RAM, so
> that 12MB does not exist to the OS/kernel. Would this require mucking
> about in U-boot? or can I just define this in the kernel source? Thanks
>  
>  Clinton Thomas

    Most bootloaders including u-boot pass a board information structure
that includes a variety of information including the memory size.
    Also I think top of memory is also typically passed to the Linux
Kernel as a register parameter  by the boot loader.



>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs•org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded


-- 
Dave Lynch 					  	    DLA Systems
Software Development:  				         Embedded Linux
717.627.3770 	       dhlii@dlasys•net 	  http://www.dlasys.net
fax: 1.253.369.9244 			           Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.

"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein


[-- Attachment #2: Type: text/html, Size: 2593 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Define Linux system memory
  2006-12-21  5:58 ` David H. Lynch Jr.
@ 2006-12-21  7:05   ` Parav Pandit
  0 siblings, 0 replies; 5+ messages in thread
From: Parav Pandit @ 2006-12-21  7:05 UTC (permalink / raw)
  To: David H. Lynch Jr., Clint Thomas; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 2364 bytes --]

Hi,
   
  This memory information is passed by the u-boot in bd_info structure (typedef to bd_t).
  Its defined in include/asm-ppc/ppcboot.h file.
  First two parameters specify the start address and length.
   
  Well, I'll at least try on my host x86 system. There is doesn't get from the grub.
  It should work and I should be able to see in cat /proc/meminfo.
  I'll try and let you know.
   
  Regards,
  Parav Pandit
  

"David H. Lynch Jr." <dhlii@dlasys•net> wrote:
  Clint Thomas wrote:       To anybody who has done this before or understands how to do this, I was wondering if you know how to "tell" the kernel how much memory there is in the system. An example would be if I have 512MB of RAM, but only want the system to know that there is about 500MB in RAM, so that 12MB does not exist to the OS/kernel. Would this require mucking about in U-boot? or can I just define this in the kernel source? Thanks
   
   Clinton Thomas

    Most bootloaders including u-boot pass a board information structure that includes a variety of information including the memory size.
    Also I think top of memory is also typically passed to the Linux Kernel as a register parameter  by the boot loader.



     


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



--   Dave Lynch             DLA Systems  Software Development:               Embedded Linux  717.627.3770         dhlii@dlasys•net    http://www.dlasys.net  fax: 1.253.369.9244               Cell: 1.717.587.7774  Over 25 years' experience in platforms, languages, and technologies too numerous to list.    "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."  Albert Einstein  
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs•org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[-- Attachment #2: Type: text/html, Size: 3556 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-12-21  7:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-20 16:52 Define Linux system memory Clint Thomas
2006-12-20 16:57 ` Frank
2006-12-20 18:02   ` Clint Thomas
2006-12-21  5:58 ` David H. Lynch Jr.
2006-12-21  7:05   ` Parav Pandit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox