PSP cache HOWTO/FAQ
PSP cache HOWTO/FAQ
I've been seeing a fair amount of confusion about cache issues here, along with misleading/incomplete advice about how to deal with them.
So I decided to write up a HOWTO for dealing with PSP cache issues: http://goop.org/psp/cache-howto.html
This is a first draft, and I'd love to have comment/suggestions/corrections for it.
So I decided to write up a HOWTO for dealing with PSP cache issues: http://goop.org/psp/cache-howto.html
This is a first draft, and I'd love to have comment/suggestions/corrections for it.
- ChaosKnight
- Posts: 142
- Joined: Thu Apr 14, 2005 2:08 am
- Location: Florida, USA
You could; that would handle the case of writing commands to be written by GE (or whatever). But it isn't the most efficient path (uncached writes seems faster, I'm guessing because of reduced cache pollution), and a lot of code is already using uncached pointers (mostly in unsafe ways).jimparis wrote:Rather than all the mess with uncached pointers and cache line sizes, can't you just do business as usual and force a writeback before telling the GE to use it?
Also, if you're reading back memory which has been written by hardware, then you also need to make sure the cache has been invalidated, and/or use uncached reads.
Well, that would be inherently buggy code anyway.I haven't used the GE; obviously this wouldn't work if there's a case where you're changing the data as the GE reads it.
Concurrent memory access can surely work if you're careful (think Dekker's algorithm), and this might be useful for future work with the ME. But I digress; your guide is certainly useful, thanks.jsgf wrote:Well, that would be inherently buggy code anyway.I haven't used the GE; obviously this wouldn't work if there's a case where you're changing the data as the GE reads it.
Possibly; though Dekker's algorithm also assumes strict in-order writes. I'm guessing the PSP does that, but it is a stronger requirement than simply uncached writes.jimparis wrote:Concurrent memory access can surely work if you're careful (think Dekker's algorithm), and this might be useful for future work with the ME.
The GE signal command may be useful for this, but I have no idea whether anybody found out yet how they work.jimparis wrote:Concurrent memory access can surely work if you're careful (think Dekker's algorithm), and this might be useful for future work with the ME. But I digress; your guide is certainly useful, thanks.jsgf wrote:Well, that would be inherently buggy code anyway.I haven't used the GE; obviously this wouldn't work if there's a case where you're changing the data as the GE reads it.
I played with it for a while, but didn't have much success; I could never get a callback from it. But that's quite a different matter from actually playing with the GE's command memory as it reads it...holger wrote:The GE signal command may be useful for this, but I have no idea whether anybody found out yet how they work.