Yu-hsin Wang has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/36379 )
Change subject: dev-arm: Fix VExpressFastmodel timer configs
......................................................................
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 <[email protected]>
Maintainer: Giacomo Travaglini <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py
M src/dev/arm/VExpressFastmodel.py
2 files changed, 28 insertions(+), 6 deletions(-)
Approvals:
Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py
b/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py
index 65d57a1..0b0fa8d 100644
--- a/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py
+++ b/src/arch/arm/fastmodel/CortexA76/FastModelCortexA76.py
@@ -34,6 +34,7 @@
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 @@
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>'
diff --git a/src/dev/arm/VExpressFastmodel.py
b/src/dev/arm/VExpressFastmodel.py
index 015f6d4..a6b9b34 100644
--- a/src/dev/arm/VExpressFastmodel.py
+++ b/src/dev/arm/VExpressFastmodel.py
@@ -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 @@
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:
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/36379
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I6ec7f9749546df3e8f125a5b96e7ed83cab2ea56
Gerrit-Change-Number: 36379
Gerrit-PatchSet: 10
Gerrit-Owner: Yu-hsin Wang <[email protected]>
Gerrit-Reviewer: Earl Ou <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Yu-hsin Wang <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s