40a41
> #include "arch/sparc/faults.hh"
47a49
> #include "sim/faults.hh"
264,266c266,267
< // Only handle interrupts for the moment... Cpu Idle/reset/resume will be
< // later
< if (type != 0)
---
> SparcISA::SparcFault<SparcISA::PowerOnReset> *por = new SparcISA::PowerOnReset();
> if (cpu_id >= sys->getNumCPUs())
269,270c270,289
< assert(type == 0);
< ic->post(cpu_id, SparcISA::IT_INT_VEC, vector);
---
> switch (type) {
> case 0: // interrupt
> ic->post(cpu_id, SparcISA::IT_INT_VEC, vector);
> break;
> case 1: // reset
> warn("Sending reset to CPU: %d\n", cpu_id);
> if (vector != por->trapType())
> panic("Don't know how to set non-POR reset to cpu\n");
> por->invoke(sys->threadContexts[cpu_id]);
> sys->threadContexts[cpu_id]->activate();
> break;
> case 2: // idle -- this means stop executing and don't wake on interrupts
> sys->threadContexts[cpu_id]->halt();
> break;
> case 3: // resume
> sys->threadContexts[cpu_id]->activate();
> break;
> default:
> panic("Invalid type to generate ipi\n");
> }