| 1 |
/* |
| 2 |
* Cisco router simulation platform. |
| 3 |
* Copyright (c) 2005,2006 Christophe Fillot ([email protected]) |
| 4 |
*/ |
| 5 |
|
| 6 |
#ifndef __PCI_IO_H__ |
| 7 |
#define __PCI_IO_H__ |
| 8 |
|
| 9 |
#include "pci_dev.h" |
| 10 |
|
| 11 |
/* PCI I/O data */ |
| 12 |
struct pci_io_data { |
| 13 |
struct vdevice dev; |
| 14 |
struct pci_io_device *dev_list; |
| 15 |
}; |
| 16 |
|
| 17 |
/* Add a new PCI I/O device */ |
| 18 |
struct pci_io_device *pci_io_add(struct pci_io_data *d, |
| 19 |
m_uint32_t start,m_uint32_t end, |
| 20 |
struct vdevice *dev,dev_handler_t handler); |
| 21 |
|
| 22 |
/* Remove a PCI I/O device */ |
| 23 |
void pci_io_remove(struct pci_io_device *dev); |
| 24 |
|
| 25 |
/* Remove PCI I/O space */ |
| 26 |
void pci_io_data_remove(vm_instance_t *vm,struct pci_io_data *d); |
| 27 |
|
| 28 |
/* Initialize PCI I/O space */ |
| 29 |
struct pci_io_data *pci_io_data_init(vm_instance_t *vm,m_uint64_t paddr); |
| 30 |
|
| 31 |
#endif |