From patchwork Fri Sep 12 13:23:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 37307 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D7917203EE for ; Fri, 12 Sep 2014 13:29:28 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id mc6sf485550lab.6 for ; Fri, 12 Sep 2014 06:29:27 -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=FX/B6Emw3WHmOD4Qas6exn++FuoZqeaRMGKCA9eBDSE=; b=db/NN2rk/3rKn50HsRU2FT5RxULfDjeoWGoqWf2CzVo99Xrp8Ny05vrSbDWQfq5kqC Q7lwYUL2GGQTJEh9ei9h4wW28kqAKhnbGT7Y12NzTXak68owwRCPku4IjNIVFKCuf8e3 PeEnGanX1O9hlRdY4ce3c6Ko/NVa9Tj15QUasU/imWgQOyJJ2Dyplwqbc99kcYzcUco0 j50AxhTYCCx3JeoZhxjn0dlTjG0OswgUzIbAs7ERSL1zW6gSXx8GtRHlLwsnaBoxLNkv 8H0powzTLaeMYkfBUYE8434ofZFUhOTPEdxNQ/dEQGZE++UcAOzZv3j9rIWr6m73IfWo ez1g== X-Gm-Message-State: ALoCoQk+GWw5K/mDAxrANxY0RfXQaO3iobqhEFZJK9NhgvYp9cK7keDKXzzqVwXogfKFYKHEZvor X-Received: by 10.194.79.34 with SMTP id g2mr2252519wjx.3.1410528567650; Fri, 12 Sep 2014 06:29:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.115.138 with SMTP id jo10ls162639lab.56.gmail; Fri, 12 Sep 2014 06:29:27 -0700 (PDT) X-Received: by 10.112.130.101 with SMTP id od5mr8581926lbb.76.1410528567236; Fri, 12 Sep 2014 06:29:27 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) by mx.google.com with ESMTPS id jd1si6479167lbc.118.2014.09.12.06.29.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Sep 2014 06:29:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id ty20so938001lab.9 for ; Fri, 12 Sep 2014 06:29:27 -0700 (PDT) X-Received: by 10.112.4.33 with SMTP id h1mr8297128lbh.67.1410528567005; Fri, 12 Sep 2014 06:29:27 -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.141.42 with SMTP id rl10csp731549lbb; Fri, 12 Sep 2014 06:29:26 -0700 (PDT) X-Received: by 10.140.90.42 with SMTP id w39mr11936221qgd.88.1410528565593; Fri, 12 Sep 2014 06:29:25 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id c90si5621628qge.56.2014.09.12.06.29.24 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 12 Sep 2014 06:29:25 -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]:44943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSQui-0006vP-8e for patch@linaro.org; Fri, 12 Sep 2014 09:29:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSQpX-0006pq-H5 for qemu-devel@nongnu.org; Fri, 12 Sep 2014 09:24:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSQpR-0003yU-8h for qemu-devel@nongnu.org; Fri, 12 Sep 2014 09:24:03 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:46960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSQpR-0003xI-1r for qemu-devel@nongnu.org; Fri, 12 Sep 2014 09:23:57 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1XSQpP-0003YD-Bs for qemu-devel@nongnu.org; Fri, 12 Sep 2014 14:23:55 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 12 Sep 2014 14:23:47 +0100 Message-Id: <1410528234-13545-17-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1410528234-13545-1-git-send-email-peter.maydell@linaro.org> References: <1410528234-13545-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 81.2.115.146 Subject: [Qemu-devel] [PULL 16/23] target-arm: Implement minimal DBGVCR, OSDLR_EL1, MDCCSR_EL0 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.50 as permitted sender) smtp.mail=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 Implement debug registers DBGVCR, OSDLR_EL1 and MDCCSR_EL0 (as dummy or limited-functionality). 32 bit Linux kernels will access these at startup so they are required for breakpoints and watchpoints to be supported. Signed-off-by: Peter Maydell --- target-arm/helper.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/target-arm/helper.c b/target-arm/helper.c index fc6a6f8..d2e741a 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2250,10 +2250,29 @@ static const ARMCPRegInfo debug_cp_reginfo[] = { .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.mdscr_el1), .resetvalue = 0 }, + /* MDCCSR_EL0, aka DBGDSCRint. This is a read-only mirror of MDSCR_EL1. + * We don't implement the configurable EL0 access. + */ + { .name = "MDCCSR_EL0", .state = ARM_CP_STATE_BOTH, + .cp = 14, .opc0 = 2, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 0, + .type = ARM_CP_NO_MIGRATE, + .access = PL1_R, + .fieldoffset = offsetof(CPUARMState, cp15.mdscr_el1), + .resetfn = arm_cp_reset_ignore }, /* We define a dummy WI OSLAR_EL1, because Linux writes to it. */ { .name = "OSLAR_EL1", .state = ARM_CP_STATE_BOTH, .cp = 14, .opc0 = 2, .opc1 = 0, .crn = 1, .crm = 0, .opc2 = 4, .access = PL1_W, .type = ARM_CP_NOP }, + /* Dummy OSDLR_EL1: 32-bit Linux will read this */ + { .name = "OSDLR_EL1", .state = ARM_CP_STATE_BOTH, + .cp = 14, .opc0 = 2, .opc1 = 0, .crn = 1, .crm = 3, .opc2 = 4, + .access = PL1_RW, .type = ARM_CP_NOP }, + /* Dummy DBGVCR: Linux wants to clear this on startup, but we don't + * implement vector catch debug events yet. + */ + { .name = "DBGVCR", + .cp = 14, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 0, + .access = PL1_RW, .type = ARM_CP_NOP }, REGINFO_SENTINEL };