diff options
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/pseudo_inst.cc | 34 | ||||
-rw-r--r-- | src/sim/pseudo_inst.hh | 1 | ||||
-rw-r--r-- | src/sim/syscall_emul.cc | 14 | ||||
-rw-r--r-- | src/sim/syscall_emul.hh | 2 |
4 files changed, 51 insertions, 0 deletions
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc index f3b10f6d2..bcff2f5c1 100644 --- a/src/sim/pseudo_inst.cc +++ b/src/sim/pseudo_inst.cc @@ -1,4 +1,16 @@ /* + * Copyright (c) 2010 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * * Copyright (c) 2003-2006 The Regents of The University of Michigan * All rights reserved. * @@ -86,6 +98,28 @@ quiesce(ThreadContext *tc) } void +quiesceSkip(ThreadContext *tc) +{ + BaseCPU *cpu = tc->getCpuPtr(); + + if (!cpu->params()->do_quiesce) + return; + + EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent(); + + Tick resume = curTick() + 1; + + cpu->reschedule(quiesceEvent, resume, true); + + DPRINTF(Quiesce, "%s: quiesceSkip() until %d\n", + cpu->name(), resume); + + tc->suspend(); + if (tc->getKernelStats()) + tc->getKernelStats()->quiesce(); +} + +void quiesceNs(ThreadContext *tc, uint64_t ns) { BaseCPU *cpu = tc->getCpuPtr(); diff --git a/src/sim/pseudo_inst.hh b/src/sim/pseudo_inst.hh index 296b1556b..aec3b5d8a 100644 --- a/src/sim/pseudo_inst.hh +++ b/src/sim/pseudo_inst.hh @@ -45,6 +45,7 @@ extern bool doQuiesce; #if FULL_SYSTEM void arm(ThreadContext *tc); void quiesce(ThreadContext *tc); +void quiesceSkip(ThreadContext *tc); void quiesceNs(ThreadContext *tc, uint64_t ns); void quiesceCycles(ThreadContext *tc, uint64_t cycles); uint64_t quiesceTime(ThreadContext *tc); diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc index e0469744e..506b22fdf 100644 --- a/src/sim/syscall_emul.cc +++ b/src/sim/syscall_emul.cc @@ -98,6 +98,18 @@ ignoreFunc(SyscallDesc *desc, int callnum, LiveProcess *process, SyscallReturn +ignoreWarnOnceFunc(SyscallDesc *desc, int callnum, LiveProcess *process, + ThreadContext *tc) +{ + int index = 0; + warn_once("ignoring syscall %s(%d, %d, ...)", desc->name, + process->getSyscallArg(tc, index), process->getSyscallArg(tc, index)); + + return 0; +} + + +SyscallReturn exitFunc(SyscallDesc *desc, int callnum, LiveProcess *process, ThreadContext *tc) { @@ -802,6 +814,8 @@ cloneFunc(SyscallDesc *desc, int callnum, LiveProcess *process, for (int y = 8; y < 32; y++) ctc->setIntReg(y, tc->readIntReg(y)); + #elif THE_ISA == ARM_ISA + TheISA::copyRegs(tc, ctc); #else fatal("sys_clone is not implemented for this ISA\n"); #endif diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index 1dc51ad56..5091c275d 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -187,6 +187,8 @@ SyscallReturn unimplementedFunc(SyscallDesc *desc, int num, /// trace flag is enabled. Return success to the target program. SyscallReturn ignoreFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc); +SyscallReturn ignoreWarnOnceFunc(SyscallDesc *desc, int num, + LiveProcess *p, ThreadContext *tc); /// Target exit() handler: terminate current context. SyscallReturn exitFunc(SyscallDesc *desc, int num, |