SE/FS: Remove the last uses of FULL_SYSTEM from SPARC.
This commit is contained in:
parent
8ad2b8c559
commit
eeb85a8575
4 changed files with 51 additions and 61 deletions
|
@ -36,9 +36,16 @@ if env['TARGET_ISA'] == 'sparc':
|
||||||
Source('faults.cc')
|
Source('faults.cc')
|
||||||
Source('interrupts.cc')
|
Source('interrupts.cc')
|
||||||
Source('isa.cc')
|
Source('isa.cc')
|
||||||
|
Source('linux/linux.cc')
|
||||||
|
Source('linux/process.cc')
|
||||||
|
Source('linux/syscalls.cc')
|
||||||
Source('nativetrace.cc')
|
Source('nativetrace.cc')
|
||||||
Source('pagetable.cc')
|
Source('pagetable.cc')
|
||||||
|
Source('process.cc')
|
||||||
Source('remote_gdb.cc')
|
Source('remote_gdb.cc')
|
||||||
|
Source('solaris/process.cc')
|
||||||
|
Source('solaris/solaris.cc')
|
||||||
|
Source('system.cc')
|
||||||
Source('tlb.cc')
|
Source('tlb.cc')
|
||||||
Source('ua2005.cc')
|
Source('ua2005.cc')
|
||||||
Source('utility.cc')
|
Source('utility.cc')
|
||||||
|
@ -46,25 +53,12 @@ if env['TARGET_ISA'] == 'sparc':
|
||||||
|
|
||||||
SimObject('SparcInterrupts.py')
|
SimObject('SparcInterrupts.py')
|
||||||
SimObject('SparcNativeTrace.py')
|
SimObject('SparcNativeTrace.py')
|
||||||
|
SimObject('SparcSystem.py')
|
||||||
SimObject('SparcTLB.py')
|
SimObject('SparcTLB.py')
|
||||||
|
|
||||||
DebugFlag('Sparc', "Generic SPARC ISA stuff")
|
DebugFlag('Sparc', "Generic SPARC ISA stuff")
|
||||||
DebugFlag('RegisterWindows', "Register window manipulation")
|
DebugFlag('RegisterWindows', "Register window manipulation")
|
||||||
|
|
||||||
if env['FULL_SYSTEM']:
|
|
||||||
SimObject('SparcSystem.py')
|
|
||||||
|
|
||||||
Source('system.cc')
|
|
||||||
else:
|
|
||||||
Source('process.cc')
|
|
||||||
|
|
||||||
Source('linux/linux.cc')
|
|
||||||
Source('linux/process.cc')
|
|
||||||
Source('linux/syscalls.cc')
|
|
||||||
|
|
||||||
Source('solaris/process.cc')
|
|
||||||
Source('solaris/solaris.cc')
|
|
||||||
|
|
||||||
# Add in files generated by the ISA description.
|
# Add in files generated by the ISA description.
|
||||||
isa_desc_files = env.ISADesc('isa/main.isa')
|
isa_desc_files = env.ISADesc('isa/main.isa')
|
||||||
# Only non-header files need to be compiled.
|
# Only non-header files need to be compiled.
|
||||||
|
|
|
@ -33,15 +33,13 @@
|
||||||
|
|
||||||
#include "arch/sparc/faults.hh"
|
#include "arch/sparc/faults.hh"
|
||||||
#include "arch/sparc/isa_traits.hh"
|
#include "arch/sparc/isa_traits.hh"
|
||||||
|
#include "arch/sparc/process.hh"
|
||||||
#include "arch/sparc/types.hh"
|
#include "arch/sparc/types.hh"
|
||||||
#include "base/bitfield.hh"
|
#include "base/bitfield.hh"
|
||||||
#include "base/trace.hh"
|
#include "base/trace.hh"
|
||||||
#include "sim/full_system.hh"
|
#include "sim/full_system.hh"
|
||||||
#include "cpu/base.hh"
|
#include "cpu/base.hh"
|
||||||
#include "cpu/thread_context.hh"
|
#include "cpu/thread_context.hh"
|
||||||
#if !FULL_SYSTEM
|
|
||||||
#include "arch/sparc/process.hh"
|
|
||||||
#endif
|
|
||||||
#include "mem/page_table.hh"
|
#include "mem/page_table.hh"
|
||||||
#include "sim/process.hh"
|
#include "sim/process.hh"
|
||||||
#include "sim/full_system.hh"
|
#include "sim/full_system.hh"
|
||||||
|
@ -666,64 +664,64 @@ FastDataAccessMMUMiss::invoke(ThreadContext *tc, StaticInstPtr inst)
|
||||||
void
|
void
|
||||||
SpillNNormal::invoke(ThreadContext *tc, StaticInstPtr inst)
|
SpillNNormal::invoke(ThreadContext *tc, StaticInstPtr inst)
|
||||||
{
|
{
|
||||||
#if !FULL_SYSTEM
|
if (FullSystem) {
|
||||||
doNormalFault(tc, trapType(), false);
|
SparcFaultBase::invoke(tc, inst);
|
||||||
|
} else {
|
||||||
|
doNormalFault(tc, trapType(), false);
|
||||||
|
|
||||||
Process *p = tc->getProcessPtr();
|
Process *p = tc->getProcessPtr();
|
||||||
|
|
||||||
//XXX This will only work in faults from a SparcLiveProcess
|
//XXX This will only work in faults from a SparcLiveProcess
|
||||||
SparcLiveProcess *lp = dynamic_cast<SparcLiveProcess *>(p);
|
SparcLiveProcess *lp = dynamic_cast<SparcLiveProcess *>(p);
|
||||||
assert(lp);
|
assert(lp);
|
||||||
|
|
||||||
// Then adjust the PC and NPC
|
// Then adjust the PC and NPC
|
||||||
tc->pcState(lp->readSpillStart());
|
tc->pcState(lp->readSpillStart());
|
||||||
#else
|
}
|
||||||
SparcFaultBase::invoke(tc, inst);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FillNNormal::invoke(ThreadContext *tc, StaticInstPtr inst)
|
FillNNormal::invoke(ThreadContext *tc, StaticInstPtr inst)
|
||||||
{
|
{
|
||||||
#if !FULL_SYSTEM
|
if (FullSystem) {
|
||||||
doNormalFault(tc, trapType(), false);
|
SparcFaultBase::invoke(tc, inst);
|
||||||
|
} else {
|
||||||
|
doNormalFault(tc, trapType(), false);
|
||||||
|
|
||||||
Process *p = tc->getProcessPtr();
|
Process *p = tc->getProcessPtr();
|
||||||
|
|
||||||
//XXX This will only work in faults from a SparcLiveProcess
|
//XXX This will only work in faults from a SparcLiveProcess
|
||||||
SparcLiveProcess *lp = dynamic_cast<SparcLiveProcess *>(p);
|
SparcLiveProcess *lp = dynamic_cast<SparcLiveProcess *>(p);
|
||||||
assert(lp);
|
assert(lp);
|
||||||
|
|
||||||
// Then adjust the PC and NPC
|
// Then adjust the PC and NPC
|
||||||
tc->pcState(lp->readFillStart());
|
tc->pcState(lp->readFillStart());
|
||||||
#else
|
}
|
||||||
SparcFaultBase::invoke(tc, inst);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TrapInstruction::invoke(ThreadContext *tc, StaticInstPtr inst)
|
TrapInstruction::invoke(ThreadContext *tc, StaticInstPtr inst)
|
||||||
{
|
{
|
||||||
#if !FULL_SYSTEM
|
if (FullSystem) {
|
||||||
// In SE, this mechanism is how the process requests a service from the
|
SparcFaultBase::invoke(tc, inst);
|
||||||
// operating system. We'll get the process object from the thread context
|
} else {
|
||||||
// and let it service the request.
|
// In SE, this mechanism is how the process requests a service from
|
||||||
|
// the operating system. We'll get the process object from the thread
|
||||||
|
// context and let it service the request.
|
||||||
|
|
||||||
Process *p = tc->getProcessPtr();
|
Process *p = tc->getProcessPtr();
|
||||||
|
|
||||||
SparcLiveProcess *lp = dynamic_cast<SparcLiveProcess *>(p);
|
SparcLiveProcess *lp = dynamic_cast<SparcLiveProcess *>(p);
|
||||||
assert(lp);
|
assert(lp);
|
||||||
|
|
||||||
lp->handleTrap(_n, tc);
|
lp->handleTrap(_n, tc);
|
||||||
|
|
||||||
// We need to explicitly advance the pc, since that's not done for us
|
// We need to explicitly advance the pc, since that's not done for us
|
||||||
// on a faulting instruction
|
// on a faulting instruction
|
||||||
PCState pc = tc->pcState();
|
PCState pc = tc->pcState();
|
||||||
pc.advance();
|
pc.advance();
|
||||||
tc->pcState(pc);
|
tc->pcState(pc);
|
||||||
#else
|
}
|
||||||
SparcFaultBase::invoke(tc, inst);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace SparcISA
|
} // namespace SparcISA
|
||||||
|
|
|
@ -326,9 +326,8 @@ let {{
|
||||||
'''
|
'''
|
||||||
|
|
||||||
TruncateEA = '''
|
TruncateEA = '''
|
||||||
#if !FULL_SYSTEM
|
if (!FullSystem)
|
||||||
EA = Pstate<3:> ? EA<31:0> : EA;
|
EA = Pstate<3:> ? EA<31:0> : EA;
|
||||||
#endif
|
|
||||||
'''
|
'''
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "debug/Quiesce.hh"
|
#include "debug/Quiesce.hh"
|
||||||
#include "debug/Timer.hh"
|
#include "debug/Timer.hh"
|
||||||
#include "sim/system.hh"
|
#include "sim/system.hh"
|
||||||
|
#include "sim/full_system.hh"
|
||||||
|
|
||||||
using namespace SparcISA;
|
using namespace SparcISA;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -224,10 +225,8 @@ ISA::setFSReg(int miscReg, const MiscReg &val, ThreadContext *tc)
|
||||||
DPRINTF(Quiesce, "Cpu executed quiescing instruction\n");
|
DPRINTF(Quiesce, "Cpu executed quiescing instruction\n");
|
||||||
// Time to go to sleep
|
// Time to go to sleep
|
||||||
tc->suspend();
|
tc->suspend();
|
||||||
#if FULL_SYSTEM
|
if (FullSystem && tc->getKernelStats())
|
||||||
if (tc->getKernelStats())
|
|
||||||
tc->getKernelStats()->quiesce();
|
tc->getKernelStats()->quiesce();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue