Message ID | 88867b7cb4b8cdfaf562dd1629f07d17fbc2b9b3.1454115217.git.alistair.francis@xilinx.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> 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 01664140BE7 for <incoming@patchwork.ozlabs.org>; Sat, 30 Jan 2016 12:05:51 +1100 (AEDT) Received: from localhost ([::1]:37204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1aPJz2-0000LQ-Qn for incoming@patchwork.ozlabs.org; Fri, 29 Jan 2016 20:05:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <alistair.francis@xilinx.com>) id 1aPJwt-0004au-Q1 for qemu-devel@nongnu.org; Fri, 29 Jan 2016 20:03:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <alistair.francis@xilinx.com>) id 1aPJwp-00082d-0U for qemu-devel@nongnu.org; Fri, 29 Jan 2016 20:03:35 -0500 Received: from mail-bl2nam02on0086.outbound.protection.outlook.com ([104.47.38.86]:64664 helo=NAM02-BL2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <alistair.francis@xilinx.com>) id 1aPJwo-00082S-S6 for qemu-devel@nongnu.org; Fri, 29 Jan 2016 20:03:30 -0500 Received: from BL2NAM02FT024.eop-nam02.prod.protection.outlook.com (10.152.76.55) by BL2NAM02HT115.eop-nam02.prod.protection.outlook.com (10.152.76.216) with Microsoft SMTP Server (TLS) id 15.1.355.15; Sat, 30 Jan 2016 01:03:29 +0000 Authentication-Results: spf=fail (sender IP is 149.199.60.96) smtp.mailfrom=xilinx.com; suse.de; dkim=none (message not signed) header.d=none; suse.de; 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 BL2NAM02FT024.mail.protection.outlook.com (10.152.77.62) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Sat, 30 Jan 2016 01:03:29 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:45453 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from <alistair.francis@xilinx.com>) id 1aPJwm-0002NQ-MH; Fri, 29 Jan 2016 17:03:28 -0800 Received: from [127.0.0.1] (port=52671 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from <alistair.francis@xilinx.com>) id 1aPJwm-0002t7-HM; Fri, 29 Jan 2016 17:03:28 -0800 Received: from xsj-tvapsmtp02 (smtptest.xilinx.com [172.16.1.203]) by tsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id u0U0vpus022012; Fri, 29 Jan 2016 16:57:51 -0800 Received: from [172.19.74.182] (port=49970 helo=xsjalistai50.xlnx.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from <alistair.francis@xilinx.com>) id 1aPJwl-0002t4-KG; Fri, 29 Jan 2016 17:03:27 -0800 From: Alistair Francis <alistair.francis@xilinx.com> To: <qemu-devel@nongnu.org>, <peter.maydell@linaro.org>, <fred.konrad@greensocs.com> Date: Fri, 29 Jan 2016 17:00:52 -0800 Message-ID: <88867b7cb4b8cdfaf562dd1629f07d17fbc2b9b3.1454115217.git.alistair.francis@xilinx.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <cover.1454115217.git.alistair.francis@xilinx.com> References: <cover.1454115217.git.alistair.francis@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-22054.006 X-TM-AS-Result: No-0.321-7.0-31-10 X-imss-scan-details: No-0.321-7.0-31-10 X-TMASE-MatchedRID: +aiIZkdJNeX/uyguzMmOKI6MisxJraxHesw8RnBRGwp+CPuoK+vfzWWa +qypoBhrPkLPiTrkPiLkT1ug+sI9d+SVcWGqSjBgxEwSTOeVUQ67nrAU9KQxUUbqb+WBsolSo8W MkQWv6iXBcIE78YqRWo6HM5rqDwqtPT6AzPYuKGN4J7mdhz969FbBxrv/R1HTwiiRRAMDoxaWOn lx8Erap99yugVZyx84rLXZtJAdcFngw3wwT9b/7Xd7kt7aorgwHSbhGbmGylXFJK7yLnZRGZdO3 Q67ImL8gi4RUz90EQyPE3z9EHUWeJRMZUCEHkRt X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.96; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(19580395003)(76176999)(2201001)(4326007)(19580405001)(5001770100001)(118296001)(5003600100002)(92566002)(33646002)(87936001)(48376002)(50226001)(86362001)(2906002)(6806005)(77096005)(189998001)(2950100001)(85426001)(11100500001)(5001960100002)(1220700001)(106466001)(50466002)(229853001)(47776003)(3470700001)(1096002)(71366001)(5003940100001)(36756003)(50986999)(105606002)(586003)(64026002)(5008740100001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2NAM02HT115; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 357b75fa-f6ae-418c-bc34-08d329112a83 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2NAM02HT115; X-Microsoft-Antispam-PRVS: <799fce5cff4749f5aa52a06a1715ad5e@BL2NAM02HT115.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13018025)(13023025)(8121501046)(13017025)(5005006)(13015025)(13024025)(3002001)(10201501046); SRVR:BL2NAM02HT115; BCL:0; PCL:0; RULEID:; SRVR:BL2NAM02HT115; X-Forefront-PRVS: 083751FCA6 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2016 01:03:29.1956 (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: BL2NAM02HT115 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.38.86 Cc: edgar.iglesias@xilinx.com, edgar.iglesias@gmail.com, crosthwaitepeter@gmail.com, afaerber@suse.de, alistair.francis@xilinx.com Subject: [Qemu-devel] [PATCH v3 04/16] register: Add support for decoding information X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org |
diff --git a/include/hw/register.h b/include/hw/register.h index 285d4a3..307a880 100644 --- a/include/hw/register.h +++ b/include/hw/register.h @@ -54,6 +54,11 @@ typedef struct RegisterAccessError { * 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; @@ -71,6 +76,10 @@ struct RegisterAccessInfo { void (*post_write)(RegisterInfo *reg, uint64_t val); uint64_t (*post_read)(RegisterInfo *reg, uint64_t val); + + struct { + hwaddr addr; + } decode; }; /**