Search
lxdream.org :: lxdream/src/mem.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/mem.h
changeset 939:6f2302afeb89
prev934:3acd3b3ee6d1
next946:d41ee7994db7
author nkeynes
date Sat Jan 03 03:30:26 2009 +0000 (13 years ago)
branchlxdream-mem
permissions -rw-r--r--
last change MMU work-in-progress
* Move SDRAM out into separate sdram.c
* Move all page-table management into mmu.c
* Convert UTLB management to use the new page-tables
* Rip out all calls to mmu_vma_to_phys_* and replace with direct access
file annotate diff log raw
1.1 --- a/src/mem.h Fri Dec 26 14:25:23 2008 +0000
1.2 +++ b/src/mem.h Sat Jan 03 03:30:26 2009 +0000
1.3 @@ -28,6 +28,17 @@
1.4 extern "C" {
1.5 #endif
1.6
1.7 +
1.8 +typedef FASTCALL int32_t (*mem_read_fn_t)(sh4addr_t);
1.9 +typedef FASTCALL void (*mem_write_fn_t)(sh4addr_t, uint32_t);
1.10 +typedef FASTCALL void (*mem_read_burst_fn_t)(unsigned char *,sh4addr_t);
1.11 +typedef FASTCALL void (*mem_write_burst_fn_t)(sh4addr_t,unsigned char *);
1.12 +
1.13 +typedef FASTCALL int32_t (*mem_read_exc_fn_t)(sh4addr_t, void *);
1.14 +typedef FASTCALL void (*mem_write_exc_fn_t)(sh4addr_t, uint32_t, void *);
1.15 +typedef FASTCALL void (*mem_read_burst_exc_fn_t)(unsigned char *,sh4addr_t, void *);
1.16 +typedef FASTCALL void (*mem_write_burst_exc_fn_t)(sh4addr_t,unsigned char *, void *);
1.17 +
1.18 /**
1.19 * Basic memory region vtable - read/write at byte, word, long, and burst
1.20 * (32-byte) sizes.
1.21 @@ -141,6 +152,11 @@
1.22 #define SIGNEXT48(n) ((((int64_t)(n))<<16)>>16)
1.23 #define ZEROEXT32(n) ((int64_t)((uint64_t)((uint32_t)(n))))
1.24
1.25 +/* Ensure the given region allows all of read/write/execute. If not
1.26 + * page-aligned, some surrounding regions will similarly be unprotected.
1.27 + */
1.28 +void mem_unprotect( void *ptr, uint32_t size );
1.29 +
1.30 #ifdef __cplusplus
1.31 }
1.32 #endif
.