From patchwork Tue Mar 8 21:06:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 8537771 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 5CBE5C0554 for ; Tue, 8 Mar 2016 21:10:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C3280201FE for ; Tue, 8 Mar 2016 21:10: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 10D6F201C8 for ; Tue, 8 Mar 2016 21:10:09 +0000 (UTC) Received: from localhost ([::1]:37402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adOtM-0005g5-Aq for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Mar 2016 16:10:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adOt3-0005bO-Ff for qemu-devel@nongnu.org; Tue, 08 Mar 2016 16:09:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adOt0-0002ga-5C for qemu-devel@nongnu.org; Tue, 08 Mar 2016 16:09:49 -0500 Received: from mail-cys01nam02on0049.outbound.protection.outlook.com ([104.47.37.49]:25432 helo=NAM02-CY1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adOt0-0002gH-0W for qemu-devel@nongnu.org; Tue, 08 Mar 2016 16:09:46 -0500 Received: from CY1NAM02FT050.eop-nam02.prod.protection.outlook.com (10.152.74.58) by CY1NAM02HT074.eop-nam02.prod.protection.outlook.com (10.152.74.136) with Microsoft SMTP Server (TLS) id 15.1.427.7; Tue, 8 Mar 2016 21:09:44 +0000 Authentication-Results: spf=fail (sender IP is 149.199.60.96) smtp.mailfrom=xilinx.com; linaro.org; dkim=none (message not signed) header.d=none; linaro.org; dmarc=none action=none header.from=xilinx.com; Received-SPF: Fail (protection.outlook.com: domain of xilinx.com does not designate 149.199.60.96 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.96; helo=xsj-tvapsmtpgw01; Received: from xsj-tvapsmtpgw01 (149.199.60.96) by CY1NAM02FT050.mail.protection.outlook.com (10.152.75.65) with Microsoft SMTP Server (TLS) id 15.1.434.11 via Frontend Transport; Tue, 8 Mar 2016 21:09:41 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:47521 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1adOsu-0006CR-Tw; Tue, 08 Mar 2016 13:09:40 -0800 Received: from [127.0.0.1] (port=48466 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from ) id 1adOsu-0000dr-PN; Tue, 08 Mar 2016 13:09:40 -0800 Received: from xsj-tvapsmtp02 (xsj-tvapsmtp02.xilinx.com [172.16.1.203]) by tsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id u28L3oQK021871; Tue, 8 Mar 2016 13:03:50 -0800 Received: from [172.19.74.182] (port=56650 helo=xsjalistai50.xlnx.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from ) id 1adOst-0000do-Si; Tue, 08 Mar 2016 13:09:39 -0800 From: Alistair Francis To: , Date: Tue, 8 Mar 2016 13:06:39 -0800 Message-ID: X-Mailer: git-send-email 2.5.0 In-Reply-To: References: X-RCIS-Action: ALLOW X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-22178.005 X-TM-AS-Result: No-1.555-7.0-31-10 X-imss-scan-details: No-1.555-7.0-31-10 X-TMASE-MatchedRID: +aiIZkdJNeX9kbyhKg6JlJN3sInxtjDT+eBf9ovw8I2bQheSHWffIHm8 t2ifVKz3PkLPiTrkPiLkT1ug+sI9d+SVcWGqSjBgxEwSTOeVUQ76Vf9FxCgbYZsoi2XrUn/Js98 n9dYnJNNQSFbL1bvQAVgXepbcl7r7hzusYaOeprm4/iJvwcwaug5Dv0yvlT5A0hIoafWldMqnnP Qcftglkx39fzsmE5bKLUtXEe4P5LHgDQpNGDYmSitDkHNhX/8AS7+RMq/2CK6rA4c7UV2fQpvi2 PQO/FFQiz2ujrPVx9yseILOog518n7cGd19dSFd X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.96; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(6806005)(85426001)(5008740100001)(87936001)(86362001)(48376002)(47776003)(81166005)(76176999)(189998001)(92566002)(50466002)(11100500001)(50986999)(33646002)(5001770100001)(1096002)(64026002)(5003940100001)(4326007)(77096005)(105606002)(2906002)(106466001)(36756003)(2950100001)(118296001)(5003600100002)(71366001)(229853001)(586003)(50226001)(19580405001)(19580395003)(1220700001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1NAM02HT074; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: eb9deacd-6906-450e-1c8b-08d34795f90a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1NAM02HT074; X-Microsoft-Antispam-PRVS: <7e70416230df4546a3898020c4faf391@CY1NAM02HT074.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(13015025)(5005006)(13017025)(13018025)(13024025)(13023025)(3002001)(10201501046); SRVR:CY1NAM02HT074; BCL:0; PCL:0; RULEID:; SRVR:CY1NAM02HT074; X-Forefront-PRVS: 08756AC3C8 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2016 21:09:41.7478 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.96]; Helo=[xsj-tvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1NAM02HT074 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.37.49 Cc: edgar.iglesias@xilinx.com, alistair.francis@xilinx.com, crosthwaitepeter@gmail.com, edgar.iglesias@gmail.com, alex.bennee@linaro.org, afaerber@suse.de, fred.konrad@greensocs.com Subject: [Qemu-devel] [PATCH v5 04/15] register: Add support for decoding information 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable 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 Allow defining of optional address decoding information in register definitions. This is useful for clients that want to associate registers with specific addresses. Signed-off-by: Peter Crosthwaite Signed-off-by: Alistair Francis --- V3: - Remove unused flags option include/hw/register.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/hw/register.h b/include/hw/register.h index 726a914..bc2c96a 100644 --- a/include/hw/register.h +++ b/include/hw/register.h @@ -39,6 +39,11 @@ typedef struct RegisterInfoArray RegisterInfoArray; * allowing this function to modify the value before return to the client. */ +#define REG_DECODE_READ (1 << 0) +#define REG_DECODE_WRITE (1 << 1) +#define REG_DECODE_EXECUTE (1 << 2) +#define REG_DECODE_RW (REG_DECODE_READ | REG_DECODE_WRITE) + struct RegisterAccessInfo { const char *name; uint64_t ro;