From: Jack Lange Date: Mon, 16 Mar 2009 18:54:04 +0000 (-0500) Subject: added writable register list X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=3c86fc75c137455a3cc45d7383c6bca69a4f7168 added writable register list --- diff --git a/palacios/src/devices/pci.c b/palacios/src/devices/pci.c index da7901a..ef57cdb 100644 --- a/palacios/src/devices/pci.c +++ b/palacios/src/devices/pci.c @@ -315,6 +315,21 @@ static int data_port_read(ushort_t port, void * dst, uint_t length, struct vm_de static inline int is_cfg_reg_writable(uchar_t header_type, int reg_num) { if (header_type == 0x00) { switch (reg_num) { + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x08: + case 0x09: + case 0x0a: + case 0x0b: + case 0x0e: + case 0x3d: + return 0; + + default: + return 1; + // case (non writable reg list): default: @@ -374,6 +389,7 @@ static int data_port_write(ushort_t port, void * src, uint_t length, struct vm_d // COMMAND update } else if (cur_reg == 0x0f) { // BIST update + pci_dev->config_header.BIST = 0x00; } } } @@ -602,7 +618,7 @@ struct pci_device * v3_pci_register_device(struct vm_device * pci, } memset(pci_dev, 0, sizeof(struct pci_device)); - + pci_dev->bus_num = bus_num; pci_dev->dev_num = dev_num;