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.


Add handle of write to command register
Lei Xia [Mon, 16 Mar 2009 19:08:52 +0000 (14:08 -0500)]
palacios/src/devices/pci.c

index 4b2566c..8170e6e 100644 (file)
@@ -370,8 +370,16 @@ static int data_port_write(ushort_t port, void * src, uint_t length, struct vm_d
                }
            } else if ((cur_reg >= 0x30) && (cur_reg < 0x34)) {
                pci_dev->ext_rom_updated = 1;
-           } else if ((cur_reg == 0x04) || (cur_reg == 0x05)) {
-               // COMMAND update
+           } else if (cur_reg == 0x04) {
+             // COMMAND update      
+             uint8_t command = *((uint8_t *)src + i);
+
+             pci_dev->config_space[cur_reg] = command;       
+
+             if (pci_dev->cmd_update) {
+               pci_dev->cmd_update(pci_dev, (command & 0x01), (command & 0x02));
+             }
+             
            } else if (cur_reg == 0x0f) {
                // BIST update
            }