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.


added PCI subclass and class codes to clear up the opaque PCI configuration stuff....
Jack Lange [Thu, 23 Jul 2009 20:06:19 +0000 (15:06 -0500)]
palacios/src/devices/i440fx.c
palacios/src/devices/ide.c

index 4f7b48f..d631235 100644 (file)
@@ -66,7 +66,7 @@ static int i440_init(struct vm_device * dev) {
     pci_dev->config_header.device_id = 0x1237;
     pci_dev->config_header.revision = 0x02;
     pci_dev->config_header.subclass = 0x00; //  SubClass: host2pci
-    pci_dev->config_header.class = 0x06;    // Class: PCI bridge
+    pci_dev->config_header.class = PCI_CLASS_BRIDGE;    // Class: PCI bridge
 
     pci_dev->config_space[0x72] = 0x02; // SMRAM (?)
 
index d661648..17d9461 100644 (file)
@@ -1536,9 +1536,9 @@ static int init_ide(struct vm_device * dev) {
        pci_dev->config_header.device_id = 0x7010;
        pci_dev->config_header.revision = 0x00;
 
-       pci_dev->config_header.prog_if = 0x80;
-       pci_dev->config_header.subclass = 0x01;
-       pci_dev->config_header.class = 0x01;
+       pci_dev->config_header.prog_if = 0x80; // Master IDE device
+       pci_dev->config_header.subclass = PCI_STORAGE_SUBCLASS_IDE;
+       pci_dev->config_header.class = PCI_CLASS_STORAGE;
 
        pci_dev->config_header.command = 0;
        pci_dev->config_header.status = 0x0280;
@@ -1575,8 +1575,6 @@ struct vm_device *  v3_create_ide(struct vm_device * pci_bus, struct vm_device *
 
     memset(ide, 0, sizeof(struct ide_internal));
 
-    struct vm_device * device = v3_create_device("IDE", &dev_ops, ide);
-
     if (pci_bus != NULL) {
        if (southbridge_dev == NULL) {
            PrintError("PCI Enabled BUT southbridge is NULL\n");
@@ -1590,7 +1588,7 @@ struct vm_device *  v3_create_ide(struct vm_device * pci_bus, struct vm_device *
 
     PrintDebug("IDE: Creating IDE bus x 2\n");
 
-    return device;
+    return v3_create_device("IDE", &dev_ops, ide);
 }