summaryrefslogtreecommitdiff
path: root/cpu/intr_control.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2003-11-03 20:35:05 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2003-11-03 20:35:05 -0800
commite4b52476bc00fe8c0115ee5ec6e9551447cb04a3 (patch)
tree0671e5be86419c60743915af2f3503fa6de28ac4 /cpu/intr_control.cc
parent02795babaf52cbf6f8c29bbb2aecfc0e60b46b63 (diff)
parent29474bdf027fe3396e0be2f6acbe2a6b89136bc2 (diff)
downloadgem5-e4b52476bc00fe8c0115ee5ec6e9551447cb04a3.tar.xz
Automerge
--HG-- extra : convert_revision : 2ca18ecbf04a1de72391073d0a5309fdbbdfefda
Diffstat (limited to 'cpu/intr_control.cc')
-rw-r--r--cpu/intr_control.cc38
1 files changed, 37 insertions, 1 deletions
diff --git a/cpu/intr_control.cc b/cpu/intr_control.cc
index 037b00ef4..c71a36b6f 100644
--- a/cpu/intr_control.cc
+++ b/cpu/intr_control.cc
@@ -40,6 +40,42 @@ IntrControl::IntrControl(const string &name, BaseCPU *c)
: SimObject(name), cpu(c)
{}
+/* @todo
+ *Fix the cpu sim object parameter to be a system pointer
+ *instead, to avoid some extra dereferencing
+ */
+void
+IntrControl::post(int int_num, int index)
+{
+ std::vector<ExecContext *> &xcvec = cpu->system->execContexts;
+ BaseCPU *temp = xcvec[0]->cpu;
+ temp->post_interrupt(int_num, index);
+}
+
+void
+IntrControl::post(int cpu_id, int int_num, int index)
+{
+ std::vector<ExecContext *> &xcvec = cpu->system->execContexts;
+ BaseCPU *temp = xcvec[cpu_id]->cpu;
+ temp->post_interrupt(int_num, index);
+}
+
+void
+IntrControl::clear(int int_num, int index)
+{
+ std::vector<ExecContext *> &xcvec = cpu->system->execContexts;
+ BaseCPU *temp = xcvec[0]->cpu;
+ temp->clear_interrupt(int_num, index);
+}
+
+void
+IntrControl::clear(int cpu_id, int int_num, int index)
+{
+ std::vector<ExecContext *> &xcvec = cpu->system->execContexts;
+ BaseCPU *temp = xcvec[cpu_id]->cpu;
+ temp->clear_interrupt(int_num, index);
+}
+
BEGIN_DECLARE_SIM_OBJECT_PARAMS(IntrControl)
SimObjectParam<BaseCPU *> cpu;
@@ -48,7 +84,7 @@ END_DECLARE_SIM_OBJECT_PARAMS(IntrControl)
BEGIN_INIT_SIM_OBJECT_PARAMS(IntrControl)
- INIT_PARAM(cpu, "the processor")
+ INIT_PARAM(cpu, "the cpu")
END_INIT_SIM_OBJECT_PARAMS(IntrControl)