[Cbe-oss-dev] (no subject)

Clint Thomas cthomas at Soneticom.com
Thu Jun 21 02:06:18 EST 2007


Geoff,

When I cat /proc/meminfo this approximately correct for any distro I've
used so far.

MemTotal: 201296 kB
MemFree:  127880 kB

Thanks for clearing that up. Now a better question might be, can I just
rebuild the kernel to not include the ps3fb in order to free that unused
video memory? It looks like that would put me right around where your
MemTotal is sitting, so I am guessing you might have done this yourself?

Also, besides what resides in the kernel as far as the PS3 Linux goes,
is there anything out in the root file system other than libraries that
are absolutely required for Linux to work on the ps3? I am trying to
make a near-embedded level file system for mine, so I want to determine
everything that is required, and remove all that is not. Thanks!


Clint Thomas

-----Original Message-----
From: Geoff Levand [mailto:geoffrey.levand at am.sony.com] 
Sent: Monday, June 18, 2007 7:52 PM
To: Clint Thomas
Cc: cbe-oss-dev at ozlabs.org
Subject: Re: [Cbe-oss-dev] (no subject)

Clint Thomas wrote:
> Hey guys,
> 
> I was wondering how much memory does the Hypervisor take off the top
end of system memory? 

For the PS3, that information has not been disclosed.

No matter what linux distribution I install, the most system memory I
can have available is between 201 to 203 MB. One explanation I have
heard is that a combination of per-page mapping memory loss and
hypervisor virtualization are responsible, but I would like some
clarification. Thanks

I think there are several questions here all mixed together.

First the amount available to the other os lpar.  That can be seen with
the patch below applied to a recent kernel.

 -> ps3_mm_init:1200
ps3_mm_region_create:249 requested  7800000h
ps3_mm_region_create:250 actual     7000000h
ps3_mm_region_create:251 difference 800000h (8MB)
 <- ps3_mm_init:1223
ps3_mm_vas_create:202: map.total     = f000000h
ps3_mm_vas_create:202: map.rm.size   = 8000000h
ps3_mm_vas_create:202: map.vas_id    = 11
ps3_mm_vas_create:202: map.htab_size = 100000h
ps3_mm_vas_create:202: map.r1.base   = 6c0060000000h
ps3_mm_vas_create:202: map.r1.offset = 6c0058000000h
ps3_mm_vas_create:202: map.r1.size   = 7000000h
PS3 firmware version 1.8.0
ps3fb videomemory: 18874368 bytes at c000000000800000 ps3flash bounce
buffer: 262144 bytes at c000000000780000

fire-nfs:~# cat /proc/meminfo
MemTotal:       219324 kB
MemFree:         95804 kB

So this shows f000000h = 240 MiB total RAM available to the OS running
in the other OS lpar.

Then linux needs some memory to run and that is subtracted to get 219324
kB here. 18874368 bytes are for video frambuffer, and 262144 bytes are
for the flash memory driver.

-Geoff


--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -17,7 +17,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307  USA
  */
-
+#define DEBUG
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/memory_hotplug.h>
@@ -30,7 +30,7 @@
 #include "platform.h"
 
 #if defined(DEBUG)
-#define DBG udbg_printf
+#define DBG printk
 #else
 #define DBG pr_debug
 #endif







More information about the cbe-oss-dev mailing list