Advertising (This ad goes away for registered users. You can Login or Register)

Alternitive to sceKernelIcacheInvalidateAll

Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: Alternitive to sceKernelIcacheInvalidateAll

Post by m0skit0 »

IIRC both caches are the same size.
Advertising
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
wth
HBL Developer
Posts: 834
Joined: Wed Aug 31, 2011 4:44 pm
Contact:

Re: Alternitive to sceKernelIcacheInvalidateAll

Post by wth »

m0skit0 wrote:IIRC both caches are the same size.
hm well according to http://en.wikipedia.org/wiki/R4000
"The R4000 was a scalar superpipelined microprocessor with a eight-stage integer pipeline. During the first stage (IF), a virtual address for an instruction is generated and the instruction translation lookaside buffer (TLB) begins the translation of the address to a physical address. In the second stage (IS), translation is completed and the instruction is fetched from an internal 8 KB instruction cache. The instruction cache is direct-mapped and virtually indexed, physically tagged. It has a 16- or 32-byte line size. Architecturally, it could be expanded to 32 KB."
Advertising
Davee
Guru
Posts: 278
Joined: Mon Jan 10, 2011 1:24 am

Re: Alternitive to sceKernelIcacheInvalidateAll

Post by Davee »

wth wrote:
m0skit0 wrote:IIRC both caches are the same size.
hm well according to http://en.wikipedia.org/wiki/R4000
"The R4000 was a scalar superpipelined microprocessor with a eight-stage integer pipeline. During the first stage (IF), a virtual address for an instruction is generated and the instruction translation lookaside buffer (TLB) begins the translation of the address to a physical address. In the second stage (IS), translation is completed and the instruction is fetched from an internal 8 KB instruction cache. The instruction cache is direct-mapped and virtually indexed, physically tagged. It has a 16- or 32-byte line size. Architecturally, it could be expanded to 32 KB."
PSP uses Allegrex.
Follow me on twitter: @DaveeFTW
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: Alternitive to sceKernelIcacheInvalidateAll

Post by m0skit0 »

Davee's answers as usual: pretty short :lol: Like scottish kilts :lol: ;)

What he means is that PSP uses a custom MIPS and so such references are pretty much useless. This is an outdated, but more reliable reference.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
wth
HBL Developer
Posts: 834
Joined: Wed Aug 31, 2011 4:44 pm
Contact:

Re: Alternitive to sceKernelIcacheInvalidateAll

Post by wth »

ok
also then according to http://en.wikipedia.org/wiki/PlayStatio ... e_hardware
"Both CPUs contain 16 KiB of two-way set associative instruction cache and data cache respectively."
So if I understand correctly that means a 32KB cache with 16KB Dcache / 16KB Icache no
RNB_PSP
Posts: 138
Joined: Mon Jan 17, 2011 9:18 pm
Location: In your dreams.....

Re: Alternitive to sceKernelIcacheInvalidateAll

Post by RNB_PSP »

How about using an uncached pointer(or jumping to an uncached function pointer)? Will that bypass the cache? That will be a huge performance hit but will ensure your code works properly.
Image
Image
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: Alternitive to sceKernelIcacheInvalidateAll

Post by m0skit0 »

The MIPS CPU will fetch code from the instruction cache, which is not updated if you use uncached pointers, and thus your code will not run.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
RNB_PSP
Posts: 138
Joined: Mon Jan 17, 2011 9:18 pm
Location: In your dreams.....

Re: Alternitive to sceKernelIcacheInvalidateAll

Post by RNB_PSP »

m0skit0 wrote:The MIPS CPU will fetch code from the instruction cache, which is not updated if you use uncached pointers, and thus your code will not run.
Oh, I see. Thanks. I thought using an uncached pointer will make the cpu behave as if the cache(s) doesn't exist.
Image
Image
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: Alternitive to sceKernelIcacheInvalidateAll

Post by m0skit0 »

You can skip data cache to read/write, but the CPU will always fecth instructions from cache.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
Locked

Return to “Programming and Security”