diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-02-28 18:41:04 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-02-28 18:41:04 -0500 |
commit | 26d7b5a4d1ee06ce314093facdbef6389ee1ec55 (patch) | |
tree | e3ad5f0bf1052d6b45b01267657cdbe5951b9e2a /cpu/exec_context.hh | |
parent | 29f50d934549f10b073a5492bd0d441d71534ace (diff) | |
download | gem5-26d7b5a4d1ee06ce314093facdbef6389ee1ec55.tar.xz |
Add quiesceNs, quiesceTime, quiesceCycles, and m5panic pseudo ops.
This changeset removes a check that prevents quiescing when an
interrupt is pending. *** You should only call quiesce if that
isn't a problem. ***
arch/alpha/isa/decoder.isa:
sim/pseudo_inst.cc:
sim/pseudo_inst.hh:
Add quiesceNs, quiesceCycles, quisceTime and m5panic pseudo ops.
These quiesce for a number of ns, cycles, report how long
we were quiesced for, and panic the simulator respectively.
The latter is added to the panic() function in the console and linux
kernel instead of executing an infinite loop until someone notices.
cpu/exec_context.cc:
cpu/exec_context.hh:
Add a quiesce end event to the execution contexted which upon
executing wakes up a CPU for quiesceCycles/quiesceNs.
util/m5/Makefile:
Make the makefile more reasonable
util/m5/m5.c:
update the m5op executable to use the files from the linux tree
util/m5/m5op.S:
update m5op.S from linux tree
util/m5/m5op.h:
update m5op.h from linux tree
--HG--
rename : util/m5/m5op.s => util/m5/m5op.S
extra : convert_revision : 3be18525e811405b112e33f24a8c4e772d15462d
Diffstat (limited to 'cpu/exec_context.hh')
-rw-r--r-- | cpu/exec_context.hh | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/cpu/exec_context.hh b/cpu/exec_context.hh index 3e0d77254..ce7fe3467 100644 --- a/cpu/exec_context.hh +++ b/cpu/exec_context.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2005 The Regents of The University of Michigan + * Copyright (c) 2001-2006 The Regents of The University of Michigan * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,6 +32,7 @@ #include "config/full_system.hh" #include "mem/functional/functional.hh" #include "mem/mem_req.hh" +#include "sim/eventq.hh" #include "sim/host.hh" #include "sim/serialize.hh" #include "arch/isa_traits.hh" @@ -131,6 +132,9 @@ class ExecContext // it belongs. For full-system mode, this is the system CPU ID. int cpu_id; + Tick lastActivate; + Tick lastSuspend; + #if FULL_SYSTEM FunctionalMemory *mem; AlphaITB *itb; @@ -153,6 +157,22 @@ class ExecContext Addr profilePC; void dumpFuncProfile(); + /** Event for timing out quiesce instruction */ + struct EndQuiesceEvent : public Event + { + /** A pointer to the execution context that is quiesced */ + ExecContext *xc; + + EndQuiesceEvent(ExecContext *_xc); + + /** Event process to occur at interrupt*/ + virtual void process(); + + /** Event description */ + virtual const char *description(); + }; + EndQuiesceEvent quiesceEvent; + #else Process *process; |