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 

Questions about the Scratchpad and cached/uncached memory

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



Joined: 19 Apr 2009
Posts: 9

PostPosted: Wed Apr 29, 2009 12:45 pm    Post subject: Questions about the Scratchpad and cached/uncached memory Reply with quote

After reading up about the PSP, I was wondering if the data cache and the instruction cache really the Scratchpad? Is it accessable in user mode?

Also, what is the difference between cached and uncached memory (ex. 0x08800000 vs 0x48800000)? I would guess that the cached area checks to see if it has the data in cache to save time while the uncached immediately loads its, but I'm not sure if this logic is completely true (or completely false). *Edit* I understand that my guess was correct for this. Still need help with the first question.*

I would really appreciate some info.
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Wed Apr 29, 2009 2:17 pm    Post subject: Reply with quote

The scratchpad (4 KiB) is not the same as CPU's L1 cache (32 KiB). The scratchpad is at 0×00010000 but I think it is also remapped along with the pre-IPL so in any case its impossible to access the scratchpad from user/kernel mode after the IPL has executed as its memory address address is remapped to another location.

When using a pointer, if you OR it with 0x40000000, it becomes a pointer to uncached memory. It still points to the same address. Since the PSP only has 32/64 MB, the unused address bits on the left are used for this purpose (well its actually for most MIPS CPUs). This means that if you write to the pointed address it performs a write-through and the value is updated in the RAM immediately. I'm not sure if it applies to reading as well. This is used when writing variables to be used by GU functions, since the GU cannot see the data cache of the CPU.
Back to top
View user's profile Send private message
poorkingz



Joined: 19 Apr 2009
Posts: 9

PostPosted: Thu Apr 30, 2009 4:49 am    Post subject: Reply with quote

So there is no way to access the CPU L1 cache in usermode?
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 -> PSP 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