projects
/
qemu
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a88264
)
Initialize PCI BAR config data.
author
pbrook
<pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 18 Apr 2006 16:55:22 +0000
(16:55 +0000)
committer
pbrook
<pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 18 Apr 2006 16:55:22 +0000
(16:55 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1824
c046a42c
-6fe2-441c-8c8c-
71466251a162
hw/pci.c
patch
|
blob
|
history
diff --git
a/hw/pci.c
b/hw/pci.c
index
fd4ccd9
..
30342d4
100644
(file)
--- a/
hw/pci.c
+++ b/
hw/pci.c
@@
-124,6
+124,7
@@
void pci_register_io_region(PCIDevice *pci_dev, int region_num,
PCIMapIORegionFunc *map_func)
{
PCIIORegion *r;
+ uint32_t addr;
if ((unsigned int)region_num >= PCI_NUM_REGIONS)
return;
@@
-132,6
+133,12
@@
void pci_register_io_region(PCIDevice *pci_dev, int region_num,
r->size = size;
r->type = type;
r->map_func = map_func;
+ if (region_num == PCI_ROM_SLOT) {
+ addr = 0x30;
+ } else {
+ addr = 0x10 + region_num * 4;
+ }
+ *(uint32_t *)(pci_dev->config + addr) = cpu_to_le32(type);
}
static void pci_addr_writel(void* opaque, uint32_t addr, uint32_t val)