16 |
#include <pthread.h> |
#include <pthread.h> |
17 |
|
|
18 |
#include "ptask.h" |
#include "ptask.h" |
19 |
#include "mips64.h" |
#include "cpu.h" |
20 |
|
#include "vm.h" |
21 |
#include "dynamips.h" |
#include "dynamips.h" |
22 |
#include "memory.h" |
#include "memory.h" |
23 |
#include "device.h" |
#include "device.h" |
109 |
/* |
/* |
110 |
* dev_ns16552_access() |
* dev_ns16552_access() |
111 |
*/ |
*/ |
112 |
void *dev_ns16552_access(cpu_mips_t *cpu,struct vdevice *dev,m_uint32_t offset, |
void *dev_ns16552_access(cpu_gen_t *cpu,struct vdevice *dev,m_uint32_t offset, |
113 |
u_int op_size,u_int op_type,m_uint64_t *data) |
u_int op_size,u_int op_type,m_uint64_t *data) |
114 |
{ |
{ |
115 |
struct ns16552_data *d = dev->priv_data; |
struct ns16552_data *d = dev->priv_data; |
121 |
|
|
122 |
#if DEBUG_ACCESS |
#if DEBUG_ACCESS |
123 |
if (op_type == MTS_READ) { |
if (op_type == MTS_READ) { |
124 |
cpu_log(cpu,"NS16552","read from 0x%x, pc=0x%llx, ra=0x%llx\n", |
cpu_log(cpu,"NS16552","read from 0x%x, pc=0x%llx\n", |
125 |
offset,cpu->pc,cpu->gpr[MIPS_GPR_RA]); |
offset,cpu_get_pc(cpu)); |
126 |
} else { |
} else { |
127 |
cpu_log(cpu,"NS16552","write to 0x%x, value=0x%llx, pc=0x%llx\n", |
cpu_log(cpu,"NS16552","write to 0x%x, value=0x%llx, pc=0x%llx\n", |
128 |
offset,*data,cpu->pc); |
offset,*data,cpu_get_pc(cpu)); |
129 |
} |
} |
130 |
#endif |
#endif |
131 |
|
|
203 |
default: |
default: |
204 |
if (op_type == MTS_READ) { |
if (op_type == MTS_READ) { |
205 |
cpu_log(cpu,"NS16552","read from addr 0x%x, pc=0x%llx (size=%u)\n", |
cpu_log(cpu,"NS16552","read from addr 0x%x, pc=0x%llx (size=%u)\n", |
206 |
offset,cpu->pc,op_size); |
offset,cpu_get_pc(cpu),op_size); |
207 |
} else { |
} else { |
208 |
cpu_log(cpu,"NS16552","write to addr 0x%x, value=0x%llx, " |
cpu_log(cpu, |
209 |
"pc=0x%llx (size=%u)\n",offset,*data,cpu->pc,op_size); |
"NS16552","write to addr 0x%x, value=0x%llx, " |
210 |
|
"pc=0x%llx (size=%u)\n", |
211 |
|
offset,*data,cpu_get_pc(cpu),op_size); |
212 |
} |
} |
213 |
#endif |
#endif |
214 |
} |
} |