Received: from eggs.gnu.org ([2001:4830:134:3::10]:55552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPvjL-0000xm-Cv for qemu-devel@nongnu.org; Thu, 13 Aug 2015 12:51:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPvjH-0002o0-HH for qemu-devel@nongnu.org; Thu, 13 Aug 2015 12:51:51 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPvjH-0002nf-9v for qemu-devel@nongnu.org; Thu, 13 Aug 2015 12:51:47 -0400 From: Peter Maydell Date: Thu, 13 Aug 2015 17:35:43 +0100 Message-Id: <1439483745-28752-8-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1439483745-28752-1-git-send-email-peter.maydell@linaro.org> References: <1439483745-28752-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 7/9] target-arm/arm-semi.c: Implement A64 specific SyncCacheRange call List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Christopher Covington , patches@linaro.org The A64 semihosting ABI defines a new call SyncCacheRange for doing a 'clean D-cache and invalidate I-cache' sequence. Since QEMU doesn't implement caches, we can implement this as a nop. Signed-off-by: Peter Maydell --- target-arm/arm-semi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/target-arm/arm-semi.c b/target-arm/arm-semi.c index 1d4cc59..1d0d7aa 100644 --- a/target-arm/arm-semi.c +++ b/target-arm/arm-semi.c @@ -58,6 +58,7 @@ #define TARGET_SYS_GET_CMDLINE 0x15 #define TARGET_SYS_HEAPINFO 0x16 #define TARGET_SYS_EXIT 0x18 +#define TARGET_SYS_SYNCCACHE 0x19 /* ADP_Stopped_ApplicationExit is used for exit(0), * anything else is implemented as exit(1) */ @@ -623,6 +624,15 @@ target_ulong do_arm_semihosting(CPUARMState *env) ret = (args == ADP_Stopped_ApplicationExit) ? 0 : 1; gdb_exit(env, ret); exit(ret); + case TARGET_SYS_SYNCCACHE: + /* Clean the D-cache and invalidate the I-cache for the specified + * virtual address range. This is a nop for us since we don't + * implement caches. This is only present on A64. + */ + if (is_a64(env)) { + return 0; + } + /* fall through -- invalid for A32/T32 */ default: fprintf(stderr, "qemu: Unsupported SemiHosting SWI 0x%02x\n", nr); cpu_dump_state(cs, stderr, fprintf, 0); -- 1.9.1