Hi,
PSP does have a scratch pad (0×00010000 - 0×00014000 (16 KiB)). Scratch pad is usually a faster memory than other memories. I was wondering if kernel or user libraries (i mean not ours) do really use it or it is eventually free for our purpose ? can it be cached ? or is it irrelevant ?
SCRATCH PAD - Does the kernel use it ?
not slower too ?
well, I remember when I was working on SH1, there is another reason to use scratch pad : to avoid both instructions and data to be fetched from the external bus (DRAM here) by running instructions in scratch pad to make memory transfer faster. But, well, there was no cache and it was running at 10 MHz.
well, I remember when I was working on SH1, there is another reason to use scratch pad : to avoid both instructions and data to be fetched from the external bus (DRAM here) by running instructions in scratch pad to make memory transfer faster. But, well, there was no cache and it was running at 10 MHz.
At the presentation at BP2005, if I remember correctly, the presenter mentioned that there is a hardware bug that causes scratchpad RAM to be way slower than was intended. If it is separate from the CPU and actually is on the bus however as Tyranid says, I would call that bad design, not a bug :)
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
okay, to sum up :
1) scratch pad access is not more or less fast as main memory access due to the necessity for both to pass through an external bus. Sure, scratch pad sounds like a misname :/ and mostly a bad design rather than a bug indeed.
2) kernel doesn't use it, al least, for the running life of an application.
well, scratch pad still offers us 16 KiB for free.
By the way, do you know if GP is used by kernel ? by pspdev ? or can I set with my own address ?
1) scratch pad access is not more or less fast as main memory access due to the necessity for both to pass through an external bus. Sure, scratch pad sounds like a misname :/ and mostly a bad design rather than a bug indeed.
2) kernel doesn't use it, al least, for the running life of an application.
well, scratch pad still offers us 16 KiB for free.
By the way, do you know if GP is used by kernel ? by pspdev ? or can I set with my own address ?
GP is not a kernel register, but the compiler will use it to access global variables. You can set it to whatever you want, just be sure that when you call non-ASM functions to set it to whatever it was when you started running the assembly code.hlide wrote:okay, to sum up :
By the way, do you know if GP is used by kernel ? by pspdev ? or can I set with my own address ?