summaryrefslogtreecommitdiff
path: root/src/cpu/simple
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2019-12-01 14:23:22 -0500
committerBrandon Potter <Brandon.Potter@amd.com>2019-12-03 16:52:59 +0000
commitc63a00d65737a2f556637945a548a0bbaeb61b39 (patch)
treecbec51a00141ea61bbee429668afb628929d2119 /src/cpu/simple
parente5203b88eac6eed12674327c5cd0ac658a27573b (diff)
downloadgem5-c63a00d65737a2f556637945a548a0bbaeb61b39.tar.xz
cpu,sim-se: move error checks in syscall methods
There is a check on a global flag denoting that the simulator has been configured to run in fullsystem mode. The check is conducted at runtime during calls to syscall methods. The high-level models are checking the flag when the check could be conducted further down the call chain (nearer to the actual Process invocation). Moving the checks should result in less copy-pasta as new models are developed. It might be argued that the checks should stay in place since an error would detected earlier; that may be true, but the error would be the same and the simulation should fail in either case. This arrangement requires fewer lines of code. The changeset also changes the check into a fatal error instead of a panic since usage (in fs mode) should result in immediate corruption. Change-Id: If387e27f166ac1374f3fe8b7befe3546e69adba7 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23240 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/cpu/simple')
-rw-r--r--src/cpu/simple/exec_context.hh3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/cpu/simple/exec_context.hh b/src/cpu/simple/exec_context.hh
index 91f7ec526..4d26dfe2a 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);
}