mirror of
				https://github.com/RaySollium99/picodrive.git
				synced 2025-10-27 00:29:39 -04:00 
			
		
		
		
	 679af8a3f4
			
		
	
	
		679af8a3f4
		
	
	
	
	
		
			
			git-svn-id: file:///home/notaz/opt/svn/PicoDrive@812 be3aeb3a-fb24-0410-a615-afba39da0efa
		
			
				
	
	
		
			31 lines
		
	
	
	
		
			597 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
	
		
			597 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #include <stdio.h>
 | |
| #if defined(__linux__) && defined(ARM)
 | |
| #include <sys/mman.h>
 | |
| #endif
 | |
| 
 | |
| #include "cmn.h"
 | |
| 
 | |
| u32 tcache[DRC_TCACHE_SIZE/4];
 | |
| 
 | |
| 
 | |
| 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
 | |
| 
 | |
| }
 | |
| 
 | |
| // 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
 | |
| }
 | |
| 
 |