Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


modified pci io hooks to not use the dev_io hooks, which are too constrictive
[palacios.git] / palacios / include / devices / pci.h
index 7ab67c2..68ac2dc 100644 (file)
@@ -63,10 +63,12 @@ struct v3_pci_bar {
        struct {
            int num_ports;
            uint16_t default_base_port;
-           int (*io_read)(ushort_t port, void * dst, uint_t length, struct vm_device * dev);
-           int (*io_write)(ushort_t port, void * src, uint_t length, struct vm_device * dev);
+           int (*io_read)(ushort_t port, void * dst, uint_t length, void * private_data);
+           int (*io_write)(ushort_t port, void * src, uint_t length, void * private_data);
        };
     };
+    
+    void * private_data;
 
     // Internal PCI data
     uint32_t val;
@@ -75,8 +77,11 @@ struct v3_pci_bar {
 };
 
 
-#define PCI_IO_BASE(bar_val) (bar_val & 0xfffffffc)
-#define PCI_MEM32_BASE(bar_val) (bar_val & 0xfffffff0)
+#define PCI_IO_MASK 0xfffffffc
+#define PCI_MEM32_MASK 0xfffffff0
+
+#define PCI_IO_BASE(bar_val) (bar_val & PCI_IO_MASK)
+#define PCI_MEM32_BASE(bar_val) (bar_val & PCI_MEM32_MASK)
 
 struct pci_device {
 
@@ -120,8 +125,8 @@ struct pci_device {
 
 
 int v3_pci_set_irq_bridge(struct vm_device * pci_bus, int bus_num,
-                         int (*raise_pci_irq)(struct vm_device * dev, uint_t intr_line), 
-                         int (*lower_pci_irq)(struct vm_device * dev, uint_t intr_line), 
+                         int (*raise_pci_irq)(struct vm_device * dev, struct pci_device * pci_dev), 
+                         int (*lower_pci_irq)(struct vm_device * dev, struct pci_device * pci_dev), 
                          struct vm_device * bridge_dev);