summaryrefslogtreecommitdiff
path: root/src/arch/alpha/interrupts.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-01-25 20:29:03 -0800
committerGabe Black <gblack@eecs.umich.edu>2009-01-25 20:29:03 -0800
commitd9794784bac54483660e438980d592b6ffe5c311 (patch)
treef51e0e97d1721bf8defd1a75342d318fcaf71b80 /src/arch/alpha/interrupts.hh
parent3f9e2350a1c909f141c09bb409a381957853678c (diff)
downloadgem5-d9794784bac54483660e438980d592b6ffe5c311.tar.xz
CPU: Add a setCPU function to the interrupt objects.
Diffstat (limited to 'src/arch/alpha/interrupts.hh')
-rw-r--r--src/arch/alpha/interrupts.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/arch/alpha/interrupts.hh b/src/arch/alpha/interrupts.hh
index 89db134ff..f8e0ad4ef 100644
--- a/src/arch/alpha/interrupts.hh
+++ b/src/arch/alpha/interrupts.hh
@@ -48,6 +48,7 @@ class Interrupts : public SimObject
bool newInfoSet;
int newIpl;
int newSummary;
+ BaseCPU * cpu;
protected:
uint64_t interrupts[NumInterruptLevels];
@@ -62,7 +63,7 @@ class Interrupts : public SimObject
return dynamic_cast<const Params *>(_params);
}
- Interrupts(Params * p) : SimObject(p)
+ Interrupts(Params * p) : SimObject(p), cpu(NULL)
{
memset(interrupts, 0, sizeof(interrupts));
intstatus = 0;
@@ -70,6 +71,12 @@ class Interrupts : public SimObject
}
void
+ setCPU(BaseCPU * _cpu)
+ {
+ cpu = _cpu;
+ }
+
+ void
post(int int_num, int index)
{
DPRINTF(Interrupt, "Interrupt %d:%d posted\n", int_num, index);