32x: drc: new smc handling, write handlers adjusted.
[picodrive.git] / cpu / drc / cmn.c
CommitLineData
41397701 1#include <stdio.h>
2#if defined(__linux__) && defined(ARM)
3#include <sys/mman.h>
4#endif
5
6#include "cmn.h"
7
f4bb5d6b 8u8 __attribute__((aligned(4096))) tcache[DRC_TCACHE_SIZE];
41397701 9
10
11void drc_cmn_init(void)
12{
13#if defined(__linux__) && defined(ARM)
14 void *tmp;
15
679af8a3 16 tmp = mmap(tcache, DRC_TCACHE_SIZE, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED|MAP_ANONYMOUS, -1, 0);
41397701 17 printf("mmap tcache: %p, asked %p\n", tmp, tcache);
18#endif
19
20}
21
22// TODO: add calls in core, possibly to cart.c?
23void drc_cmn_cleanup(void)
24{
25#if defined(__linux__) && defined(ARM)
26 int ret;
679af8a3 27 ret = munmap(tcache, DRC_TCACHE_SIZE);
41397701 28 printf("munmap tcache: %i\n", ret);
29#endif
30}
31