From patchwork Fri Sep 4 15:05:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 53103 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id A0BAD22E23 for ; Fri, 4 Sep 2015 15:09:44 +0000 (UTC) Received: by lbcjc2 with SMTP id jc2sf7730963lbc.0 for ; Fri, 04 Sep 2015 08:09:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=gR/pWc2J+v54StyELkAFi2Fa4t5HkCncoBLIxBIp17Y=; b=SNuIvNzsDKnXBtdfQy4GNGRfD5LP10PE0KtAg+kylrGteG9b/oQ16twHBeBtHPYCH8 cycGFwLWrsRhhLY3ZnNE8JgLdriua4P0GZZwsXz0v8FzWruEV1QaLho2FL/GlbxcxGJi uEooLsGprPePNR2E+/i5fiJenoLRZHe3S6DAzENMMS3i8hnJ4HPUh43jNpOwg4EryqnP P092rn+i8AHg+LtI4AYhnqAGyAfwosbF4Di2gDtIRfjLEeA8V05M9IbGJqZZ0mvh1Cxl rR8A4v4APqRZ/SdKOe116BUamTxrJTNgX6rhBeTplIh/APxkeY28/Sje0aAjHbieUN4M 4mBQ== X-Gm-Message-State: ALoCoQlHOkhRd+rhx3VizNEU6pYB81glPNbH5Y9c/D8jZFw93pDj5uOav5FI2OPXVZ3Z+ayvEl/y X-Received: by 10.112.148.101 with SMTP id tr5mr1185126lbb.13.1441379383598; Fri, 04 Sep 2015 08:09:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.25.134 with SMTP id c6ls362129lag.54.gmail; Fri, 04 Sep 2015 08:09:43 -0700 (PDT) X-Received: by 10.152.22.133 with SMTP id d5mr4150339laf.112.1441379383448; Fri, 04 Sep 2015 08:09:43 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id w4si2548785lad.89.2015.09.04.08.09.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Sep 2015 08:09:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by lamp12 with SMTP id p12so15016770lam.0 for ; Fri, 04 Sep 2015 08:09:43 -0700 (PDT) X-Received: by 10.112.16.135 with SMTP id g7mr4131673lbd.19.1441379383306; Fri, 04 Sep 2015 08:09:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.164.42 with SMTP id yn10csp2045615lbb; Fri, 4 Sep 2015 08:09:42 -0700 (PDT) X-Received: by 10.140.34.33 with SMTP id k30mr5983113qgk.56.1441379382181; Fri, 04 Sep 2015 08:09:42 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id y184si3112235qky.27.2015.09.04.08.09.41 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 04 Sep 2015 08:09:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:60560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXscX-0005us-5B for patch@linaro.org; Fri, 04 Sep 2015 11:09:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXsZB-0008Vh-6M for qemu-devel@nongnu.org; Fri, 04 Sep 2015 11:06:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXsZA-0000ru-BO for qemu-devel@nongnu.org; Fri, 04 Sep 2015 11:06:13 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:35023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXsZA-0000iE-4W for qemu-devel@nongnu.org; Fri, 04 Sep 2015 11:06:12 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZXsYu-0006F6-G0 for qemu-devel@nongnu.org; Fri, 04 Sep 2015 16:05:56 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 4 Sep 2015 16:05:37 +0100 Message-Id: <1441379156-23939-9-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1441379156-23939-1-git-send-email-peter.maydell@linaro.org> References: <1441379156-23939-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 08/27] target-arm/arm-semi.c: Implement A64 specific SyncCacheRange call X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 Reviewed-by: Christopher Covington Tested-by: Christopher Covington Message-id: 1439483745-28752-8-git-send-email-peter.maydell@linaro.org --- 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);