diff --git a/src/cpu/minor/exec_context.hh b/src/cpu/minor/exec_context.hh index 87787f011c..66e313eb37 100644 --- a/src/cpu/minor/exec_context.hh +++ b/src/cpu/minor/exec_context.hh @@ -389,9 +389,6 @@ class ExecContext : public ::ExecContext void syscall(int64_t callnum, Fault *fault) override { - if (FullSystem) - panic("Syscall emulation isn't available in FS mode.\n"); - thread.syscall(callnum, fault); } diff --git a/src/cpu/o3/dyn_inst_impl.hh b/src/cpu/o3/dyn_inst_impl.hh index fbeb3c2915..22d89ec0b9 100644 --- a/src/cpu/o3/dyn_inst_impl.hh +++ b/src/cpu/o3/dyn_inst_impl.hh @@ -45,7 +45,6 @@ #include "base/cp_annotate.hh" #include "cpu/o3/dyn_inst.hh" -#include "sim/full_system.hh" #include "debug/O3PipeView.hh" template @@ -195,9 +194,6 @@ template void BaseO3DynInst::syscall(int64_t callnum, Fault *fault) { - if (FullSystem) - panic("Syscall emulation isn't available in FS mode.\n"); - // HACK: check CPU's nextPC before and after syscall. If it // changes, update this instruction's nextPC because the syscall // must have changed the nextPC. diff --git a/src/cpu/o3/thread_state.hh b/src/cpu/o3/thread_state.hh index a4a12330f3..a0c3a8171b 100644 --- a/src/cpu/o3/thread_state.hh +++ b/src/cpu/o3/thread_state.hh @@ -150,6 +150,7 @@ struct O3ThreadState : public ThreadState { /** Handles the syscall. */ void syscall(int64_t callnum, Fault *fault) { + fatal_if(FullSystem, "System call emulation is unavailable!"); process->syscall(callnum, tc, fault); } diff --git a/src/cpu/simple/exec_context.hh b/src/cpu/simple/exec_context.hh index 91f7ec5268..4d26dfe2aa 100644 --- a/src/cpu/simple/exec_context.hh +++ b/src/cpu/simple/exec_context.hh @@ -499,9 +499,6 @@ class SimpleExecContext : public ExecContext { void syscall(int64_t callnum, Fault *fault) override { - if (FullSystem) - panic("Syscall emulation isn't available in FS mode."); - thread->syscall(callnum, fault); } diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh index f25e622497..387e74546d 100644 --- a/src/cpu/simple_thread.hh +++ b/src/cpu/simple_thread.hh @@ -66,6 +66,7 @@ #include "mem/request.hh" #include "sim/byteswap.hh" #include "sim/eventq.hh" +#include "sim/full_system.hh" #include "sim/process.hh" #include "sim/serialize.hh" #include "sim/system.hh" @@ -610,6 +611,7 @@ class SimpleThread : public ThreadState, public ThreadContext void syscall(int64_t callnum, Fault *fault) override { + fatal_if(FullSystem, "System call emulation is unavailable!"); process->syscall(callnum, this, fault); }