forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PS3 Memory Map

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS3 Linux Development
View previous topic :: View next topic  
Author Message
StrontiumDog



Joined: 01 Jun 2005
Posts: 55
Location: Somewhere in the South Pacific

PostPosted: Mon Mar 12, 2007 7:49 pm    Post subject: PS3 Memory Map Reply with quote

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
View user's profile Send private message
StrontiumDog



Joined: 01 Jun 2005
Posts: 55
Location: Somewhere in the South Pacific

PostPosted: Mon Mar 12, 2007 10:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
ldesnogu



Joined: 17 Apr 2004
Posts: 95

PostPosted: Tue Mar 13, 2007 2:14 am    Post subject: Reply with quote

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
View user's profile Send private message
StrontiumDog



Joined: 01 Jun 2005
Posts: 55
Location: Somewhere in the South Pacific

PostPosted: Tue Mar 13, 2007 5:50 am    Post subject: Reply with quote

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
View user's profile Send private message
zoltan



Joined: 13 Mar 2007
Posts: 1

PostPosted: Tue Mar 13, 2007 7:07 am    Post subject: Reply with quote

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
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Tue Mar 13, 2007 8:11 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS3 Linux Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group