diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-04-18 16:55:22 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-04-18 16:55:22 +0000 |
commit | d7ce493a38680aeb9283129cf4f4ea576da62997 (patch) | |
tree | 3ebe49ec6a3d7248585420ea5d3c168f1d086d81 /hw/pci.c | |
parent | 6a8826434fb98d7bcf870d9f3e2e90a672bc9f03 (diff) | |
download | qemu-d7ce493a38680aeb9283129cf4f4ea576da62997.zip qemu-d7ce493a38680aeb9283129cf4f4ea576da62997.tar.gz qemu-d7ce493a38680aeb9283129cf4f4ea576da62997.tar.bz2 |
Initialize PCI BAR config data.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1824 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pci.c')
-rw-r--r-- | hw/pci.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) |