From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from Soneticom.com (soneticom.com [209.114.210.150]) by ozlabs.org (Postfix) with ESMTP id 93E6EDDEBA for ; Thu, 21 Dec 2006 03:52:07 +1100 (EST) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C72457.2D9C8803" Subject: Define Linux system memory Date: Wed, 20 Dec 2006 11:52:04 -0500 Message-ID: <3C02138692C13C4BB675FE7EA2409529261209@bluefin.Soneticom.local> From: "Clint Thomas" To: List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. ------_=_NextPart_001_01C72457.2D9C8803 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable 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 =20 Clinton Thomas =20 ------_=_NextPart_001_01C72457.2D9C8803 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable
To = anybody who has=20 done this before or understands how to do this, I was wondering if you = know how=20 to "tell" the kernel how much memory there is in the = system. An=20 example would be if I have 512MB of RAM, but only want the system to = know that=20 there is about 500MB in RAM, so that 12MB does not exist to the = OS/kernel. Would=20 this require mucking about in U-boot? or can I just define this in the = kernel=20 source? Thanks
 
Clinton = Thomas
 
------_=_NextPart_001_01C72457.2D9C8803-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from web32203.mail.mud.yahoo.com (web32203.mail.mud.yahoo.com [68.142.207.134]) by ozlabs.org (Postfix) with SMTP id D7D3FDDEED for ; Thu, 21 Dec 2006 04:03:48 +1100 (EST) Date: Wed, 20 Dec 2006 08:57:06 -0800 (PST) From: Frank Subject: Re: Define Linux system memory To: Clint Thomas , linuxppc-embedded@ozlabs.org In-Reply-To: <3C02138692C13C4BB675FE7EA2409529261209@bluefin.Soneticom.local> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Message-ID: <958023.73009.qm@web32203.mail.mud.yahoo.com> List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --- 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from Soneticom.com (soneticom.com [209.114.210.150]) by ozlabs.org (Postfix) with ESMTP id CAA54DE055 for ; Thu, 21 Dec 2006 05:02:31 +1100 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Subject: RE: Define Linux system memory Date: Wed, 20 Dec 2006 13:02:28 -0500 Message-ID: <3C02138692C13C4BB675FE7EA2409529261219@bluefin.Soneticom.local> In-Reply-To: <958023.73009.qm@web32203.mail.mud.yahoo.com> From: "Clint Thomas" To: "Frank" , List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx.dlasys.net (24.152.213.223.res-cmts.eph.ptd.net [24.152.213.223]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 3ECBFDDE34 for ; Thu, 21 Dec 2006 17:01:58 +1100 (EST) Message-ID: <458A2289.4070401@dlasys.net> Date: Thu, 21 Dec 2006 00:58:33 -0500 From: "David H. Lynch Jr." MIME-Version: 1.0 To: Clint Thomas Subject: Re: Define Linux system memory References: <3C02138692C13C4BB675FE7EA2409529261209@bluefin.Soneticom.local> In-Reply-To: <3C02138692C13C4BB675FE7EA2409529261209@bluefin.Soneticom.local> Content-Type: multipart/alternative; boundary="------------010900000301060409060905" Cc: linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. --------------010900000301060409060905 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --------------010900000301060409060905 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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
--------------010900000301060409060905-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from web36606.mail.mud.yahoo.com (web36606.mail.mud.yahoo.com [209.191.85.23]) by ozlabs.org (Postfix) with SMTP id 0A165DDEC5 for ; Thu, 21 Dec 2006 18:05:32 +1100 (EST) Date: Wed, 20 Dec 2006 23:05:28 -0800 (PST) From: Parav Pandit Subject: Re: Define Linux system memory To: "David H. Lynch Jr." , Clint Thomas In-Reply-To: <458A2289.4070401@dlasys.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-228382367-1166684728=:74305" Message-ID: <588266.74305.qm@web36606.mail.mud.yahoo.com> Cc: linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --0-228382367-1166684728=:74305 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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." 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 --0-228382367-1166684728=:74305 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
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 --0-228382367-1166684728=:74305--