From: Lei Xia Date: Mon, 16 Mar 2009 19:08:52 +0000 (-0500) Subject: Add handle of write to command register X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=3394f4121b3d8258c2f83585d54452b63f91c7b1 Add handle of write to command register --- diff --git a/palacios/src/devices/pci.c b/palacios/src/devices/pci.c index 4b2566c..8170e6e 100644 --- a/palacios/src/devices/pci.c +++ b/palacios/src/devices/pci.c @@ -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 }