提交 7bf5be70 编写于 作者: B bellard

pci memory mapping fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@844 c046a42c-6fe2-441c-8c8c-71466251a162
上级 fb9f9444
......@@ -214,7 +214,7 @@ void pci_default_write_config(PCIDevice *d,
uint32_t address, uint32_t val, int len)
{
int can_write, i;
uint32_t end;
uint32_t end, addr;
if (len == 4 && (address >= 0x10 && address < 0x10 + 4 * 6)) {
PCIIORegion *r;
......@@ -233,9 +233,10 @@ void pci_default_write_config(PCIDevice *d,
}
default_config:
/* not efficient, but simple */
addr = address;
for(i = 0; i < len; i++) {
/* default read/write accesses */
switch(address) {
switch(addr) {
case 0x00:
case 0x01:
case 0x02:
......@@ -253,9 +254,9 @@ void pci_default_write_config(PCIDevice *d,
break;
}
if (can_write) {
d->config[address] = val;
d->config[addr] = val;
}
address++;
addr++;
val >>= 8;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册