12 |
#include <errno.h> |
#include <errno.h> |
13 |
#include <unistd.h> |
#include <unistd.h> |
14 |
|
|
15 |
#include "mips64.h" |
#include "cpu.h" |
16 |
|
#include "vm.h" |
17 |
#include "dynamips.h" |
#include "dynamips.h" |
18 |
#include "memory.h" |
#include "memory.h" |
19 |
#include "device.h" |
#include "device.h" |
35 |
/* |
/* |
36 |
* dev_bootflash_access() |
* dev_bootflash_access() |
37 |
*/ |
*/ |
38 |
void *dev_flash_access(cpu_mips_t *cpu,struct vdevice *dev, |
void *dev_flash_access(cpu_gen_t *cpu,struct vdevice *dev, |
39 |
m_uint32_t offset,u_int op_size,u_int op_type, |
m_uint32_t offset,u_int op_size,u_int op_type, |
40 |
m_uint64_t *data) |
m_uint64_t *data) |
41 |
{ |
{ |
45 |
if (op_type == MTS_READ) { |
if (op_type == MTS_READ) { |
46 |
cpu_log(cpu,dev->name, |
cpu_log(cpu,dev->name, |
47 |
"read access to offset=0x%x, pc=0x%llx (state=%u)\n", |
"read access to offset=0x%x, pc=0x%llx (state=%u)\n", |
48 |
offset,cpu->pc,d->state); |
offset,cpu_get_pc(cpu),d->state); |
49 |
} else { |
} else { |
50 |
cpu_log(cpu,dev->name, |
cpu_log(cpu,dev->name, |
51 |
"write access to vaddr=0x%x, pc=0x%llx, val=0x%llx (state=%d)\n", |
"write access to vaddr=0x%x, pc=0x%llx, val=0x%llx (state=%d)\n", |
52 |
offset,cpu->pc,*data,d->state); |
offset,cpu_get_pc(cpu),*data,d->state); |
53 |
} |
} |
54 |
#endif |
#endif |
55 |
|
|