From nobody Thu Apr 25 05:37:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=xilinx.com) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581686553576733.8503694515819; Fri, 14 Feb 2020 05:22:33 -0800 (PST) Received: from localhost ([::1]:38712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2avQ-0002Kw-C7 for importer@patchew.org; Fri, 14 Feb 2020 08:22:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49859) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2auF-0000lB-9g for qemu-devel@nongnu.org; Fri, 14 Feb 2020 08:21:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2auE-0004zM-5e for qemu-devel@nongnu.org; Fri, 14 Feb 2020 08:21:19 -0500 Received: from mail-co1nam11on2066.outbound.protection.outlook.com ([40.107.220.66]:6211 helo=NAM11-CO1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j2auD-0004vb-UB; Fri, 14 Feb 2020 08:21:18 -0500 Received: from SN4PR0201CA0045.namprd02.prod.outlook.com (2603:10b6:803:2e::31) by DM6PR02MB6044.namprd02.prod.outlook.com (2603:10b6:5:1f5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22; Fri, 14 Feb 2020 13:21:15 +0000 Received: from CY1NAM02FT009.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::201) by SN4PR0201CA0045.outlook.office365.com (2603:10b6:803:2e::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22 via Frontend Transport; Fri, 14 Feb 2020 13:21:15 +0000 Received: from xsj-pvapsmtpgw01 (149.199.60.83) by CY1NAM02FT009.mail.protection.outlook.com (10.152.75.12) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.2729.22 via Frontend Transport; Fri, 14 Feb 2020 13:21:14 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1j2auA-0001Ua-7B; Fri, 14 Feb 2020 05:21:14 -0800 Received: from [127.0.0.1] (helo=xsj-smtp-dlp1.xlnx.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j2au5-0006fn-3U; Fri, 14 Feb 2020 05:21:09 -0800 Received: from xsj-pvapsmtp01 (xsj-smtp1.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id 01EDL8iT013753; Fri, 14 Feb 2020 05:21:08 -0800 Received: from [10.140.6.35] (helo=xhdsaipava40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j2au4-0006fc-3G; Fri, 14 Feb 2020 05:21:08 -0800 Received: by xhdsaipava40.xilinx.com (Postfix, from userid 14131) id 9ADB513C0374; Fri, 14 Feb 2020 18:47:01 +0530 (IST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eRu5W4zFYC0LfzTqbD3nOPT7mD5l7pWpXe4MIFw5iPeppKBQqIESiDJmR/nnkN99kTM66yIig2jLhD7eIOKAy9AkRzJCvE3BCGMT4GTMb/pjaepwtvmxjvNa54CocHkmmXAH94pnMb1YhVUuFSHSD8j3gBwD22J+8PbI++9jTmYZyHN92J1AH9YywdY8SCSfnFdPvQIsuUIZZ37Abtyr68La2iOQtkACxnUFIjVSiYZyfPX+TUrSVlVbPSqd6+SSGTp8J6V1+zHEhnu4kyvgKU/WIySEqLGvajz1R8tVaYEXB3enx4ThDO5fLZAJpuErrDDHeHOZXiahyEgwKfoZ/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JwdS5ExHOIylaFbMS9612gcCXi3YjIuVuD5VCE9IRBQ=; b=X8b+GLJggOhaGzjD6GerRATf0dVstVf6XJkDmGxwmiccYcSFDGB3b3sHSrGWejz4SQgTM6nUYie/RxtZ6LnJSp2wCVeddM9uXOAzYQkxQa1K5Z+x85yczT3Ym2wTKG0nkkQIu3fWi/IQXXIDnCBuAoDeAAnpkSYzb+pGZpRwMO58P6WDymuyBliQirHOJYDTPR9IYzU/oL7finJKS4Z1DDx8ad72zFEDRZe+Gwhnp4cDTYaemHkCfy7mn35AgHZbRaz3DdFZlBqNusxrGu3jh5MHbHZkCtGgB+Pkt7TOevQRhI2nCeveNZ3Vl7sUwBiFKEQOCdNU4xVTNTBjuNgblA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=suse.de smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JwdS5ExHOIylaFbMS9612gcCXi3YjIuVuD5VCE9IRBQ=; b=bd4WNdukYPOK6oi4nScevVN4e/DIfJeEOKycjJP6enJ4rR/hWs55ZLlwJ3wOeyxJ2SlPsIMyzsupTkrbLppSQvOP3dRdAPY7thPnDm5tNjVE4VqAEG6DUzqWyLj2N3LEpZgR5nqlP+d/eF5fNOkTRnfEocIg80/iMNtJzpJoYvE= Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; suse.de; dkim=none (message not signed) header.d=none;suse.de; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; From: Sai Pavan Boddu To: "Edgar E . Iglesias" , Alistair Francis , Peter Maydell , Anthony Liguori , afaerber@suse.de Subject: [PATCH 1/3] arm_gic: Mask the un-supported priority bits Date: Fri, 14 Feb 2020 18:46:50 +0530 Message-Id: <1581686212-9625-2-git-send-email-sai.pavan.boddu@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581686212-9625-1-git-send-email-sai.pavan.boddu@xilinx.com> References: <1581686212-9625-1-git-send-email-sai.pavan.boddu@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(346002)(136003)(376002)(396003)(199004)(189003)(70586007)(4326008)(110136005)(70206006)(316002)(2906002)(42186006)(336012)(356004)(6666004)(426003)(5660300002)(26005)(186003)(6266002)(2616005)(81166006)(478600001)(8676002)(81156014)(8936002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR02MB6044; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 476c6e60-7bdb-4891-5607-08d7b150c47e X-MS-TrafficTypeDiagnostic: DM6PR02MB6044: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:392; X-Forefront-PRVS: 03137AC81E X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YlejLYiRkUVK3ZBOItsWqMXZCEwNVQiGD0LR8kz7ipa4wWWDTFZ3+quUcAw+IbBQ7A84my1Q7hNqlVLp8tTCjEsEC9x1Z+aBRYmJlDvY/bd2Xdex7u/MoY1MHyweiZ61MIT2KpMh1BPGSir6UJ7T2M3QtqeXbMfoW+hl6su4bVut0V4RNdbGINdkRp/QXZg/52Z2J9VZzSYP4gS5PjR0zlaLBGzRM3U+/fIc66GHa9bwYUB2cQiyHTTWZDMjHvfxxjx4Nquawq3614nCFzhH78FgvaiIylZzzV2xG64aXMqJO6DzMHFYzd+iGndMLghE1dEQLLg46No0ZuFkHp9tdNJIqQabQTvVTvd+2WK15ARdqYejJUHafv17btkzYimH8FY7/s94DtyFEpxeT4EnWq/ZUXriRu/SJ8BsHehdlRwqcRI4l3vKfk5/6ol6f97S X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2020 13:21:14.6597 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 476c6e60-7bdb-4891-5607-08d7b150c47e 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.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB6044 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.220.66 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @xilinx.onmicrosoft.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Priority bits implemented in arm-gic can 8 to 4, un-implemented bits are read as zeros(RAZ). Signed-off-by: Sai Pavan Boddu --- hw/intc/arm_gic.c | 9 ++++++--- hw/intc/arm_gic_common.c | 1 + include/hw/intc/arm_gic_common.h | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 1d7da7b..8875330 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -43,6 +43,9 @@ } \ } while (0) =20 +#define UMASK(n) \ + ((((1 << n) - 1) << (8 - n)) & 0xFF) + static const uint8_t gic_id_11mpcore[] =3D { 0x00, 0x00, 0x00, 0x00, 0x90, 0x13, 0x04, 0x00, 0x0d, 0xf0, 0x05, 0xb1 }; @@ -652,9 +655,9 @@ void gic_dist_set_priority(GICState *s, int cpu, int ir= q, uint8_t val, } =20 if (irq < GIC_INTERNAL) { - s->priority1[irq][cpu] =3D val; + s->priority1[irq][cpu] =3D val & UMASK(s->n_prio_bits) ; } else { - s->priority2[(irq) - GIC_INTERNAL] =3D val; + s->priority2[(irq) - GIC_INTERNAL] =3D val & UMASK(s->n_prio_bits); } } =20 @@ -684,7 +687,7 @@ static void gic_set_priority_mask(GICState *s, int cpu,= uint8_t pmask, return; } } - s->priority_mask[cpu] =3D pmask; + s->priority_mask[cpu] =3D pmask & UMASK(s->n_prio_bits); } =20 static uint32_t gic_get_priority_mask(GICState *s, int cpu, MemTxAttrs att= rs) diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c index e6c4fe7..e4668c7 100644 --- a/hw/intc/arm_gic_common.c +++ b/hw/intc/arm_gic_common.c @@ -357,6 +357,7 @@ static Property arm_gic_common_properties[] =3D { DEFINE_PROP_BOOL("has-security-extensions", GICState, security_extn, 0= ), /* True if the GIC should implement the virtualization extensions */ DEFINE_PROP_BOOL("has-virtualization-extensions", GICState, virt_extn,= 0), + DEFINE_PROP_UINT32("num-prio-bits", GICState, n_prio_bits, 8), DEFINE_PROP_END_OF_LIST(), }; =20 diff --git a/include/hw/intc/arm_gic_common.h b/include/hw/intc/arm_gic_com= mon.h index b5585fe..6e0d6b8 100644 --- a/include/hw/intc/arm_gic_common.h +++ b/include/hw/intc/arm_gic_common.h @@ -96,6 +96,7 @@ typedef struct GICState { uint16_t priority_mask[GIC_NCPU_VCPU]; uint16_t running_priority[GIC_NCPU_VCPU]; uint16_t current_pending[GIC_NCPU_VCPU]; + uint32_t n_prio_bits; =20 /* If we present the GICv2 without security extensions to a guest, * the guest can configure the GICC_CTLR to configure group 1 binary p= oint --=20 2.7.4 From nobody Thu Apr 25 05:37:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=xilinx.com) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581686619144691.3779817800187; Fri, 14 Feb 2020 05:23:39 -0800 (PST) Received: from localhost ([::1]:38734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2awT-0003w4-I9 for importer@patchew.org; Fri, 14 Feb 2020 08:23:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49867) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2auF-0000lu-JN for qemu-devel@nongnu.org; Fri, 14 Feb 2020 08:21:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2auE-00051S-Hj for qemu-devel@nongnu.org; Fri, 14 Feb 2020 08:21:19 -0500 Received: from mail-bn7nam10on2045.outbound.protection.outlook.com ([40.107.92.45]:39704 helo=NAM10-BN7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j2auE-0004ye-Cw; Fri, 14 Feb 2020 08:21:18 -0500 Received: from CH2PR02CA0018.namprd02.prod.outlook.com (2603:10b6:610:4e::28) by SN6PR02MB5549.namprd02.prod.outlook.com (2603:10b6:805:e4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.23; Fri, 14 Feb 2020 13:21:16 +0000 Received: from BL2NAM02FT030.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::205) by CH2PR02CA0018.outlook.office365.com (2603:10b6:610:4e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.23 via Frontend Transport; Fri, 14 Feb 2020 13:21:16 +0000 Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT030.mail.protection.outlook.com (10.152.77.172) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.2729.22 via Frontend Transport; Fri, 14 Feb 2020 13:21:16 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1j2auB-0001WR-GC; Fri, 14 Feb 2020 05:21:15 -0800 Received: from [127.0.0.1] (helo=xsj-smtp-dlp1.xlnx.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j2au6-0006g6-Cc; Fri, 14 Feb 2020 05:21:10 -0800 Received: from xsj-pvapsmtp01 (mail.xilinx.com [149.199.38.66] (may be forged)) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id 01EDL97s013816; Fri, 14 Feb 2020 05:21:09 -0800 Received: from [10.140.6.35] (helo=xhdsaipava40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j2au5-0006fq-DM; Fri, 14 Feb 2020 05:21:09 -0800 Received: by xhdsaipava40.xilinx.com (Postfix, from userid 14131) id EB4CB13C0374; Fri, 14 Feb 2020 18:47:02 +0530 (IST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FM+K7rtIJbMx2UBL0HAVnPCX3U7vkh+WUrZCMKNDJj5e8UBv6pGTayTT5pyL6mAOPNyrqzg49ksSs2U5D7Re0i/hOn979EhGG5jSXvZIz6ec+BAJ5MZ2rxpiIp362eGDdEbb2unUnMu7+GmMYmJcaoFZEzMYOOzAShZSTHDOklxTIeu3eNzvq+9EQEb2wKlOg1/fSjXQguGW1e5rTltyuPPFUhOPEaHTB/HOW4rGZsw6wCW1b1x6gQW1zuELHPMtieIQT189lQPIvW8Q1/kH6HtNbTawUqPYIC75QUjqOthJOoObprmfGJRvoY9usHKlk0pgQZtQX10CL/7omkgWbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EcGr1Qr5JydrV5ET6Vr1InXd3Uv3Lp6a6CD9kG5YAEI=; b=cJ9JzR88fLRdn90iIiXhAtDAwEGJjdtPQxSJ0uthYFOdjX7Nq/nJ4vO5DKmRjpQfOkHxk6c2RSsf0htLWQQu0ADFJRLs90VBHKC5J66F0oQSzjWInfpGirlEnnFxERRdKXvqJpYuk2W1wo0q4nlvtjQcSNJRmTGXoccV5TLuAm8NoTX/gy4PvyJEPg19TSixkmXpqLC1xY0nKx334qrJaBoouDxWQ1lYfZ8mwUR7mRkXxd8eWv/nsDKtwviODLZsc/+TKRui6PkBTPUG1ZVUbqH09q3enMEIgbaSz/fcba0Vsm9t31+AJi10iXZO3Yk8JPmAAdPqzNbmudVb+CeOLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=suse.de smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EcGr1Qr5JydrV5ET6Vr1InXd3Uv3Lp6a6CD9kG5YAEI=; b=EF4Xc90ozDc/kmkQi44rYmwnoG/8d4XfNudYYV7gE6xJUEGKN+2fe/1a3oGq1PKZxIAIpPtuLOkCsr5X/Traw9OFhhazuO1vP0vDquy2hp5KBcQ/iMpuU4nl7Bep/X4qpJ1+6q605SY2PkdAHwB/zW0nsvsqep6UpmMMFCFWmZ4= Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; suse.de; dkim=none (message not signed) header.d=none;suse.de; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; From: Sai Pavan Boddu To: "Edgar E . Iglesias" , Alistair Francis , Peter Maydell , Anthony Liguori , afaerber@suse.de Subject: [PATCH 2/3] cpu/a9mpcore: Add num priority bits property Date: Fri, 14 Feb 2020 18:46:51 +0530 Message-Id: <1581686212-9625-3-git-send-email-sai.pavan.boddu@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581686212-9625-1-git-send-email-sai.pavan.boddu@xilinx.com> References: <1581686212-9625-1-git-send-email-sai.pavan.boddu@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(396003)(136003)(346002)(376002)(39850400004)(189003)(199004)(478600001)(110136005)(2616005)(26005)(6266002)(186003)(4326008)(336012)(316002)(70206006)(70586007)(81166006)(81156014)(8676002)(42186006)(8936002)(36756003)(356004)(6666004)(5660300002)(2906002)(426003)(42866002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR02MB5549; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; MX:1; A:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 22ea4f00-23ac-4881-a674-08d7b150c558 X-MS-TrafficTypeDiagnostic: SN6PR02MB5549: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:119; X-Forefront-PRVS: 03137AC81E X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VHPJDShSk0EN6pRR0KRrRp/l6pi1KEugsTvhsRSL9wsDmvL2KyAzLQ2o13RKpTB1iFIsPehx0mnVMgm/9/TFUs4ATgiLD/7X7Fro/pMCAfivNIXfSEhIgFTu+D/topFqnoQLkHupTbFcDGDvhZNO5jhgRjUt2D6m8abVWa20m7qRZis8mO6KC7UfDAoCSksGV78VGKnygQmNjUi6vg9ci3MF1KczBr3/E39h2oh0ZfsWHPT287UzaBhU9gNnFrH++33Ns9QMcCcKHqw9fIk3q7qxmLmvWhoqizYOzdHXzC5miaSF/OguiplhXOB2/X29toXkDnCQdkiKwVsHKHl40Lb2iBHSTz9wBrpqSEW7mnDBIwp/gLLwXI6kMbk4a1hCiHo94jUwjCvP1g/eOPsbXtjtHhd+CM8vQufPtMX4kZNZBNzB9p+72Vj7wgycuZ4Ti8yjnnh+rGrT8MTnLOa+YcCli/3Ps95qsUnSTsXvS9M= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2020 13:21:16.0894 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 22ea4f00-23ac-4881-a674-08d7b150c558 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.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR02MB5549 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.92.45 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @xilinx.onmicrosoft.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Set number of priority bits property of gic as guided by machine configuration. Signed-off-by: Sai Pavan Boddu --- hw/cpu/a9mpcore.c | 2 ++ include/hw/cpu/a9mpcore.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/cpu/a9mpcore.c b/hw/cpu/a9mpcore.c index 1f8bc8a..eb1e752 100644 --- a/hw/cpu/a9mpcore.c +++ b/hw/cpu/a9mpcore.c @@ -68,6 +68,7 @@ static void a9mp_priv_realize(DeviceState *dev, Error **e= rrp) gicdev =3D DEVICE(&s->gic); qdev_prop_set_uint32(gicdev, "num-cpu", s->num_cpu); qdev_prop_set_uint32(gicdev, "num-irq", s->num_irq); + qdev_prop_set_uint32(gicdev, "num-prio-bits", s->n_prio_bits); =20 /* Make the GIC's TZ support match the CPUs. We assume that * either all the CPUs have TZ, or none do. @@ -167,6 +168,7 @@ static Property a9mp_priv_properties[] =3D { * Other boards may differ and should set this property appropriately. */ DEFINE_PROP_UINT32("num-irq", A9MPPrivState, num_irq, 96), + DEFINE_PROP_UINT32("num-priority-bits", A9MPPrivState, n_prio_bits, 8), DEFINE_PROP_END_OF_LIST(), }; =20 diff --git a/include/hw/cpu/a9mpcore.h b/include/hw/cpu/a9mpcore.h index 5d67ca2..4f146bd 100644 --- a/include/hw/cpu/a9mpcore.h +++ b/include/hw/cpu/a9mpcore.h @@ -28,6 +28,7 @@ typedef struct A9MPPrivState { uint32_t num_cpu; MemoryRegion container; uint32_t num_irq; + uint32_t n_prio_bits; =20 A9SCUState scu; GICState gic; --=20 2.7.4 From nobody Thu Apr 25 05:37:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=xilinx.com) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581686707101598.7252167369114; Fri, 14 Feb 2020 05:25:07 -0800 (PST) Received: from localhost ([::1]:38753 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2axt-0005cz-Ta for importer@patchew.org; Fri, 14 Feb 2020 08:25:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49904) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2auH-0000pL-HW for qemu-devel@nongnu.org; Fri, 14 Feb 2020 08:21:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2auG-00056v-GM for qemu-devel@nongnu.org; Fri, 14 Feb 2020 08:21:21 -0500 Received: from mail-eopbgr680089.outbound.protection.outlook.com ([40.107.68.89]:2365 helo=NAM04-BN3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j2auG-00056C-9q; Fri, 14 Feb 2020 08:21:20 -0500 Received: from DM6PR02CA0123.namprd02.prod.outlook.com (2603:10b6:5:1b4::25) by DM6PR02MB5452.namprd02.prod.outlook.com (2603:10b6:5:78::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2707.23; Fri, 14 Feb 2020 13:21:17 +0000 Received: from BL2NAM02FT052.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::207) by DM6PR02CA0123.outlook.office365.com (2603:10b6:5:1b4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22 via Frontend Transport; Fri, 14 Feb 2020 13:21:17 +0000 Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT052.mail.protection.outlook.com (10.152.77.0) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.2729.22 via Frontend Transport; Fri, 14 Feb 2020 13:21:17 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1j2auC-0001WX-Kf; Fri, 14 Feb 2020 05:21:16 -0800 Received: from [127.0.0.1] (helo=xsj-smtp-dlp2.xlnx.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j2au7-0006gE-Gy; Fri, 14 Feb 2020 05:21:11 -0800 Received: from xsj-pvapsmtp01 (smtp3.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id 01EDLAwT008733; Fri, 14 Feb 2020 05:21:10 -0800 Received: from [10.140.6.35] (helo=xhdsaipava40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j2au6-0006g4-G9; Fri, 14 Feb 2020 05:21:10 -0800 Received: by xhdsaipava40.xilinx.com (Postfix, from userid 14131) id 096ED13C04B9; Fri, 14 Feb 2020 18:47:04 +0530 (IST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NTjb5iHP77g0uOxUPZUyIti7mzPgcm6ZO+jL6izptPT1Jy59YSn1EKki5txqDJyR5RtVrkSvjnyy3FTzfeZWulNYCwFj1ulxzmGiLmSNjwd6MsuBAg0PciQe12LAT/pkWwUTBYCFRJxoYbNu7A7P1QhS7JIBXpScnkBizB4JG9kQLlinOC6wq0nsF8z3/A1N9BFQ4wLfkK/q8u8Mw6+W0DXlEhO9QNuZ84q7tYiU7B8vsbS78VXYKiWoBn0lobiGaBXRtswazEylz1Nw9gvu8nb7ljrOdia/s1V7ZYGlra+uqY5GQwvCX1TCZujcmfi9A3PyElmr7KT9mSh42d1QYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1BJo5rEO5dzyXi04sXf9u5m3jLCW+OiBRx7qyMr5kOA=; b=ZBLqrk4gsDJXTyyH081Blc1/zkJtuilTAfixCIu6GIedFmWtJBPqzaBqLvBM59E57eUefWQiHZk78aAXHfPM0TtMLsWlbvCaMUO/tYj7k1wsaeADbviC9m6kfHOAoIs4GoHOxZ7RO7rabsFqSCKMoojlP2zDvWxFSRumAMc5Po4zNr7Y6AzfV+W9RicfGRyKxtsff2UHcPU7ZD5hB5N1l+FwPkQ968Cdq6qNRLT/wQgGKfG08GYlrQLKYpHYn0JfPAgK35Y9Tat5zs+PzeZ+b6sS8q8dAoCG1YdzXTyyy6ZipNxpR2lUMYmGQXrVfqW7k5j4HPSuzbpJ//lmdMDPIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=suse.de smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1BJo5rEO5dzyXi04sXf9u5m3jLCW+OiBRx7qyMr5kOA=; b=h5uuV+Tk7aVRH5V+E89gAvTduIjfed/7gJ+8YU45e4/nZRC0yW0wkJBmyqspjgcb8fAxs2LcmttODYFmpfVgXYzrdsuOXE5zbqlGhfvlGjVnf8QEki/P1gV5fiXc8ti/s+Vpw00UqULZqUuVht4dOlDGJsx/kXN1BgnnzqlAKyA= Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; suse.de; dkim=none (message not signed) header.d=none;suse.de; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; From: Sai Pavan Boddu To: "Edgar E . Iglesias" , Alistair Francis , Peter Maydell , Anthony Liguori , afaerber@suse.de Subject: [PATCH 3/3] arm/xilinx_zynq: Set number of priority bits Date: Fri, 14 Feb 2020 18:46:52 +0530 Message-Id: <1581686212-9625-4-git-send-email-sai.pavan.boddu@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581686212-9625-1-git-send-email-sai.pavan.boddu@xilinx.com> References: <1581686212-9625-1-git-send-email-sai.pavan.boddu@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(376002)(136003)(396003)(39850400004)(346002)(189003)(199004)(478600001)(4744005)(5660300002)(110136005)(36756003)(42186006)(316002)(6666004)(356004)(26005)(2906002)(186003)(2616005)(426003)(336012)(6266002)(4326008)(8676002)(81166006)(70586007)(81156014)(70206006)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR02MB5452; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; MX:1; A:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d48e064d-89f1-4933-105e-08d7b150c605 X-MS-TrafficTypeDiagnostic: DM6PR02MB5452: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:854; X-Forefront-PRVS: 03137AC81E X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cVeyM3/9/2w2bst//edilmt+gVRX6bWTZut9NNryIthck2+UwIH9HLj9v9OSpBZ4I74Qne7IxGkPCAAw660FQm5t4rLxDXfPHphtDfY2H3pTD6v0WbV8s1eNMngu4MyFs3El8ul6hwK9w8RMywxN2DakRfOCmKaO2B2/23a1uPU23io8w7EfOXODpP2sUyep25hYsGJpVPvqUlXy0OPx+DEQvzy11j5O52wLmGhG/s0x/3nnE+/4qA5DfFxyBelU7zEKledAVVe9dYBShpRzn48maox9TxjRPhxB1uLFZX7u8VRKvSHgF58ayciCwTQ6XeZHFSg1QMlzMzsreehgh42z2m+N4uJ8vPaFcxXgGlBOd6fdEPwRiFoH0Gktmlf6qy73naaRYkYXAkJbOBIhszG2FX5cA5+G1WjzpFxk5k3YfoOllTrInVJk9MLYANrw X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2020 13:21:17.2203 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d48e064d-89f1-4933-105e-08d7b150c605 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.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB5452 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.68.89 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @xilinx.onmicrosoft.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Arm GIC in Zynq SOC implements 5 priority bits i.e bits 7..3. Signed-off-by: Sai Pavan Boddu --- hw/arm/xilinx_zynq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index 3a0fa5b..7aa43ad 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -214,6 +214,7 @@ static void zynq_init(MachineState *machine) =20 dev =3D qdev_create(NULL, TYPE_A9MPCORE_PRIV); qdev_prop_set_uint32(dev, "num-cpu", 1); + qdev_prop_set_uint32(dev, "num-priority-bits", 5); qdev_init_nofail(dev); busdev =3D SYS_BUS_DEVICE(dev); sysbus_mmio_map(busdev, 0, MPCORE_PERIPHBASE); --=20 2.7.4