notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
input: detect dead devices, always set keynames
[picodrive.git]
/
cpu
/
drc
/
cmn.c
diff --git
a/cpu/drc/cmn.c
b/cpu/drc/cmn.c
index
1f15a0f
..
d796bfb
100644
(file)
--- a/
cpu/drc/cmn.c
+++ b/
cpu/drc/cmn.c
@@
-1,35
+1,28
@@
#include <stdio.h>
#include <stdio.h>
-#if
defined(__linux__) && defined(ARM)
+#if
def __linux__
#include <sys/mman.h>
#endif
#include "cmn.h"
#include <sys/mman.h>
#endif
#include "cmn.h"
-#ifndef ARM
-unsigned int tcache[SSP_TCACHE_SIZE/4];
-unsigned int *ssp_block_table[0x5090/2];
-unsigned int *ssp_block_table_iram[15][0x800/2];
-char ssp_align[SSP_BLOCKTAB_ALIGN_SIZE];
-#endif
+u8 __attribute__((aligned(4096))) tcache[DRC_TCACHE_SIZE];
void drc_cmn_init(void)
{
void drc_cmn_init(void)
{
-#if
defined(__linux__) && defined(ARM)
+#if
def __linux__
void *tmp;
void *tmp;
- tmp = mmap(tcache,
SSP_DRC_SIZE, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED
|MAP_ANONYMOUS, -1, 0);
+ tmp = mmap(tcache,
DRC_TCACHE_SIZE, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE
|MAP_ANONYMOUS, -1, 0);
printf("mmap tcache: %p, asked %p\n", tmp, tcache);
#endif
printf("mmap tcache: %p, asked %p\n", tmp, tcache);
#endif
-
}
}
-// TODO: add calls in core, possibly to cart.c?
void drc_cmn_cleanup(void)
{
void drc_cmn_cleanup(void)
{
-#if
defined(__linux__) && defined(ARM)
+#if
def __linux__
int ret;
int ret;
- ret = munmap(tcache,
SSP_DRC
_SIZE);
+ ret = munmap(tcache,
DRC_TCACHE
_SIZE);
printf("munmap tcache: %i\n", ret);
#endif
}
printf("munmap tcache: %i\n", ret);
#endif
}