diff options
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/pc_event.cc | 83 | ||||
-rw-r--r-- | cpu/pc_event.hh | 47 | ||||
-rw-r--r-- | cpu/simple_cpu/simple_cpu.cc | 2 |
3 files changed, 1 insertions, 131 deletions
diff --git a/cpu/pc_event.cc b/cpu/pc_event.cc index 8c584a492..4ee93e864 100644 --- a/cpu/pc_event.cc +++ b/cpu/pc_event.cc @@ -37,15 +37,6 @@ #include "base/trace.hh" #include "sim/universe.hh" -#ifdef FULL_SYSTEM -#include "targetarch/arguments.hh" -#include "targetarch/pmap.h" -#include "mem/functional_mem/memory_control.hh" -#include "cpu/full_cpu/cpu.hh" -#include "sim/system.hh" -#include "cpu/full_cpu/bpred.hh" -#endif - using namespace std; PCEventQueue::PCEventQueue() @@ -124,80 +115,6 @@ PCEventQueue::equal_range(Addr pc) return std::equal_range(pc_map.begin(), pc_map.end(), pc, MapCompare()); } -#ifdef FULL_SYSTEM -void -SkipFuncEvent::process(ExecContext *xc) -{ - Addr newpc = xc->regs.intRegFile[ReturnAddressReg]; - - DPRINTF(PCEvent, "skipping %s: pc=%x, newpc=%x\n", description, - xc->regs.pc, newpc); - - xc->regs.pc = newpc; - xc->regs.npc = xc->regs.pc + sizeof(MachInst); - - BranchPred *bp = xc->cpu->getBranchPred(); - if (bp != NULL) { - bp->popRAS(xc->thread_num); - } -} - -void -BadAddrEvent::process(ExecContext *xc) -{ - // The following gross hack is the equivalent function to the - // annotation for vmunix::badaddr in: - // simos/simulation/apps/tcl/osf/tlaser.tcl - - uint64_t a0 = xc->regs.intRegFile[ArgumentReg0]; - - if (a0 < ALPHA_K0SEG_BASE || a0 >= ALPHA_K1SEG_BASE || - xc->memCtrl->badaddr(ALPHA_K0SEG_TO_PHYS(a0) & PA_IMPL_MASK)) { - - DPRINTF(BADADDR, "badaddr arg=%#x bad\n", a0); - xc->regs.intRegFile[ReturnValueReg] = 0x1; - SkipFuncEvent::process(xc); - } - else - DPRINTF(BADADDR, "badaddr arg=%#x good\n", a0); -} - -void Printf(AlphaArguments args); -void DumpMbuf(AlphaArguments args); - -void -PrintfEvent::process(ExecContext *xc) -{ - if (DTRACE(Printf)) { - DebugOut() << curTick << ": " << xc->cpu->name() << ": "; - - AlphaArguments args(xc); - Printf(args); - } -} - -void -DebugPrintfEvent::process(ExecContext *xc) -{ - if (DTRACE(DebugPrintf)) { - if (!raw) - DebugOut() << curTick << ": " << xc->cpu->name() << ": "; - - AlphaArguments args(xc); - Printf(args); - } -} - -void -DumpMbufEvent::process(ExecContext *xc) -{ - if (DTRACE(DebugPrintf)) { - AlphaArguments args(xc); - DumpMbuf(args); - } -} -#endif - BreakPCEvent::BreakPCEvent(PCEventQueue *q, const std::string &desc, bool del) : PCEvent(q, desc), remove(del) { diff --git a/cpu/pc_event.hh b/cpu/pc_event.hh index d452bc030..645138fdd 100644 --- a/cpu/pc_event.hh +++ b/cpu/pc_event.hh @@ -163,52 +163,6 @@ PCEvent::schedule(PCEventQueue *q, Addr pc) return schedule(); } - -#ifdef FULL_SYSTEM -class SkipFuncEvent : public PCEvent -{ - public: - SkipFuncEvent(PCEventQueue *q, const std::string &desc) - : PCEvent(q, desc) {} - virtual void process(ExecContext *xc); -}; - -class BadAddrEvent : public SkipFuncEvent -{ - public: - BadAddrEvent(PCEventQueue *q, const std::string &desc) - : SkipFuncEvent(q, desc) {} - virtual void process(ExecContext *xc); -}; - -class PrintfEvent : public PCEvent -{ - public: - PrintfEvent(PCEventQueue *q, const std::string &desc) - : PCEvent(q, desc) {} - virtual void process(ExecContext *xc); -}; - -class DebugPrintfEvent : public PCEvent -{ - private: - bool raw; - - public: - DebugPrintfEvent(PCEventQueue *q, const std::string &desc, bool r = false) - : PCEvent(q, desc), raw(r) {} - virtual void process(ExecContext *xc); -}; - -class DumpMbufEvent : public PCEvent -{ - public: - DumpMbufEvent(PCEventQueue *q, const std::string &desc) - : PCEvent(q, desc) {} - virtual void process(ExecContext *xc); -}; -#endif - class BreakPCEvent : public PCEvent { protected: @@ -219,5 +173,4 @@ class BreakPCEvent : public PCEvent virtual void process(ExecContext *xc); }; - #endif // __PC_EVENT_HH__ diff --git a/cpu/simple_cpu/simple_cpu.cc b/cpu/simple_cpu/simple_cpu.cc index 2bbd74efa..8da4b1641 100644 --- a/cpu/simple_cpu/simple_cpu.cc +++ b/cpu/simple_cpu/simple_cpu.cc @@ -150,7 +150,7 @@ SimpleCPU::SimpleCPU(const string &_name, Process *_process, _status = Idle; } else { - system->initBootContext(xc); + system->init(xc); // Reset the system // |