From patchwork Fri Feb 12 14:33:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 8292351 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 94BFCC1F0D for ; Fri, 12 Feb 2016 14:37:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3EFE203C1 for ; Fri, 12 Feb 2016 14:37:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B917B203E1 for ; Fri, 12 Feb 2016 14:37:01 +0000 (UTC) Received: from localhost ([::1]:33129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUEqD-0000CD-4Z for patchwork-qemu-devel@patchwork.kernel.org; Fri, 12 Feb 2016 09:37:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUEpz-00006C-D4 for qemu-devel@nongnu.org; Fri, 12 Feb 2016 09:36:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUEpy-0002cw-GZ for qemu-devel@nongnu.org; Fri, 12 Feb 2016 09:36:47 -0500 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:36445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUEpy-0002cq-9G; Fri, 12 Feb 2016 09:36:46 -0500 Received: by mail-pf0-x244.google.com with SMTP id e127so4059865pfe.3; Fri, 12 Feb 2016 06:36:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=W3ytM1oaUpT6mnFZl4OL/XDOIEQKXu7uhdgoI4/sR3A=; b=kVVsp/K+vX82qzT8+FMznhveUujk57buhFMEGLh79N4Ay9Gcw2Xe0IDoX0DhxEZVP6 2ggV1s3j6dcaZ45xzyOCuGPixj/fEWtXwBf0ozaJKRxw6352uIHigyMBqyC1LE+Hg3eN wwGlelfcP03HIRd0nEJCPitmZ6Xp5BTVaJJTjKVfXsT3VxjTGhXXVzHnTL2vgTGwPGYS OKJUs/PbvZOI6yid+ZPagsDVc6J0X1eJ38Zjy8ri4RM4C9bjGNQ94imP9tFpLo+ekYiv cLcPpD044hczCCsj/TX8uqnC1q5DrCpFNwFnQlF4RWOLWsVU+ROl80d3GeCshsXDcnT+ Kt7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=W3ytM1oaUpT6mnFZl4OL/XDOIEQKXu7uhdgoI4/sR3A=; b=ByPXXyY59JepFaJBcLSHMdRnI2NiRoIBnpkr2FKdfekHkzzSjB1y0/Y8dnJC7e6DIs GjHoVkJq6uFP9Uh8AaB6Fd/9fcWz99bIdzQ/HGsK1c2QL7HMXv/RWzI4eVj8hY6eysOl cFwEfZ1gd3/G3t2hRazg/ivxOYuYq94d4s+/jmCZZB059bN0qfoZVRz4oNBD7nJKVQQb UkbaDWifZkSCJBODvZG2UEQIWYgeUOs0zxjFBE8reA7OyMir6IjSXLOgBV11cRp6rOE6 FoaGzE0DKTGFL1hxRXnBe2uI7EoUDVN+nS2KErOmJy07y6fiRwz2Lh437Mij6gIDU+Ub LCmg== X-Gm-Message-State: AG10YOSXSTaWuZc0Yb9/rFQ+S5eXhYhVXgWvSGas68SL8MEUd1UdUt94VQIuvPKNaxrGjw== X-Received: by 10.98.33.77 with SMTP id h74mr2522751pfh.157.1455287805625; Fri, 12 Feb 2016 06:36:45 -0800 (PST) Received: from localhost (ec2-52-8-89-49.us-west-1.compute.amazonaws.com. [52.8.89.49]) by smtp.gmail.com with ESMTPSA id 19sm19976587pfb.64.2016.02.12.06.36.44 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 12 Feb 2016 06:36:45 -0800 (PST) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Fri, 12 Feb 2016 15:33:56 +0100 Message-Id: <1455287642-28166-4-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455287642-28166-1-git-send-email-edgar.iglesias@gmail.com> References: <1455287642-28166-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::244 Cc: edgar.iglesias@xilinx.com, serge.fdrv@gmail.com, qemu-arm@nongnu.org, alex.bennee@linaro.org, rth@twiddle.net Subject: [Qemu-devel] [PATCH v1 3/9] target-arm: Add the thumb/IL flag to syn_data_abort 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/internals.h | 4 +++- target-arm/op_helper.c | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/target-arm/internals.h b/target-arm/internals.h index 70bec4a..b1c483b 100644 --- a/target-arm/internals.h +++ b/target-arm/internals.h @@ -360,9 +360,11 @@ static inline uint32_t syn_insn_abort(int same_el, int ea, int s1ptw, int fsc) } static inline uint32_t syn_data_abort(int same_el, int ea, int cm, int s1ptw, - int wnr, int fsc) + int wnr, int fsc, + bool is_thumb) { return (EC_DATAABORT << ARM_EL_EC_SHIFT) | (same_el << ARM_EL_EC_SHIFT) + | (is_thumb ? 0 : ARM_EL_IL) | (ea << 9) | (cm << 8) | (s1ptw << 7) | (wnr << 6) | fsc; } diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index bd48549..4e629e1 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -115,7 +115,8 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write, int mmu_idx, syn = syn_insn_abort(same_el, 0, fi.s1ptw, syn); exc = EXCP_PREFETCH_ABORT; } else { - syn = syn_data_abort(same_el, 0, 0, fi.s1ptw, is_write == 1, syn); + syn = syn_data_abort(same_el, 0, 0, fi.s1ptw, is_write == 1, syn, + env->thumb); if (is_write == 1 && arm_feature(env, ARM_FEATURE_V6)) { fsr |= (1 << 11); } @@ -161,7 +162,8 @@ void arm_cpu_do_unaligned_access(CPUState *cs, vaddr vaddr, int is_write, } raise_exception(env, EXCP_DATA_ABORT, - syn_data_abort(same_el, 0, 0, 0, is_write == 1, 0x21), + syn_data_abort(same_el, 0, 0, 0, is_write == 1, 0x21, + env->thumb), target_el); }