arch-arm: Semihosting not available in syscall emulation
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 14 Feb 2018 14:03:34 +0000 (14:03 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Mon, 19 Feb 2018 16:12:25 +0000 (16:12 +0000)
Arm Semihosting is not available in syscall emulation since we don't
have an Arm system in that scenario. Trying to use it in "se" mode will
make getArmSystem assertion fail.

Change-Id: I4cf49ae801ec6e6c93134ac6ae2a0f412040684c
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/8367
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/arch/arm/system.cc

index caef6dc8f5803e0e946a58143dca226551b8ed42..a540a63c48685f4be1cfc48a5ebea250c7d60baf 100644 (file)
@@ -273,7 +273,7 @@ ArmSystem::haveLargeAsid64(ThreadContext *tc)
 bool
 ArmSystem::haveSemihosting(ThreadContext *tc)
 {
-    return getArmSystem(tc)->haveSemihosting();
+    return FullSystem && getArmSystem(tc)->haveSemihosting();
 }
 
 uint64_t