From nobody Thu Oct 31 00:17:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+105183+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1684847095361996.7560676680149; Tue, 23 May 2023 06:04:55 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 9oFGYY1788612xgoUCKqXzgE; Tue, 23 May 2023 06:04:55 -0700 X-Received: from EUR03-AM7-obe.outbound.protection.outlook.com (EUR03-AM7-obe.outbound.protection.outlook.com [40.107.105.65]) by mx.groups.io with SMTP id smtpd.web11.21717.1684847093063792406 for ; Tue, 23 May 2023 06:04:53 -0700 X-Received: from AM0PR03CA0066.eurprd03.prod.outlook.com (2603:10a6:208::43) by DU0PR08MB7392.eurprd08.prod.outlook.com (2603:10a6:10:353::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Tue, 23 May 2023 13:04:49 +0000 X-Received: from AM7EUR03FT048.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:0:cafe::a4) by AM0PR03CA0066.outlook.office365.com (2603:10a6:208::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29 via Frontend Transport; Tue, 23 May 2023 13:04:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+105183+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT048.mail.protection.outlook.com (100.127.140.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.14 via Frontend Transport; Tue, 23 May 2023 13:04:48 +0000 X-Received: ("Tessian outbound e13c2446394c:v136"); Tue, 23 May 2023 13:04:48 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 586c460c4527615d X-CR-MTA-TID: 64aa7808 X-Received: from 113e4eba5dfc.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FA9810DC-5B8C-45A8-9652-9C678EA55CA7.1; Tue, 23 May 2023 13:04:37 +0000 X-Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 113e4eba5dfc.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 23 May 2023 13:04:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GDVUl1+mrc1Q0TrkMf+auN6Q1CK8iqITFVAO1L1+yFOdbcQzmXbMyXEFSiA/6vnz8qIZLO2wo9Yb4BtC8f3h7UQcEQZAiAlgb5jjNdb9KJF8E4w8rPi4puBGuDV243/5I9k0AIc6BUOzSOhOP7XycBKyC8TaxwvDl4hRb9HSnyRXcCpqGpxvMyuqFfDM2aw/PYKLh3qIXuU7TXSyBjXDc/0EYPOO+erRKfAGSGSVn46uPlhEcmdi/BKG8BjgVVRg5BD2M3U8MT7DB0be0QVwZ10p8tOFWgH5QdKM3vF4YJR4I3ZV2KFFoK0lJiA0aCoVROfCrn6VKC33vGuQ3jRhrg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PLinzapPJysSxrfPlPPA5lCdBv2fakLFiQ6J5iu44uE=; b=Z1ULxdNJryq3LnO1heKlfCZ32EyQ2TKyCJjbjG4XU/8qH1+CbJgqS9TNeA3YfuNgkiRYV+3t/cJTr5HPGCUAQbc/9GhfvuNiGdM491J/Oap9BdLMOGYsf78PPBoDj06KlQxASnikKo/dvawFrCWlnMPzeKRxxFYAtluAQscdzHiqJgWkoPQKha+ydgQHI7z+v6UCY4Y2ilDHThJr7wNRZj3cQ2ZSk1pYsIVFR7zXymMdoAuZGqcvr0AOYHxqxVqFA11wVHXSMEKtT4rk7ZL4vOozz5CAMbnOoIgdaNBYK5r3MK+Qo3xXSVqRvgDeXhlw7GN1Qw2JSC8oA5L0u86LKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from AM6PR10CA0025.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:89::38) by GV1PR08MB7377.eurprd08.prod.outlook.com (2603:10a6:150:21::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Tue, 23 May 2023 13:04:33 +0000 X-Received: from AM7EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:89:cafe::fc) by AM6PR10CA0025.outlook.office365.com (2603:10a6:209:89::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29 via Frontend Transport; Tue, 23 May 2023 13:04:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C X-Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT059.mail.protection.outlook.com (100.127.140.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6433.14 via Frontend Transport; Tue, 23 May 2023 13:04:33 +0000 X-Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 23 May 2023 13:04:28 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 23 May 2023 13:04:28 +0000 X-Received: from E114225.Arm.com (10.1.196.36) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Tue, 23 May 2023 13:04:28 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v1 10/12] ArmPkg: Prevent SgiId from setting RES0 bits of GICD_SGIR Date: Tue, 23 May 2023 14:04:19 +0100 Message-ID: <20230523130421.10804-11-sami.mujawar@arm.com> In-Reply-To: <20230523130421.10804-1-sami.mujawar@arm.com> References: <20230523130421.10804-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT059:EE_|GV1PR08MB7377:EE_|AM7EUR03FT048:EE_|DU0PR08MB7392:EE_ X-MS-Office365-Filtering-Correlation-Id: 9bfd94aa-1c7a-4e86-85b5-08db5b8e49ed x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: RVTDUUHkQ0AyPNvDHgcwQE/HFeDtmENCpI2pvYqg6hAyKlkdB9qqowj6ZT1W4A8HFOTyZmbe74pN4c2y0tIcFuzLpHqeu003lzuwMSIZ5jnteCKlKnueKF4oN18MJtBXbRJRpEgL99//hyeH2qkUAmyACfrE9ePXF2RIj3HCDcL0aXh9zMFFgTWDsN72KKkkmpEQbzN1o8x7xkVo/ZedN9V3dHUfr7Ud0xE5ev/a7BMW7AxkqS26TczPZXX18zFvAqY9ps50JfIODBaUc9NRmgHFQIPX4wBd79oLQ4UBpFSaiMhQ0TFrxi9SYTdMPdzIXU+8LBHRsaDrwtiMCwD+fUab7G+3zbmq52kaylSvIqOoS2LtcQ/Ofuw3R4dBtfizXg6qK12V+dMZB94B8aZQGH47ulCStvnR0kQotVb6Md2aAYXaTRKUkrrpiGKnU44zH0DNJK5a6XayVf93p7ncaBmWsWeqVZldLnT+g/N/N2XKFQy8Eody/C7c6FmIp7BIaHp0fS9tkqEd5mR3CkThvjLSUyGbBsR9nAVFzn6POFFAq36Eb6aBgtVn0KtTdxzXPtNMYb0xP7CIliZAz6xSpIxhO6aa0wzSOrjKtN8+8KHS6d2bQyUTY3fifQZdBqlTz9yRvnpC4ZFvvgMF+HRyiijy2ELKoVUdR3VrHmMg+rHsRIB+nSiRcMJDb55fXfGL6jOPSrlXKq3CPFSVagLleyWOIfppdCS3sBK89wT2mXEe5K2iIIzn078rPr3FPP6U52jE8ePO8TDXh4nBs8uDsQ== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(346002)(39860400002)(136003)(396003)(376002)(451199021)(36840700001)(46966006)(40470700004)(82740400003)(186003)(1076003)(26005)(356005)(81166007)(40460700003)(44832011)(2616005)(36860700001)(47076005)(36756003)(83380400001)(426003)(336012)(2906002)(40480700001)(316002)(6666004)(70586007)(70206006)(4326008)(6916009)(41300700001)(7696005)(86362001)(54906003)(478600001)(82310400005)(8676002)(8936002)(5660300002)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB7377 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 346ada08-765c-4c97-1811-08db5b8e40a5 X-Microsoft-Antispam-Message-Info: MdE887o2krNhrvD/EkW1VlyTgsWw305Tdb5V+sQOwoMSjJ5EPsqU20+yd6A6HevclrKKqKJGZBmsrzbVGstB7UjlHiudYV8s40IPaQDmk03MT2ejuyS9O9AbUitw82GdfHkBXQT4jafyhHtPiQJNd8B2dF3qFTG/9kz1nOkos1F4v+Ig/qgJIUuUFJpqfnxg09PiBlIBa3+xa3ZpINdQPJpFs2gnPLoNsmIaJnKYBl3rH58x0Nrnjy/s3QbjzWzMHQvX7xPnxJImZkI6139KinSrG+DGggiA3/Ql24v4jkrWIfs2RKl6o4NufKNk46WahLgb4VdNfkY8EbeCxik7sDIyPiwILI2n2vnXRXxys2/QG3nX6lG90KuRYnCw4S9hiXyDlp6Vr3FBvSnVW2apGhfSyINPSpugj7ikApU/aMo33HDu6t3yBMOL3oHqzt1OGrovGk1b0K6gLSI9nSk24K7huBobP6EJEEUUJQKSyg6Lc42/H2/0vaolQOt3w8a0HCmMWMr4+IV50oTK92nCjKpRyQp+D8Mn+ibwvDoUEn39BPmuibRwf1UxydLGNELOLWLQ8qMhldMMif21Teh23SZvAjJjaSgqs9LwWkiGj7sMhmVFDYR4x13VQJ1kaTKfEtCokkkZTkVEeaJ0nooRQdiLb4PjYlUVy0m1uwEIyV/z2zYMjqOrJqoDMfC5zrY4HCPyIZwk1zGR47cug9qVEMDdt8sj22+MckAFbPVR9SzZtWElSIy/k0IYwSO9UGea X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 13:04:48.6218 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9bfd94aa-1c7a-4e86-85b5-08db5b8e49ed X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7392 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com X-Gm-Message-State: dkgtKSShAlJc0tQhmNfSkQP8x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684847095; bh=e7ax0zzvDPdwzg03RDPNlM6IG2acKxBvVLOgryr+8jk=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=edFyhrSjgc3sZP4bLCv5YPBtboDYm1G22zcmCLRq6CapvglDbaoFpkzgLj+++p6klHt /dOGstB1T3BFBQwkA5Zc5WY1/QydR9acSKpOa4Woao11ue7JQeTPM1ujPK31AcCS5cXox 69BN4EYnaZkwP1tlHyV4ZWjEEwEO9XxCM8Q= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684847096476100010 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" GICD_SGIR is a 32-bit register, of which INTID is bits [3:0] and Bits [14:4] is RES0. Since SgiId parameter in the function ArmGicSendSgiTo () is UINT8, mask unused bits of SgiId before writing to the GICD_SGIR register to prevent accidental setting of the RES0 bits. Signed-off-by: Sami Mujawar Reviewed-by: Ard Biesheuvel --- ArmPkg/Drivers/ArmGic/ArmGicLib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmG= icLib.c index df61e3aad4a7899eaa888cb248ad2a285c7f317d..0127cca3bf0567bc80702f415e9= cbb9bd2709fbc 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2011-2021, Arm Limited. All rights reserved. +* Copyright (c) 2011-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -148,7 +148,9 @@ ArmGicSendSgiTo ( { MmioWrite32 ( GicDistributorBase + ARM_GIC_ICDSGIR, - ((TargetListFilter & 0x3) << 24) | ((CPUTargetList & 0xFF) << 16) | Sg= iId + ((TargetListFilter & 0x3) << 24) | + ((CPUTargetList & 0xFF) << 16) | + (SgiId & 0xF) ); } =20 --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#105183): https://edk2.groups.io/g/devel/message/105183 Mute This Topic: https://groups.io/mt/99086466/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-