dev-arm: SMMUv3, single interconnect attachment
The attachment (port binding) of the SMMUv3 master and control ports is independent of the connection of device masters to it. This behaviour is now moved from SMMUv3::connect to RealView::attachSmmu, as it is a responsibility of the Platform designer. This fixes crashes when connecting multiple device masters. Change-Id: If1e8f55d51876fe761f881e3044ffec637c21b09 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26923 Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com>
This commit is contained in:
@@ -1075,10 +1075,13 @@ Interrupts:
|
||||
|
||||
self.smmu = SMMUv3(reg_map=AddrRange(0x2b400000, size=0x00020000))
|
||||
|
||||
self.smmu.master = bus.slave
|
||||
self.smmu.control = bus.master
|
||||
|
||||
dma_ports = []
|
||||
for dev in devices:
|
||||
self._attach_device(dev, bus, dma_ports)
|
||||
self.smmu.connect(dev, bus)
|
||||
self.smmu.connect(dev)
|
||||
|
||||
def setupBootLoader(self, cur_sys, boot_loader):
|
||||
super(VExpress_GEM5_Base, self).setupBootLoader(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2013, 2018-2019 ARM Limited
|
||||
# Copyright (c) 2013, 2018-2020 ARM Limited
|
||||
# All rights reserved
|
||||
#
|
||||
# The license below extends only to copyright in the software and shall
|
||||
@@ -182,7 +182,7 @@ class SMMUv3(ClockedObject):
|
||||
node.appendPhandle(self)
|
||||
yield node
|
||||
|
||||
def connect(self, device, bus):
|
||||
def connect(self, device):
|
||||
"""
|
||||
Helper method used to connect the SMMU. The master could
|
||||
be either a dma port (if the SMMU is attached directly to a
|
||||
@@ -190,9 +190,6 @@ class SMMUv3(ClockedObject):
|
||||
is attached to a bridge).
|
||||
"""
|
||||
|
||||
self.master = bus.slave
|
||||
self.control = bus.master
|
||||
|
||||
slave_interface = SMMUv3SlaveInterface()
|
||||
|
||||
if hasattr(device, "master"):
|
||||
|
||||
Reference in New Issue
Block a user