diff options
author | Ciro Santilli <ciro.santilli@arm.com> | 2019-10-24 17:35:13 +0100 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@arm.com> | 2019-11-28 11:13:43 +0000 |
commit | bcf041f257623e5c9e77d35b7531bae59edc0423 (patch) | |
tree | 5e9a8c9ec4683df4cff5d8b6e702ccb0a82ae899 /configs | |
parent | 43e9d8745eea637fd3f1f4f42b170384689f9d1c (diff) | |
download | gem5-bcf041f257623e5c9e77d35b7531bae59edc0423.tar.xz |
dev-arm: Automatically assign PCI device ids in attachPciDevice
Simulation scripts currently need to assign PCI device addresses when
adding new devices. This change moves this responsibility to the
VExpress_GEM5_BASE::attachPciDevice method.
Change-Id: I6d62af8a8f9176d964cc011dd8fb9744154bbb87
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22830
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Diffstat (limited to 'configs')
-rw-r--r-- | configs/common/FSConfig.py | 3 | ||||
-rw-r--r-- | configs/example/arm/devices.py | 4 |
2 files changed, 1 insertions, 6 deletions
diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py index b34db4e26..55a6e9118 100644 --- a/configs/common/FSConfig.py +++ b/configs/common/FSConfig.py @@ -365,8 +365,7 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None, # Attach off-chip devices self.realview.attachIO(self.iobus) - for dev_id, dev in enumerate(pci_devices): - dev.pci_bus, dev.pci_dev, dev.pci_func = (0, dev_id + 1, 0) + for dev in pci_devices: self.realview.attachPciDevice( dev, self.iobus, dma_ports=self._dma_ports if ruby else None) diff --git a/configs/example/arm/devices.py b/configs/example/arm/devices.py index 16312eb72..4615daac2 100644 --- a/configs/example/arm/devices.py +++ b/configs/example/arm/devices.py @@ -303,14 +303,10 @@ def simpleSystem(BaseSystem, caches, mem_size, platform=None, **kwargs): self.dmabridge = Bridge(delay='50ns', ranges=[self.mem_ranges[0]]) - self._pci_devices = 0 self._clusters = [] self._num_cpus = 0 def attach_pci(self, dev): - dev.pci_bus, dev.pci_dev, dev.pci_func = \ - (0, self._pci_devices + 1, 0) - self._pci_devices += 1 self.realview.attachPciDevice(dev, self.iobus) def connect(self): |