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.


updated ramdisk with initial pci placeholders
Jack Lange [Wed, 18 Mar 2009 00:21:04 +0000 (19:21 -0500)]
palacios/include/devices/ide.h
palacios/src/devices/ramdisk.c

index b43d4a6..b667a03 100644 (file)
@@ -41,7 +41,7 @@
 
 
 #include <palacios/vmm_types.h>
-
+#include <palacios/vm_dev.h>
 
 typedef long off_t;
 typedef sint32_t ssize_t;
@@ -179,6 +179,8 @@ struct controller_t  {
     Bit8u    sectors_per_block;
     Bit8u    lba_mode;
 
+    struct vm_device * pci;
+
     struct  {
        rd_bool reset;       // 0=normal, 1=reset controller
        rd_bool disable_irq;     // 0=allow irq, 1=disable irq
index cb92ca9..7ad7f9b 100644 (file)
@@ -40,7 +40,7 @@
 #include <palacios/vmm.h>
 #include <devices/cdrom.h>
 #include <devices/ide.h>
-
+#include <devices/pci.h>
 
 #ifndef TRACE_RAMDISK
 #undef PrintTrace
@@ -2304,6 +2304,33 @@ static void rd_command_aborted(struct vm_device * dev,
 }
 
 
+/*    
+static void init_pci(struct ramdisk_t * ramdisk) {
+struct v3_pci_bar bars[6];
+    struct pci_device * pci_dev;
+    int i;
+    
+    for (i = 0; i < 6; i++) {
+       bars[i].type = PCI_BAR_NONE;
+       bars[i].mem_hook = 0;
+       bars[i].num_pages = 0;
+       bars[i].bar_update = NULL;
+    }
+
+    bars[4].type = PCI_BAR_MEM32;
+    bars[4].mem_hook = 0;
+    bars[4].num_pages = 1;
+    bars[4].bar_update = NULL;
+
+    pci_dev = v3_pci_register_device(ramdisk->pci, PCI_STD_DEVICE, 0, "IDE", -1, bars, NULL, NULL, NULL, NULL);
+
+
+    pci_dev->config_header.vendor_id = 0x8086;
+    pci_dev->config_header.device_id = 0x2421;
+
+
+}
+    */
 static int ramdisk_init_device(struct vm_device *dev) {
     struct ramdisk_t *ramdisk= (struct ramdisk_t *)dev->private_data;
 
@@ -2364,6 +2391,8 @@ static int ramdisk_init_device(struct vm_device *dev) {
 
 
 
+
+
     return 0;
 
 }
@@ -2386,17 +2415,21 @@ static struct vm_device_ops dev_ops = {
 
 
 
-struct vm_device * v3_create_ramdisk()
+struct vm_device * v3_create_ramdisk(struct vm_device * pci)
 {
 
     struct ramdisk_t *ramdisk;
     ramdisk = (struct ramdisk_t *)V3_Malloc(sizeof(struct ramdisk_t));  
     V3_ASSERT(ramdisk != NULL);  
 
+    //    ramdisk->pci = pci;
+
     PrintDebug("[create_ramdisk]\n");
 
     struct vm_device * device = v3_create_device("RAMDISK", &dev_ops, ramdisk);
 
+    
+
     return device;
 }