From patchwork Fri Jan 8 18:57:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 565031 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 23996140C0B for ; Sat, 9 Jan 2016 06:00:03 +1100 (AEDT) Received: from localhost ([::1]:37739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHcGX-0004mS-3a for incoming@patchwork.ozlabs.org; Fri, 08 Jan 2016 14:00:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHcGF-0004Ug-G4 for qemu-devel@nongnu.org; Fri, 08 Jan 2016 13:59:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHcGC-0002mc-B6 for qemu-devel@nongnu.org; Fri, 08 Jan 2016 13:59:43 -0500 Received: from mail-sn1nam02on0062.outbound.protection.outlook.com ([104.47.36.62]:59642 helo=NAM02-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHcGC-0002mW-63 for qemu-devel@nongnu.org; Fri, 08 Jan 2016 13:59:40 -0500 Received: from SN1NAM02FT010.eop-nam02.prod.protection.outlook.com (10.152.72.59) by SN1NAM02HT155.eop-nam02.prod.protection.outlook.com (10.152.72.169) with Microsoft SMTP Server (TLS) id 15.1.355.15; Fri, 8 Jan 2016 18:59:37 +0000 Authentication-Results: spf=fail (sender IP is 149.199.60.96) smtp.mailfrom=xilinx.com; nongnu.org; dkim=none (message not signed) header.d=none; nongnu.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 SN1NAM02FT010.mail.protection.outlook.com (10.152.72.86) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Fri, 8 Jan 2016 18:59:36 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:39901 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1aHcG8-00058a-4N; Fri, 08 Jan 2016 10:59:36 -0800 Received: from [127.0.0.1] (port=46623 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from ) id 1aHcG7-0007zm-UZ; Fri, 08 Jan 2016 10:59:35 -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 u08Is6LI012565; Fri, 8 Jan 2016 10:54:06 -0800 Received: from [172.19.74.182] (port=51730 helo=xsjalistai50.xlnx.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from ) id 1aHcG6-0007zj-U3; Fri, 08 Jan 2016 10:59:34 -0800 From: Alistair Francis To: , Date: Fri, 8 Jan 2016 10:57:13 -0800 Message-ID: <861da5c44f261ee3f160607c9d128ce0e9f89e9e.1452277501.git.alistair.francis@xilinx.com> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-22052.005 X-TM-AS-Result: No--1.188-7.0-31-10 X-imss-scan-details: No--1.188-7.0-31-10 X-TMASE-MatchedRID: LtdDkAUA39X4DetQQCtOBfzu9Lw9C7fAPZmbnY2qDInfUZT83lbkECW4 gi/wgh1NvQwDKMUFVHQS5thlB89aW79ZdlL8eonaC24oEZ6SpSmb4wHqRpnaDttSQLwFRJi5zkP 7zATTNX1l66ZlnvIHHwLV3D3ZnU5xlHKmxxYuk2CAueG3LlBx+iYykE+cFiX6SULSTjypHDwZZO gZztc429VGKsGTt2/S6yORifnpUaoNUYeVfcC2R3iZNoNUzKgUN+XOQZygrvY= 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)(199003)(189002)(64026002)(36756003)(92566002)(87936001)(1096002)(586003)(105606002)(1220700001)(4001430100002)(23676002)(77096005)(106466001)(50986999)(85426001)(4001450100002)(33646002)(86362001)(19580395003)(5003600100002)(5001960100002)(5001770100001)(50466002)(81156007)(19580405001)(107886002)(229853001)(189998001)(118296001)(5820100001)(50226001)(71366001)(6806005)(2906002)(5008740100001)(450100001)(4326007)(47776003)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1NAM02HT155; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; PTR:unknown-60-96.xilinx.com; A:1; MX:1; LANG:en; X-MS-Office365-Filtering-Correlation-Id: fef3b925-6502-4974-2b8d-08d3185ddab2 X-Exchange-Antispam-Report-Test: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:SN1NAM02HT155; UriScan:(192813158149592); X-Microsoft-Antispam-PRVS: <999d9d2894b04d5cb73ab99e7312dc33@SN1NAM02HT155.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(13015025)(5005006)(13018025)(13017025)(520078)(10201501046)(3002001); SRVR:SN1NAM02HT155; BCL:0; PCL:0; RULEID:; SRVR:SN1NAM02HT155; X-Forefront-PRVS: 0815F8251E X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2016 18:59:36.4975 (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: SN1NAM02HT155 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.36.62 Cc: qemu-arm@nongnu.org, soren.brinkmann@xilinx.com, alistair.francis@xilinx.com Subject: [Qemu-devel] [PATCH v1 1/1] arm_gic: Include the GIC ArchRev in the ICPIDR2 register 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 The ARM GIC documentation (page 4-119) describes that bits 7 to 4 of the ICPIDR2 register should include the GIC architecture version. This patche ORs the version into the existing return value. Signed-off-by: Alistair Francis Tested-by: Sören Brinkmann --- hw/intc/arm_gic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 13e297d..f47d606 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -688,6 +688,10 @@ static uint32_t gic_dist_readb(void *opaque, hwaddr offset, MemTxAttrs attrs) } else /* offset >= 0xfe0 */ { if (offset & 3) { res = 0; + } else if (offset == 0xfe8 && s->revision != REV_11MPCORE && + s->revision != REV_NVIC) { + /* ICPIDR2 includes the GICv1 or GICv2 version information */ + res = gic_id[(offset - 0xfe0) >> 2] | (s->revision << 4); } else { res = gic_id[(offset - 0xfe0) >> 2]; }