From 6833ca7eedd351596bb1518620af7465f5172fcd Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 13 Sep 2010 19:26:03 -0700 Subject: Faults: Pass the StaticInst involved, if any, to a Fault's invoke method. Also move the "Fault" reference counted pointer type into a separate file, sim/fault.hh. It would be better to name this less similarly to sim/faults.hh to reduce confusion, but fault.hh matches the name of the type. We could change Fault to FaultPtr to match other pointer types, and then changing the name of the file would make more sense. --- src/arch/sparc/utility.hh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/arch/sparc/utility.hh') diff --git a/src/arch/sparc/utility.hh b/src/arch/sparc/utility.hh index fe3082c5e..70044a6c2 100644 --- a/src/arch/sparc/utility.hh +++ b/src/arch/sparc/utility.hh @@ -31,13 +31,13 @@ #ifndef __ARCH_SPARC_UTILITY_HH__ #define __ARCH_SPARC_UTILITY_HH__ -#include "arch/sparc/faults.hh" #include "arch/sparc/isa_traits.hh" #include "arch/sparc/registers.hh" #include "arch/sparc/tlb.hh" #include "base/misc.hh" #include "base/bitfield.hh" #include "cpu/thread_context.hh" +#include "sim/fault.hh" namespace SparcISA { @@ -57,14 +57,7 @@ namespace SparcISA template void zeroRegisters(TC *tc); - inline void - initCPU(ThreadContext *tc, int cpuId) - { - static Fault por = new PowerOnReset(); - if (cpuId == 0) - por->invoke(tc); - - } + void initCPU(ThreadContext *tc, int cpuId); inline void startupCPU(ThreadContext *tc, int cpuId) -- cgit v1.2.3