X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fdrc%2Fcmn.c;h=91bd7eddab428098bfce0d185559e1597cb80133;hb=8cc76b48865096cff1024d1d7cfb4123bf7daba7;hp=e286ccf65d95c1fbcb82a8d61bfae9177013a5b3;hpb=72f63cf06ca04f5619205d9b0cedebd84037f969;p=picodrive.git diff --git a/cpu/drc/cmn.c b/cpu/drc/cmn.c index e286ccf..91bd7ed 100644 --- a/cpu/drc/cmn.c +++ b/cpu/drc/cmn.c @@ -1,31 +1,23 @@ +/* + * PicoDrive + * Copyright (C) 2009,2010 notaz + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ #include -#if defined(__linux__) && defined(ARM) -#include -#endif +#include #include "cmn.h" -u32 __attribute__((aligned(4096))) tcache[DRC_TCACHE_SIZE/4]; +u8 __attribute__((aligned(4096))) tcache[DRC_TCACHE_SIZE]; void drc_cmn_init(void) { -#if defined(__linux__) && defined(ARM) - void *tmp; - - tmp = mmap(tcache, DRC_TCACHE_SIZE, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED|MAP_ANONYMOUS, -1, 0); - printf("mmap tcache: %p, asked %p\n", tmp, tcache); -#endif - + plat_mem_set_exec(tcache, sizeof(tcache)); } -// TODO: add calls in core, possibly to cart.c? void drc_cmn_cleanup(void) { -#if defined(__linux__) && defined(ARM) - int ret; - ret = munmap(tcache, DRC_TCACHE_SIZE); - printf("munmap tcache: %i\n", ret); -#endif } -