I am calling sceKernelIcacheInvalidateRange to invalidate the instructions I've written (and I'm writing through an uncached pointer so I don't think the dcache is an issue here), but I'm not convinced it's working correctly (at least on the v1.0 firmware I'm developing on).
When I look at the disassembly for the various sceKernel* stubs in my image (at runtime, after they've been patched), this is what I see:
Code: Select all
sceKernelDcacheWritebackAll:
0x08994A28: 03E00008 - jr $ra
0x08994A2C: 0008310C - syscall 0x20C4
sceKernelDcacheWritebackRange:
0x08994A30: 03E00008 - jr $ra
0x08994A34: 0008318C - syscall 0x20C6
sceKernelExitGame:
0x08994A38: 03E00008 - jr $ra
0x08994A3C: 0008384C - syscall 0x20E1
sceKernelRegisterExitCallback:
0x08994A40: 03E00008 - jr $ra
0x08994A44: 0008388C - syscall 0x20E2
sceKernelIcacheInvalidateRange:
0x08994A48: 0000054C - syscall 0x15
0x08994A4C: 00000000 - nop
http://hitmen.c02.at/files/releases/psp/syscalls.txt
These rows show the syscall for v1.0, 1.5, 1.52 and 2.0 firmware:
Code: Select all
sceKernelIcacheInvalidateAll |0x920f104a| |0x20cc|0x20cc|0x20cd| *** differences ***
sceKernelIcacheInvalidateRange |0xc2df770e| |0x20b6|0x20b6|0x20b8| *** differences ***
So I guess my question is, are these now known/available for v1.0 (and hence I need to update my pspsdk installaton)?
If they're not known the alternative is to flush the cache manually. I'm familiar with MIPS assembly, but I have no idea if the cache management instructions are the same on the PSP. If I need to take this route, can anyone supply any references that I can chase up?
Cheers,
Paul