1 |
/* |
/* |
2 |
* Cisco 7200 (Predator) simulation platform. |
* Cisco router simulation platform. |
3 |
* Copyright (c) 2006 Christophe Fillot (cf@utc.fr) |
* Copyright (c) 2006 Christophe Fillot (cf@utc.fr) |
4 |
* |
* |
5 |
* PCI I/O space. |
* PCI I/O space. |
11 |
#include <unistd.h> |
#include <unistd.h> |
12 |
#include <sys/types.h> |
#include <sys/types.h> |
13 |
|
|
14 |
#include "mips64.h" |
#include "cpu.h" |
15 |
|
#include "vm.h" |
16 |
#include "dynamips.h" |
#include "dynamips.h" |
17 |
#include "memory.h" |
#include "memory.h" |
18 |
#include "device.h" |
#include "device.h" |
63 |
/* |
/* |
64 |
* pci_io_access() |
* pci_io_access() |
65 |
*/ |
*/ |
66 |
static void *pci_io_access(cpu_mips_t *cpu,struct vdevice *dev, |
static void *pci_io_access(cpu_gen_t *cpu,struct vdevice *dev, |
67 |
m_uint32_t offset,u_int op_size,u_int op_type, |
m_uint32_t offset,u_int op_size,u_int op_type, |
68 |
m_uint64_t *data) |
m_uint64_t *data) |
69 |
{ |
{ |
73 |
#if DEBUG_ACCESS |
#if DEBUG_ACCESS |
74 |
if (op_type == MTS_READ) { |
if (op_type == MTS_READ) { |
75 |
cpu_log(cpu,"PCI_IO","read request at pc=0x%llx, offset=0x%x\n", |
cpu_log(cpu,"PCI_IO","read request at pc=0x%llx, offset=0x%x\n", |
76 |
cpu->pc,offset); |
cpu_get_pc(cpu),offset); |
77 |
} else { |
} else { |
78 |
cpu_log(cpu,"PCI_IO", |
cpu_log(cpu,"PCI_IO", |
79 |
"write request (data=0x%llx) at pc=0x%llx, offset=0x%x\n", |
"write request (data=0x%llx) at pc=0x%llx, offset=0x%x\n", |
80 |
*data,cpu->pc,offset); |
*data,cpu_get_pc(cpu),offset); |
81 |
} |
} |
82 |
#endif |
#endif |
83 |
|
|