summaryrefslogtreecommitdiff
path: root/src/cpu/o3
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-03-02 09:21:48 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2012-03-02 09:21:48 -0500
commit32eae8094d8931f161784825ad013e9c6d995c17 (patch)
treeef3dc2b37cecd53d7bd1fcd5809b0ed251f30b3a /src/cpu/o3
parentc0b9f324bf2780b344bef04a4ce7ee063e172e40 (diff)
downloadgem5-32eae8094d8931f161784825ad013e9c6d995c17.tar.xz
CPU: Check that the interrupt controller is created when needed
This patch adds a creation-time check to the CPU to ensure that the interrupt controller is created for the cases where it is needed, i.e. if the CPU is not being switched in later and not a checker CPU. The patch also adds the "createInterruptController" call to a number of the regression scripts.
Diffstat (limited to 'src/cpu/o3')
-rw-r--r--src/cpu/o3/cpu.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 5dd2c3f3c..bf2cc80e3 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -460,6 +460,12 @@ FullO3CPU<Impl>::FullO3CPU(DerivO3CPUParams *params)
this->threadContexts.push_back(tc);
}
+ // FullO3CPU always requires an interrupt controller.
+ if (!params->defer_registration && !interrupts) {
+ fatal("FullO3CPU %s has no interrupt controller.\n"
+ "Ensure createInterruptController() is called.\n", name());
+ }
+
for (ThreadID tid = 0; tid < this->numThreads; tid++)
this->thread[tid]->setFuncExeInst(0);