From patchwork Tue Jun 24 01:12:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 363279 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3F2B31400BE for ; Tue, 24 Jun 2014 11:14:47 +1000 (EST) Received: from localhost ([::1]:56958 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzFJt-0002Ou-49 for incoming@patchwork.ozlabs.org; Mon, 23 Jun 2014 21:14:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzFHu-00077z-A1 for qemu-devel@nongnu.org; Mon, 23 Jun 2014 21:12:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzFHo-00056M-5f for qemu-devel@nongnu.org; Mon, 23 Jun 2014 21:12:42 -0400 Received: from mail-yk0-x22d.google.com ([2607:f8b0:4002:c07::22d]:56565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzFHo-00056G-1L for qemu-devel@nongnu.org; Mon, 23 Jun 2014 21:12:36 -0400 Received: by mail-yk0-f173.google.com with SMTP id 142so5196491ykq.32 for ; Mon, 23 Jun 2014 18:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=dZW32x4OjRvcm3Gb38FQv0Xn6/fro4kFiv5bhotgSfM=; b=KOwokocIZY4khuwNCaY0JPsA27/brHyqEYhxTYYg6HeDf3GEwSa5IH1RmBkvCaK42X w9x8cfb2sFNjOCgmT9R7hXkXzZBxlsa/P/2PrBxFwqaHKDsir+RWCA9cK5mOThdfB3/z DUwQk7Lixr5kBoVSxVHGNoASJhNbAMkZHPJQ7N2r4EboGSc47xZCxNM10U7vtT0gu+QZ rPRUeXoN9V5Em9B8cYmN85GzvHLJsb0vRFH5R6W54F6vw+HyRwVPsihLCluLRWCVMuGk c9+x+H85ch88UzsFT1sMMsjKNkMVNQOLG2O4BqZIw3WtrQdXkoy9KDNsgDNwHlLA4QXg DLHw== X-Received: by 10.236.132.139 with SMTP id o11mr40735305yhi.101.1403572355724; Mon, 23 Jun 2014 18:12:35 -0700 (PDT) Received: from localhost ([203.126.243.116]) by mx.google.com with ESMTPSA id m25sm32334740yhc.12.2014.06.23.18.12.33 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 23 Jun 2014 18:12:35 -0700 (PDT) From: Alistair Francis To: qemu-devel@nongnu.org Date: Tue, 24 Jun 2014 11:12:30 +1000 Message-Id: <10bd87e6e7ac5e74bdec79f05349d0977e62f907.1403572003.git.alistair.francis@xilinx.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c07::22d Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, alistair.francis@xilinx.com Subject: [Qemu-devel] [PATCH v1 6/7] target-arm: Implement pmccfiltr_write function 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This is the function that is called when writing to the PMCCFILTR_EL0 register Signed-off-by: Alistair Francis --- target-arm/helper.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index bbd4b23..3e0a9a1 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -624,6 +624,14 @@ static void pmccntr_write(CPUARMState *env, const ARMCPRegInfo *ri, } #endif +static void pmccfiltr_write(CPUARMState *env, const ARMCPRegInfo *ri, + uint64_t value) +{ + pmccntr_sync(env); + env->cp15.pmccfiltr_el0 = value & 0x7E000000; + pmccntr_sync(env); +} + static void pmcntenset_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { @@ -786,6 +794,7 @@ static const ARMCPRegInfo v7_cp_reginfo[] = { #endif { .name = "PMCCFILTR_EL0", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 3, .crn = 14, .crm = 15, .opc2 = 7, + .writefn = pmccfiltr_write, .access = PL0_RW, .accessfn = pmreg_access, .state = ARM_CP_STATE_AA64, .resetvalue = 0,