dev-arm: Fix VExpressFastmodel timer configs
generic_timer is no longer in the return value of _on_chip_devices. We should correct the _on_chip_devices. Furthermore, to prevent the timer conflict with the fastmodel, we should remove unwanted timer. Change-Id: I6ec7f9749546df3e8f125a5b96e7ed83cab2ea56 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36379 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -34,6 +34,7 @@ from m5.objects.FastModelGIC import Gicv3CommsTargetSocket
|
||||
from m5.objects.Gic import ArmPPI
|
||||
from m5.objects.Iris import IrisBaseCPU
|
||||
from m5.objects.SystemC import SystemC_ScModule
|
||||
from m5.util.fdthelper import FdtNode, FdtPropertyWords
|
||||
|
||||
class FastModelCortexA76(IrisBaseCPU):
|
||||
type = 'FastModelCortexA76'
|
||||
@@ -348,6 +349,21 @@ class FastModelCortexA76Cluster(SimObject):
|
||||
walk_cache_latency = Param.UInt64(0, "Walk cache latency for TA (Timing "\
|
||||
"Annotation), expressed in simulation ticks")
|
||||
|
||||
def generateDeviceTree(self, state):
|
||||
node = FdtNode("timer")
|
||||
|
||||
node.appendCompatible(["arm,cortex-a15-timer",
|
||||
"arm,armv7-timer",
|
||||
"arm,armv8-timer"])
|
||||
node.append(FdtPropertyWords("interrupts", [
|
||||
1, int(self.cntpsirq.num), 0xf08,
|
||||
1, int(self.cntpnsirq.num), 0xf08,
|
||||
1, int(self.cntvirq.num), 0xf08,
|
||||
1, int(self.cnthpirq.num), 0xf08,
|
||||
]))
|
||||
|
||||
yield node
|
||||
|
||||
class FastModelScxEvsCortexA76x1(SystemC_ScModule):
|
||||
type = 'FastModelScxEvsCortexA76x1'
|
||||
cxx_class = 'FastModel::ScxEvsCortexA76<FastModel::ScxEvsCortexA76x1Types>'
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
from m5.objects.FastModelGIC import FastModelGIC, SCFastModelGIC
|
||||
from m5.objects.Gic import ArmSPI
|
||||
from m5.objects.RealView import VExpress_GEM5_Base, HDLcd
|
||||
from m5.objects.SubSystem import SubSystem
|
||||
|
||||
class VExpressFastmodel(VExpress_GEM5_Base):
|
||||
gic = FastModelGIC(
|
||||
@@ -39,14 +40,19 @@ class VExpressFastmodel(VExpress_GEM5_Base):
|
||||
pxl_clk=VExpress_GEM5_Base.dcc.osc_pxl, pio_addr=0x2b000000,
|
||||
interrupt=ArmSPI(num=95))
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(VExpressFastmodel, self).__init__(*args, **kwargs)
|
||||
# Remove original timer to prevent from possible conflict with Fastmodel
|
||||
# timer.
|
||||
generic_timer = SubSystem()
|
||||
generic_timer_mem = SubSystem()
|
||||
sys_counter = SubSystem()
|
||||
|
||||
def _on_chip_devices(self):
|
||||
devices = super(VExpressFastmodel, self)._on_chip_devices()
|
||||
devices += [ self.gic, self.hdlcd ]
|
||||
devices.remove(self.generic_timer)
|
||||
return devices
|
||||
return [
|
||||
self.gic,
|
||||
self.hdlcd,
|
||||
self.system_watchdog,
|
||||
self.trusted_watchdog,
|
||||
]
|
||||
|
||||
def setupBootLoader(self, cur_sys, loc, boot_loader=None):
|
||||
if boot_loader is None:
|
||||
|
||||
Reference in New Issue
Block a user