X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fdrc%2Fcmn.c;h=f788ecac55a9212fab3354a48f473e9474d92ee2;hb=6c991e7ced6e893064dafbe7bd64b98c978f6195;hp=37f17ce921bfb3606430ccc4199b054f1135580c;hpb=0185b677364b849e1e11f523d9f025d90ce86770;p=picodrive.git diff --git a/cpu/drc/cmn.c b/cpu/drc/cmn.c index 37f17ce..f788eca 100644 --- a/cpu/drc/cmn.c +++ b/cpu/drc/cmn.c @@ -10,11 +10,25 @@ #include #include "cmn.h" +#ifdef _MSC_VER +u8 tcache[DRC_TCACHE_SIZE]; +#elif defined(VITA) +#include +u8 *tcache; +static int sceBlock; +int getVMBlock(); +#else u8 __attribute__((aligned(4096))) tcache[DRC_TCACHE_SIZE]; +#endif void drc_cmn_init(void) { +#ifdef VITA + sceBlock = getVMBlock(); + sceKernelGetMemBlockBase(sceBlock, (void **)&tcache); +#endif + int ret = plat_mem_set_exec(tcache, sizeof(tcache)); elprintf(EL_STATUS, "drc_cmn_init: %p, %zd bytes: %d", tcache, sizeof(tcache), ret);