28 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
29 |
* |
* |
30 |
* |
* |
31 |
* $Id: cpu_m68k.h,v 1.3 2005/08/28 20:16:24 debug Exp $ |
* $Id: cpu_m68k.h,v 1.6 2005/10/27 14:01:15 debug Exp $ |
32 |
*/ |
*/ |
33 |
|
|
34 |
#include "misc.h" |
#include "misc.h" |
55 |
|
|
56 |
/* Translation cache struct for each physical page: */ |
/* Translation cache struct for each physical page: */ |
57 |
struct m68k_tc_physpage { |
struct m68k_tc_physpage { |
58 |
|
struct m68k_instr_call ics[M68K_IC_ENTRIES_PER_PAGE + 1]; |
59 |
uint32_t next_ofs; /* or 0 for end of chain */ |
uint32_t next_ofs; /* or 0 for end of chain */ |
60 |
uint32_t physaddr; |
uint32_t physaddr; |
61 |
int flags; |
int flags; |
|
struct m68k_instr_call ics[M68K_IC_ENTRIES_PER_PAGE + 1]; |
|
62 |
}; |
}; |
63 |
|
|
64 |
|
|
109 |
unsigned char *host_store[M68K_N_VPH_ENTRIES]; |
unsigned char *host_store[M68K_N_VPH_ENTRIES]; |
110 |
uint32_t phys_addr[M68K_N_VPH_ENTRIES]; |
uint32_t phys_addr[M68K_N_VPH_ENTRIES]; |
111 |
struct m68k_tc_physpage *phys_page[M68K_N_VPH_ENTRIES]; |
struct m68k_tc_physpage *phys_page[M68K_N_VPH_ENTRIES]; |
112 |
|
|
113 |
|
uint32_t phystranslation[M68K_N_VPH_ENTRIES/32]; |
114 |
}; |
}; |
115 |
|
|
116 |
|
|
117 |
/* cpu_m68k.c: */ |
/* cpu_m68k.c: */ |
118 |
void m68k_update_translation_table(struct cpu *cpu, uint64_t vaddr_page, |
void m68k_update_translation_table(struct cpu *cpu, uint64_t vaddr_page, |
119 |
unsigned char *host_page, int writeflag, uint64_t paddr_page); |
unsigned char *host_page, int writeflag, uint64_t paddr_page); |
120 |
void m68k_invalidate_translation_caches_paddr(struct cpu *cpu, uint64_t, int); |
void m68k_invalidate_translation_caches(struct cpu *cpu, uint64_t, int); |
121 |
void m68k_invalidate_code_translation(struct cpu *cpu, uint64_t, int); |
void m68k_invalidate_code_translation(struct cpu *cpu, uint64_t, int); |
122 |
int m68k_memory_rw(struct cpu *cpu, struct memory *mem, uint64_t vaddr, |
int m68k_memory_rw(struct cpu *cpu, struct memory *mem, uint64_t vaddr, |
123 |
unsigned char *data, size_t len, int writeflag, int cache_flags); |
unsigned char *data, size_t len, int writeflag, int cache_flags); |