1 |
/* |
/* |
2 |
* Cisco 7200 (Predator) simulation platform. |
* Cisco router simulation platform. |
3 |
* Copyright (c) 2005 Christophe Fillot (cf@utc.fr) |
* Copyright (c) 2005 Christophe Fillot (cf@utc.fr) |
4 |
* |
* |
5 |
* SB-1 system control devices. |
* SB-1 system control devices. |
15 |
#include <fcntl.h> |
#include <fcntl.h> |
16 |
#include <pthread.h> |
#include <pthread.h> |
17 |
|
|
18 |
#include "mips64.h" |
#include "cpu.h" |
19 |
|
#include "vm.h" |
20 |
#include "dynamips.h" |
#include "dynamips.h" |
21 |
#include "memory.h" |
#include "memory.h" |
22 |
#include "device.h" |
#include "device.h" |
36 |
/* |
/* |
37 |
* dev_sb1_access() |
* dev_sb1_access() |
38 |
*/ |
*/ |
39 |
void *dev_sb1_access(cpu_mips_t *cpu,struct vdevice *dev, |
void *dev_sb1_access(cpu_gen_t *cpu,struct vdevice *dev, |
40 |
m_uint32_t offset,u_int op_size,u_int op_type, |
m_uint32_t offset,u_int op_size,u_int op_type, |
41 |
m_uint64_t *data) |
m_uint64_t *data) |
42 |
{ |
{ |
61 |
default: |
default: |
62 |
if (op_type == MTS_READ) { |
if (op_type == MTS_READ) { |
63 |
cpu_log(cpu,"SB1","read from addr 0x%x, pc=0x%llx\n", |
cpu_log(cpu,"SB1","read from addr 0x%x, pc=0x%llx\n", |
64 |
offset,cpu->pc); |
offset,cpu_get_pc(cpu)); |
65 |
} else { |
} else { |
66 |
cpu_log(cpu,"SB1","write to addr 0x%x, value=0x%llx, pc=0x%llx\n", |
cpu_log(cpu,"SB1","write to addr 0x%x, value=0x%llx, pc=0x%llx\n", |
67 |
offset,*data,cpu->pc); |
offset,*data,cpu_get_pc(cpu)); |
68 |
} |
} |
69 |
#endif |
#endif |
70 |
} |
} |