Curtis Dunham has submitted this change and it was merged. ( https://gem5-review.googlesource.com/4960 )

Change subject: arm: make Arm GenericTimer a ClockedObject
......................................................................

arm: make Arm GenericTimer a ClockedObject

Within a device tree, the GenericTimer device needs to point (via phandle)
to a clock domain which is itself also an object in the device tree. Within
gem5, clock domains are managed by making all clocked SimObjects inherit
from ClockedObject rather than SimObject.

Without this change, the GenericTimer is unable to generate the appropriate
clock domain phandle, and will crash during DTB autogeneration.

Change-Id: I6d3fb6362847c6a01720b2f14b3d595d1e59f01f
Reviewed-by: Andreas Sandberg <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/4960
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
---
M src/dev/arm/RealView.py
M src/dev/arm/generic_timer.cc
M src/dev/arm/generic_timer.hh
3 files changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved



diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py
index 699b7df..cd7772f 100644
--- a/src/dev/arm/RealView.py
+++ b/src/dev/arm/RealView.py
@@ -54,6 +54,7 @@
 from SimpleMemory import SimpleMemory
 from Gic import *
 from EnergyCtrl import EnergyCtrl
+from ClockedObject import ClockedObject
 from ClockDomain import SrcClockDomain
 from SubSystem import SubSystem
 from Graphics import ImageFormat
@@ -247,7 +248,7 @@
     int_num_timer = Param.UInt32("Interrrupt number used per-cpu to GIC")
int_num_watchdog = Param.UInt32("Interrupt number for per-cpu watchdog to GIC")

-class GenericTimer(SimObject):
+class GenericTimer(ClockedObject):
     type = 'GenericTimer'
     cxx_header = "dev/arm/generic_timer.hh"
     system = Param.ArmSystem(Parent.any, "system")
diff --git a/src/dev/arm/generic_timer.cc b/src/dev/arm/generic_timer.cc
index f8433bd..73e4f91 100644
--- a/src/dev/arm/generic_timer.cc
+++ b/src/dev/arm/generic_timer.cc
@@ -239,7 +239,7 @@


 GenericTimer::GenericTimer(GenericTimerParams *p)
-    : SimObject(p),
+    : ClockedObject(p),
       system(*p->system),
       gic(p->gic),
       irqPhys(p->int_phys),
diff --git a/src/dev/arm/generic_timer.hh b/src/dev/arm/generic_timer.hh
index ccfb127..c9cfb74 100644
--- a/src/dev/arm/generic_timer.hh
+++ b/src/dev/arm/generic_timer.hh
@@ -226,7 +226,7 @@
     }
 };

-class GenericTimer : public SimObject
+class GenericTimer : public ClockedObject
 {
   public:
     GenericTimer(GenericTimerParams *p);

--
To view, visit https://gem5-review.googlesource.com/4960
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6d3fb6362847c6a01720b2f14b3d595d1e59f01f
Gerrit-Change-Number: 4960
Gerrit-PatchSet: 6
Gerrit-Owner: Curtis Dunham <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Curtis Dunham <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to