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 31e09ad..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 {