summaryrefslogtreecommitdiff
path: root/src/cpu/base.hh
diff options
context:
space:
mode:
authorDavid Guillen Fandos <david.guillen@arm.com>2016-06-06 17:16:43 +0100
committerDavid Guillen Fandos <david.guillen@arm.com>2016-06-06 17:16:43 +0100
commitfb5fc11da49938660ea22c336964677cdba890e1 (patch)
tree321c3c2a60e6e5f317904cc89971700d939cc5ec /src/cpu/base.hh
parentd4342aff4ce347ad8ab5a01fdd41993106cd3ece (diff)
downloadgem5-fb5fc11da49938660ea22c336964677cdba890e1.tar.xz
pwr: Low-power idle power state for idle CPUs
Add functionality to the BaseCPU that will put the entire CPU into a low-power idle state whenever all threads in it are idle. Change-Id: I984d1656eb0a4863c87ceacd773d2d10de5cfd2b
Diffstat (limited to 'src/cpu/base.hh')
-rw-r--r--src/cpu/base.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index 748602c25..6622339e0 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -279,10 +279,11 @@ class BaseCPU : public MemObject
Trace::InstTracer * getTracer() { return tracer; }
/// Notify the CPU that the indicated context is now active.
- virtual void activateContext(ThreadID thread_num) {}
+ virtual void activateContext(ThreadID thread_num);
/// Notify the CPU that the indicated context is now suspended.
- virtual void suspendContext(ThreadID thread_num) {}
+ /// Check if possible to enter a lower power state
+ virtual void suspendContext(ThreadID thread_num);
/// Notify the CPU that the indicated context is now halted.
virtual void haltContext(ThreadID thread_num) {}