| View previous topic :: View next topic |
| Author |
Message |
StrontiumDog

Joined: 01 Jun 2005 Posts: 55 Location: Somewhere in the South Pacific
|
Posted: Mon Mar 12, 2007 7:49 pm Post subject: PS3 Memory Map |
|
|
Hi,
Has anyone got any information about the PS3 memory map, or any links they can point to?
More precisely, does anyone have any idea what:
#define GPU_IOIF (0x0d000000UL)
could be defining? It seems to be an address, but an address of what?
And yes I know its an address in the GPU, but I am trying to reconcile that with some other information.
Strontium Dog |
|
| Back to top |
|
 |
StrontiumDog

Joined: 01 Jun 2005 Posts: 55 Location: Somewhere in the South Pacific
|
Posted: Mon Mar 12, 2007 10:45 pm Post subject: |
|
|
The Memory mao of the PS3 under linux is weird.
Reference: http://forums.ps2dev.org/viewtopic.php?t=7172
Fact: Linux only uses the 256MB XDRAM directly and currently the only memory in the 256MB GDDR that gets used is the hidden "physical" frame buffer that is blitted into from the virtual frame buffer in XDRAM. Yes thats a hardware blit. So much for no acceleration :)
Fact: Linux consumes 18MB of the 256MB for the virtual Frame Buffer (7% of the available ram).
Fact: Linux can only see 0xE0000000 = 234881024 bytes = 224MB. So the top 16MB seems to be reserved by the Hypervisor. Reasonable enough.
Fact: I have this weird pointer called GPU_IOIF that is hard coded to be exactly 16MB below the top of available Ram. Coincidence, I think not.
Fact: Linux only reports it has Total memory = 200888kB ???
Where does all the other ram go? Not making much sense to me at the moment.
I feel I am missing something here, because it isn't adding up.
Strontium Dog |
|
| Back to top |
|
 |
ldesnogu
Joined: 17 Apr 2004 Posts: 95
|
Posted: Tue Mar 13, 2007 2:14 am Post subject: |
|
|
| StrontiumDog wrote: | | Fact: Linux can only see 0xE0000000 = 234881024 bytes = 224MB. So the top 16MB seems to be reserved by the Hypervisor. Reasonable enough. |
That should read 32 MB I guess.
| Quote: | Fact: Linux only reports it has Total memory = 200888kB ???
Where does all the other ram go? Not making much sense to me at the moment. |
Don't forget the kernel size itself plus the RAM it uses for its internal needs.
More about this here. |
|
| Back to top |
|
 |
StrontiumDog

Joined: 01 Jun 2005 Posts: 55 Location: Somewhere in the South Pacific
|
Posted: Tue Mar 13, 2007 5:50 am Post subject: |
|
|
| ldesnogu wrote: | | StrontiumDog wrote: | | Fact: Linux can only see 0xE0000000 = 234881024 bytes = 224MB. So the top 16MB seems to be reserved by the Hypervisor. Reasonable enough. |
That should read 32 MB I guess. |
Ahhh, yeah. Oops.
| Quote: | Fact: Linux only reports it has Total memory = 200888kB ???
| Quote: | | Where does all the other ram go? Not making much sense to me at the moment. |
Don't forget the kernel size itself plus the RAM it uses for its internal needs.
More about this here. |
Thanks. So the kernel is consuming 29,171,712 bytes of memory by my calculation.
Strontium Dog |
|
| Back to top |
|
 |
zoltan
Joined: 13 Mar 2007 Posts: 1
|
Posted: Tue Mar 13, 2007 7:07 am Post subject: |
|
|
Frame buffer memory size can be changed when compiling kernel. By default you have a 2x9M framebuffer (2 frames)
linux-2.6.18
PS3FB_NUM_FRAMES_MAX (default=2 -> 18M)
linux-2.6.21 (.config)
CONFIG_FB_PS3_DEFAULT_SIZE_M (default=18M)
Zoltan |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Tue Mar 13, 2007 8:11 am Post subject: |
|
|
| StrontiumDog wrote: | | Fact: Linux can only see 0xE0000000 = 234881024 bytes = 224MB. |
You mean 0x0E000000 bytes.
| Quote: | | #define GPU_IOIF (0x0d000000UL) |
IOIF0 and IOIF1 are the two I/O interfaces on the CBE. From the code (ps3fb.c:xdr_settings) that's definitely involved with some io mapping.
I would guess that it's telling the GPU to map xdr_lpar (= the physical address of the kernel's framebuffers) into the GPU's address space at 0x0d000000.
Basically it looks to me like: allocate a framebuffer in kernel (videomemory), find the physical address of that (xdr_lpar), tell the GPU to map that at GPU_IOIF (lv1_gpu_context_iomap), then use that mapped address when asking the GPU to blit. |
|
| Back to top |
|
 |
|