From nobody Sat Dec 21 12:59:48 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+105244+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 1684935547481258.4546954008954; Wed, 24 May 2023 06:39:07 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id OeQUYY1788612xSAt87rgqZR; Wed, 24 May 2023 06:39:07 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.89]) by mx.groups.io with SMTP id smtpd.web10.9078.1684935546202380590 for ; Wed, 24 May 2023 06:39:06 -0700 X-Received: from DB7PR05CA0057.eurprd05.prod.outlook.com (2603:10a6:10:2e::34) by GV1PR08MB8106.eurprd08.prod.outlook.com (2603:10a6:150:95::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Wed, 24 May 2023 13:38:53 +0000 X-Received: from DBAEUR03FT020.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2e:cafe::a6) by DB7PR05CA0057.outlook.office365.com (2603:10a6:10:2e::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:53 +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+105244+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 DBAEUR03FT020.mail.protection.outlook.com (100.127.143.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:52 +0000 X-Received: ("Tessian outbound 3570909035da:v136"); Wed, 24 May 2023 13:38:52 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 662fc6eaa82676f6 X-CR-MTA-TID: 64aa7808 X-Received: from 1cac962d7803.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 53D19BA8-46C0-44A4-94A1-08E202D61E86.1; Wed, 24 May 2023 13:38:46 +0000 X-Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1cac962d7803.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 May 2023 13:38:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a8nl0MoqnVfgGGseuUYk9TyUwmtIN77rgyKW004nmxt0hZJXkOHcQuEUWtmet+5/CJqxIxPBEbF4wVBelVMWj8mu1ShanKe4ec6u1g/wxFwEqzXBDBIzadwfqIxxT+cUoXNz44WVUVj2Q47U8/28BTkVkXMN0klND/d/KqgNSRGIGEh3ehmhHE93zoKLuINWtN3AX/Z+dETfP21IZnFLKJLdMktCkgYTQ34NvmPYiM8hY/hhOfGFQ3bQVmO8JOzZa+90ukI6DfIrc0AGK0zESu03Ja1akWQiMktKtet1mvwv7suPoI6AXnATKaQswayF3tO9E01mpisn6ZsEOotqGQ== 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=vJ//nmb++wWxqJyExDf1Skexr5Y5KCQxckRMBc9qhCA=; b=eAxk/MsV1hG3gVtG5H+5RGUOoc79/C7F+IKZTf6Qy7vi6ZYYowsmx3QzG3ffe1GMZN7j6FLEz1Ljh9xB1CZk9VLX3qUkMpRBG+gskyqUd0LSmMJat230lHpNNecgmwwUA8woTWrPPa6KTlTqxMLHdGm3Rz/o9M/Ws6h4IEPvSUqu7Keva3UgTDjZV4JOY0SrNRCL4TW5eMOq3kLn1qr4ULSpGmEvmD+lorRx+xzhdJIB3/QpF9S13TqMw/SN6VuUltWfsDJjJSXbrCSOnjv/EfWJ/Nkea9rJ5R+k3ts+UO91cpWEU7siFjqFG1mVl18++ytrxFQO1DKKeBe3RVGpXg== 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 DB6PR0802CA0026.eurprd08.prod.outlook.com (2603:10a6:4:a3::12) by DB9PR08MB6745.eurprd08.prod.outlook.com (2603:10a6:10:2a2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Wed, 24 May 2023 13:38:42 +0000 X-Received: from DBAEUR03FT058.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:a3:cafe::b0) by DB6PR0802CA0026.outlook.office365.com (2603:10a6:4:a3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29 via Frontend Transport; Wed, 24 May 2023 13:38:42 +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 DBAEUR03FT058.mail.protection.outlook.com (100.127.142.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:42 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 24 May 2023 13:38:41 +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; Wed, 24 May 2023 13:38:41 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v2 01/11] ArmPkg: Fix data type used for GicDistributorBase Date: Wed, 24 May 2023 14:38:30 +0100 Message-ID: <20230524133840.28612-2-sami.mujawar@arm.com> In-Reply-To: <20230524133840.28612-1-sami.mujawar@arm.com> References: <20230524133840.28612-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT058:EE_|DB9PR08MB6745:EE_|DBAEUR03FT020:EE_|GV1PR08MB8106:EE_ X-MS-Office365-Filtering-Correlation-Id: d4ff3e5f-db32-4e8b-f901-08db5c5c36d3 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: skEZhxVYAoXySOWi+66WfoiekPfcUnpq40tpgstnUABsACUTUySEu/w8NUhxO61J37fAPyedxoNJY7FhUimv72yyAMGjkBsPcnvUqS09tHzAH7X2TvxkyNCjY/UJazN0XB+SxY8+YE+hkd06Gjj+BKXR3Ja2LJN9KYx12D9I32d06/nOAO5n0lSOVsMXYL38fqKbxLCHW9YP08IX4Tz2sOLVoHerSC931vMcnzu9evyoTIa+vHlpJ5B4Tp1mQiGV4iIz1EFupMpxqaaCsKBn9ZYL+EwTSXL3Y64GIsD1DECi3Zb18yK4ICx7RoSammggvBoYUEoDSIgnAH5Cs7ZdrCNGvwQEZ9RQ1+1DdkrXT+dUBd7/lOb2RBfkGNlctM6MSoQKveyzMwOPoCekETeDUxfSs/BlNWGWjxPrmyvcseg1tigGOUS93kETnZg84SYNPuk/xAcR//OmMp3H+616JQ6WhqPDXCkKKK8OTGit68fI7MTrFvcnt/pXA1RkJWUPP5O0M8POkAml5xJnj5NMmfzRfaM3IJTy0G2pW6cRDiHWNoHW2WaIDgBtQJSEzsDfS8tywQJmR1RBqunCAFlJt61XSFPEzUlsOuTHfdedV96bMxVGIRDDgeu50iNbRonXXbQwz+LkU7k2s4CHok8btDc+zsqeMlmQEIzKfDMKs1GO5mUjxAAiORhntIQBVm3/+APrD6FQ8QWcqh/RiOmCdGTTO4cRTZxv8FOhb7+Q1E8zID+Q8bLbFC1jjcKezfyIFMFPuX7E+kpy/8o49uvhCQ== 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)(376002)(136003)(39860400002)(346002)(396003)(451199021)(36840700001)(46966006)(2906002)(44832011)(83380400001)(5660300002)(47076005)(8936002)(8676002)(70206006)(19627235002)(36756003)(70586007)(6916009)(966005)(4326008)(41300700001)(82310400005)(54906003)(478600001)(7696005)(40480700001)(6666004)(316002)(26005)(336012)(426003)(2616005)(1076003)(356005)(86362001)(81166007)(186003)(36860700001)(82740400003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6745 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: eb1ecdc8-82d8-4778-fd65-08db5c5c30ce X-Microsoft-Antispam-Message-Info: SmqJ9Op8Hih2i+E1ax/WeD/MzvYR2KTD+u6AI4aV+hy+M5CSMh7GSsLv8Z6u7jKebs7Q4T9iU50lWVs/Pj45oBFyQmxunRwY4ugdK/eIkmUUUz5AsIjjXFRrLDC//D5SI1Q6mvfi5ZaI/iHsPz2Dxm+kcjkBSRSQ/BgGPnTZ3+WyyJ97TquI90yjG4byk4ETWPMacqIjYi75T/6CY8+oi4H3WHIYf0KmVR9XyfaU9j81VmsgcwsjpU5hSwyx/YiocJSkdMi5NT3A5D0VvKEoh1mHXjBmKBY53GyyApH3LDMSLYAqe3tG9I9k3y14mgPx+LM0uP1l+qo7WXJvmN8m4rWYbcYMQo/Flal/P1wIIHe9YGG397YC6ubG4tucXDpn359nn9ZGt+jIJcVUL0awM7NC6ml7m8QPPe6kvybMY3GOzWknGTCrgN/8GF2s4qKleEFzI3zsseWHRCt6xfnDcVZbZYgnaEdDCoGyQTeI3NduaXyHuOL7lrKF8tthBpGldLGgEb/hYO2+9f37Rw4ADy2kezVVd1APuthvGJrgHsp4xpsU4pFoIVICFzUJNl3XQIREZvWFFFcbUsL2kXt4pYFEv+dZ+clJpfHefrD9uboApSLeBK/oQL2/fi6hnOumAAkyxLMv+Y7E/No21IBnbYskG0f30fEz4kjrGDpZe34/Nnd48MtmACiD9A5LfBzEH+wDdjP/biqgTpbxzq3qHks0l14tGQQXGKViNCYVJWSCf1NNBQerslHvqLgHWpXybtSdmaAWngOEyDv5clFDiw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 13:38:52.9509 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d4ff3e5f-db32-4e8b-f901-08db5c5c36d3 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: DBAEUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB8106 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: DiBMf6LP3sad1Cr2YlfZhevax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684935547; bh=Q20xlI0Q61w4mVcWSLzjildOSyJf9whgGean379kmHk=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=AQ49qzIUMRrxld0ytZ0a7QGgvms2ltBBKQYulpAE34dr+H7mGLOnykDWIwzXLrTnoU0 uyrT7m08v0xz2LQpqoJYDSECEXI3Ag4PZ5W8D2I/vXr96ar+Ndx6w3wNdzgXH20ZDAFBV TGHYn0E68PimzUXxM2B8R/Y6Mzh1nwsp4Ic= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684935548864100025 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The data type used by variables representing the GicDistributorBase has been inconsistently used in the ArmGic driver and the library. The PCD defined for the GIC Distributor base address is UINT64. However, the data types for the variables used is UINTN, INTN, and at some places UINT32. Therefore, update the data types to use UINTN and add necessary typecasts when reading values from the PCD. This should then be consistent across AArch32 and AArch64 builds. Signed-off-by: Sami Mujawar --- Notes: v2: - Update Copyright year [Ard] - Assert if PcdGicDistributorBase <=3D UINTN [Pedro] - Updated to add copyright year and assert [Sami] - Ref: https://edk2.groups.io/g/devel/message/105188 https://edk2.groups.io/g/devel/message/105191 ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c | 4 ++-- ArmPkg/Drivers/ArmGic/ArmGicLib.c | 14 +++++++------- ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c | 4 ++-- ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c | 6 ++++-- ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c | 4 ++-- ArmPkg/Include/Library/ArmGicLib.h | 20 ++++++++++---------- 6 files changed, 27 insertions(+), 25 deletions(-) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c b/ArmPkg/Drivers/ArmGi= c/ArmGicCommonDxe.c index d560c42fc9f3d5e86c2aece504102f43cb841877..8461fb7927eaf97c75135205f44= 4d33c205910db 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c @@ -1,6 +1,6 @@ /*++ =20 -Copyright (c) 2013-2017, ARM Ltd. All rights reserved.
+Copyright (c) 2013-2023, Arm Ltd. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -61,7 +61,7 @@ GicGetDistributorIcfgBaseAndBit ( =20 RegIndex =3D Source / ARM_GIC_ICDICFR_F_STRIDE; // NOTE: truncation i= s significant Field =3D Source % ARM_GIC_ICDICFR_F_STRIDE; - *RegAddress =3D PcdGet64 (PcdGicDistributorBase) + *RegAddress =3D (UINTN)PcdGet64 (PcdGicDistributorBase) + ARM_GIC_ICDICFR + (ARM_GIC_ICDICFR_BYTES * RegIndex); *Config1Bit =3D ((Field * ARM_GIC_ICDICFR_F_WIDTH) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmG= icLib.c index dd3670c7ccbb18586bb28f4ac02514055471529f..e26035a90201a7cd3025537d935= 1cc30019090b6 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 * @@ -117,7 +117,7 @@ ArmGicGetInterfaceIdentification ( UINTN EFIAPI ArmGicGetMaxNumInterrupts ( - IN INTN GicDistributorBase + IN UINTN GicDistributorBase ) { UINTN ItLines; @@ -133,10 +133,10 @@ ArmGicGetMaxNumInterrupts ( VOID EFIAPI ArmGicSendSgiTo ( - IN INTN GicDistributorBase, - IN INTN TargetListFilter, - IN INTN CPUTargetList, - IN INTN SgiId + IN UINTN GicDistributorBase, + IN INTN TargetListFilter, + IN INTN CPUTargetList, + IN INTN SgiId ) { MmioWrite32 ( @@ -390,7 +390,7 @@ ArmGicIsInterruptEnabled ( VOID EFIAPI ArmGicDisableDistributor ( - IN INTN GicDistributorBase + IN UINTN GicDistributorBase ) { // Disable Gic Distributor diff --git a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c b/ArmPkg/Drivers/ArmGi= c/ArmGicNonSecLib.c index aa4f0e2123929e0a86626b0f068d474065ca67fb..38bbf2e9f81527b2545a0116120= ceee56af17808 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2011-2015, ARM Limited. All rights reserved. +* Copyright (c) 2011-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -13,7 +13,7 @@ VOID EFIAPI ArmGicEnableDistributor ( - IN INTN GicDistributorBase + IN UINTN GicDistributorBase ) { ARM_GIC_ARCH_REVISION Revision; diff --git a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c b/ArmPkg/Drivers/Arm= Gic/GicV2/ArmGicV2Dxe.c index 25290342bde4de907bef050d6f1bdd6e03f8dccc..1c2061181e83bcf3f91d7bd1305= 6f0413e212c37 100644 --- a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c +++ b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c @@ -2,7 +2,7 @@ =20 Copyright (c) 2009, Hewlett-Packard Company. All rights reserved.
Portions copyright (c) 2010, Apple Inc. All rights reserved.
-Portions copyright (c) 2011-2017, ARM Ltd. All rights reserved.
+Portions copyright (c) 2011-2023, Arm Ltd. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -400,8 +400,10 @@ GicV2DxeInitialize ( // the system. ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gHardwareInterruptProtocolGuid= ); =20 + ASSERT (PcdGet64 (PcdGicDistributorBase) <=3D MAX_UINTN); + mGicInterruptInterfaceBase =3D PcdGet64 (PcdGicInterruptInterfaceBase); - mGicDistributorBase =3D PcdGet64 (PcdGicDistributorBase); + mGicDistributorBase =3D (UINTN)PcdGet64 (PcdGicDistributorBase); mGicNumInterrupts =3D ArmGicGetMaxNumInterrupts (mGicDistributo= rBase); =20 for (Index =3D 0; Index < mGicNumInterrupts; Index++) { diff --git a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c b/ArmPkg/Drivers/Arm= Gic/GicV3/ArmGicV3Dxe.c index b1f0cd48c752666e8b01eb5a25f8639e49213119..719701a67e756c2d2aeae8fc23d= 50b519a1997aa 100644 --- a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c +++ b/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2011-2018, ARM Limited. All rights reserved. +* Copyright (c) 2011-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -381,7 +381,7 @@ GicV3DxeInitialize ( // the system. ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gHardwareInterruptProtocolGuid= ); =20 - mGicDistributorBase =3D PcdGet64 (PcdGicDistributorBase); + mGicDistributorBase =3D (UINTN)PcdGet64 (PcdGicDistributorBase); mGicRedistributorsBase =3D PcdGet64 (PcdGicRedistributorsBase); mGicNumInterrupts =3D ArmGicGetMaxNumInterrupts (mGicDistributorBas= e); =20 diff --git a/ArmPkg/Include/Library/ArmGicLib.h b/ArmPkg/Include/Library/Ar= mGicLib.h index 4ab670967598f21852e46f72116bf4c78ca7dd44..928d1541d9d6bd603ea687a7814= fb31c35e14a8d 100644 --- a/ArmPkg/Include/Library/ArmGicLib.h +++ b/ArmPkg/Include/Library/ArmGicLib.h @@ -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 * @@ -121,7 +121,7 @@ VOID EFIAPI ArmGicSetupNonSecure ( IN UINTN MpId, - IN INTN GicDistributorBase, + IN UINTN GicDistributorBase, IN INTN GicInterruptInterfaceBase ); =20 @@ -148,28 +148,28 @@ ArmGicDisableInterruptInterface ( VOID EFIAPI ArmGicEnableDistributor ( - IN INTN GicDistributorBase + IN UINTN GicDistributorBase ); =20 VOID EFIAPI ArmGicDisableDistributor ( - IN INTN GicDistributorBase + IN UINTN GicDistributorBase ); =20 UINTN EFIAPI ArmGicGetMaxNumInterrupts ( - IN INTN GicDistributorBase + IN UINTN GicDistributorBase ); =20 VOID EFIAPI ArmGicSendSgiTo ( - IN INTN GicDistributorBase, - IN INTN TargetListFilter, - IN INTN CPUTargetList, - IN INTN SgiId + IN UINTN GicDistributorBase, + IN INTN TargetListFilter, + IN INTN CPUTargetList, + IN INTN SgiId ); =20 /* @@ -251,7 +251,7 @@ VOID EFIAPI ArmGicV2SetupNonSecure ( IN UINTN MpId, - IN INTN GicDistributorBase, + IN UINTN GicDistributorBase, IN INTN GicInterruptInterfaceBase ); =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 (#105244): https://edk2.groups.io/g/devel/message/105244 Mute This Topic: https://groups.io/mt/99108679/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- From nobody Sat Dec 21 12:59:48 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+105238+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 1684935538757404.408727943719; Wed, 24 May 2023 06:38:58 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id iNLNYY1788612xLXLVrxSamy; Wed, 24 May 2023 06:38:58 -0700 X-Received: from EUR02-VI1-obe.outbound.protection.outlook.com (EUR02-VI1-obe.outbound.protection.outlook.com [40.107.241.75]) by mx.groups.io with SMTP id smtpd.web11.9069.1684935536937203965 for ; Wed, 24 May 2023 06:38:57 -0700 X-Received: from DB6PR07CA0118.eurprd07.prod.outlook.com (2603:10a6:6:2c::32) by DBAPR08MB5605.eurprd08.prod.outlook.com (2603:10a6:10:1af::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Wed, 24 May 2023 13:38:53 +0000 X-Received: from DBAEUR03FT063.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2c:cafe::70) by DB6PR07CA0118.outlook.office365.com (2603:10a6:6:2c::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:53 +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+105238+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 DBAEUR03FT063.mail.protection.outlook.com (100.127.142.255) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:53 +0000 X-Received: ("Tessian outbound 5bb4c51d5a1f:v136"); Wed, 24 May 2023 13:38:52 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0e5aad9461e83745 X-CR-MTA-TID: 64aa7808 X-Received: from 963f344851a5.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3B68CAA1-57BE-41FC-90F3-EA5FF16C3DE7.1; Wed, 24 May 2023 13:38:44 +0000 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 963f344851a5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 May 2023 13:38:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dcphJZXzG1gzKlVyV6YGpd8mjTJCFZ5NxfWE3dz9AuqpkbkUHZCYg604xKOSmdqOu0Kr/f5r6mdopyw8sVxkYYRhdcNLjvfGkooYhJ5W8Y0kzr8tAqeSmDiOb4Yu/vDy2cffxKnSubUH1mlwFZPDayXp2oylQGCtFqaaXAggcakGUsIR/OmHBUE2t+n1vXoq35AkX60O2mprwAIqAJseKlK1CNcryMt8jE1tOaxeY5gpzhH7IzIhcSgHMd4F/uR2oM/Q9PiOh1lX5Q68/o2yS//UomPVQyn9ey4oPstam86232eYnK3/lxexEolAe0P7R54D78Df59leTxrXkFtgjw== 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=k/GQ7dXvSNwSkT7HbLqEwLwyt1hGuCAuAClkGS9MwRQ=; b=ayyVwdwLilQ2HCBIALGam7dIsPOgjME4vXVnIRlAw32BGNdigKNy42ARfTJIOmviKvS0of/5oX1CjsJK0htMpJBgL9TlzXwXV8wl7Gi8N/u0aQxmVSZHzUDUbfzfwGGJuSxaHpaCPGMmZqXdX0tM5QGQHBh8T4E0HZlprcLmusP0+RryDeepytecW+W2mm97DXOI2ZOAKf0GhVojbEEFB2jbFSTZ2ivFLcHMAWO4ngJqmxB0k3k5v27pAGTGLp0qZpHt45CgWcfz4/gFx6wnmE22asF7Sagl/mKpcsOtmVBtMiqtqvkVwcWuZzV8YHHbERNbrfWgpMeYvXSUO0sSFQ== 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 AS9PR05CA0116.eurprd05.prod.outlook.com (2603:10a6:20b:498::10) by AM0PR08MB5316.eurprd08.prod.outlook.com (2603:10a6:208:185::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Wed, 24 May 2023 13:38:43 +0000 X-Received: from AM7EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:498:cafe::de) by AS9PR05CA0116.outlook.office365.com (2603:10a6:20b:498::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:43 +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; Wed, 24 May 2023 13:38:43 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Wed, 24 May 2023 13:38:42 +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; Wed, 24 May 2023 13:38:41 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v2 02/11] ArmPkg: Fix data type used for GicInterruptInterfaceBase Date: Wed, 24 May 2023 14:38:31 +0100 Message-ID: <20230524133840.28612-3-sami.mujawar@arm.com> In-Reply-To: <20230524133840.28612-1-sami.mujawar@arm.com> References: <20230524133840.28612-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT059:EE_|AM0PR08MB5316:EE_|DBAEUR03FT063:EE_|DBAPR08MB5605:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e9be147-6e08-4aed-3e28-08db5c5c36ef 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: 6RvqHOGZoa1pHTJVGFbD4WlbVGNdo07whW6P2SSxwUs3GlYb6FKv4E5RylGgVzjB8WGe2l7pFEdnQ8Ic2NnDSc4nun1vIphBh+6ElSLVaGcFlzqzexwcfwzYHGhOmbXy7PGbqzguEMX7sNoIoqxkYuY8iVSnRkyOUmtOr865bCGWMWkly5L/Rp3FHzWwWYM4/jC+DLl/ZY55yBydERQ6uZkGoxLqyDU/Hq9PHLcloIZE48ROScKkRFQM5jREHdcLcFfQj2/i7E8Ip8Hn4xebNk8/MwYhH7SEU8qBni9zc3suR3BIRfT3gF7wEKVPGtnE1IFqgJCobxq0I98kL6Y3RGspxKcDvzryLDvE+bx4YsgTjIHQpReqpqBVurnxQe99cvt8jN30fI5YZETdz/YuwogT98yuvBOKj9p7cDfUifyqSvJ5MQAEWx7bp8lri7QIXpUAlmnkyaRS4MFEPi5qngv/F0J6843/lrAsS4SSsUBcQcDTI3njPDpiIrvYHPy+ySw2GDeVnNfAnHtribMRX2noJ3itaSd+Eq0dEmMWpT2aoe+4ilDiozHSXTyGRa6ihkQDNw/XsqPevKXM80sSe0+9EkI7PefTBv3TtSixbHJs5urji3Ie2IvRI3OVTHyO9vB4LW/PPJrm5pp5KgVZ1feTI1tGkjAoRpbW2xsS3QtDmBQlHwEd9DMo91VWfZ2YsXLZP4wWCwopdxV5rcMuVk2rZNHFiTlmHU3sPNkEkn0= 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)(136003)(376002)(396003)(346002)(39860400002)(451199021)(46966006)(36840700001)(41300700001)(70206006)(70586007)(2906002)(40480700001)(1076003)(186003)(44832011)(478600001)(6666004)(4326008)(7696005)(26005)(966005)(316002)(19627235002)(6916009)(5660300002)(54906003)(8936002)(8676002)(36860700001)(356005)(81166007)(36756003)(47076005)(2616005)(426003)(336012)(83380400001)(82310400005)(86362001)(82740400003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5316 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b9e0b904-e92c-4c63-4db6-08db5c5c30ec X-Microsoft-Antispam-Message-Info: u1z3qs3V/GfADAQLwtrj0rxe2z60746+27gPpaKgRDy9faCfEdELSrh8Fq1s4bNPxFTIsGNP5YuPAQlz5I1/324eZkDyZCke9FpKGyxLCv86rK741qwwqlg2l3a12+ACmfqr/0vTjDAayht5T1AWDglcPW9sLug0Q3gaG45Bbhi5MRouYwmS7xMq4ERuSlLn2LZflcHDGXENCbX8LCryCrXMr+ltzkgFbVsZPmj1T///7tutRlSZ4MpJWuvBptRj1I51vHCqWOsZWPc7ihVVY5Ysl0kaKMqXw8oeR0Lgdwb/eFNNOiyvN791/Y9/EUgg8sGFrnLAwf7ajTA6K/apIz8kCMupH28wkAU/8RcWazaF/1n0D7B0WBAaWuyY9Xb5bBoA3+mrrW9I66gpgQJIUtCnv3gEdm6jOi3mtRkSc4ltMIOcvPz8vfzRg2Z+XBHBLG6dkaT6ubyP/cDDuHo+ru+nUeScIoQNMdyGXK/s6Gs2m4m+2/mbUF6MUAVNnm+8cgFOQ0P+9SoEVsK09SMKNLTc5LGTStVCCJ2nK+AtZPN1AgfoNYiIGH69PQztJr7xd/OHKFTVVAHL1aMddqD2B5RkdeC+VQUO9KL3Wn4qqhWOgfJOu/Ig+I+2PEti22CVXtg9F3Ga3w6ubVAHtpQjDHMSeOutPNDAjUvShjmkuIZkEReFNBAQqVn4PgL/a10kN8r1d6Qeq/9UU/pw+HqFvTIYscS/serg3ZM1rkDrnDE= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 13:38:53.1452 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e9be147-6e08-4aed-3e28-08db5c5c36ef 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: DBAEUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5605 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: fC3bwaSBDH4HEWeho01HA3ZOx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684935538; bh=DwGADj2zly8rLF7zLWJEpQ3pkt5XsjJV6HLmcKGApLs=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Ll8EUnOT7u3VhgMyZUZWCsdMmFeioUvQOUuJCV9iL9a4ROum8sw7ClwL7g/JlhbQdxe NU1B8lBc+X7rUe1U9N7air2v+7xhQgfSqCg3r/9Lyz9fXZAwecWs3TLqdQl5U1Yf7Ixxg aNJCpQZLYrMwuVVppDIMIA1uGMtBgcK2eM8= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684935541377100004 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The data type used by variables representing the GicInterruptInterfaceBase has been inconsistently used in the ArmGic driver and the library. The PCD defined for the GIC Interrupt interface base address is UINT64. However, the data types for the variables used is UINTN, INTN, and at some places UINT32. Therefore, update the data types to use UINTN and add necessary typecasts when reading values from the PCD. This should then be consistent across AArch32 and AArch64 builds. Signed-off-by: Sami Mujawar Reviewed-by: Ard Biesheuvel --- Notes: v2: - Assert if PcdGicInterruptInterfaceBase <=3D UINTN [Pedro] - Updated to add copyright year and assert [Sami] - Ref: https://edk2.groups.io/g/devel/message/105191 ArmPkg/Drivers/ArmGic/ArmGicLib.c | 13 ++++++++++--- ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c | 3 ++- ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2NonSecLib.c | 6 +++--- ArmPkg/Include/Library/ArmGicLib.h | 18 +++++++++--------- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmG= icLib.c index e26035a90201a7cd3025537d9351cc30019090b6..2432715e43fa40ba6780909a83e= af7a6f8e791fc 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c @@ -104,10 +104,17 @@ GicGetCpuRedistributorBase ( return 0; } =20 +/** + Return the GIC CPU Interrupt Interface ID. + + @param GicInterruptInterfaceBase Base address of the GIC Interrupt Inte= rface. + + @retval CPU Interface Identification information. +**/ UINTN EFIAPI ArmGicGetInterfaceIdentification ( - IN INTN GicInterruptInterfaceBase + IN UINTN GicInterruptInterfaceBase ) { // Read the GIC Identification Register @@ -400,7 +407,7 @@ ArmGicDisableDistributor ( VOID EFIAPI ArmGicEnableInterruptInterface ( - IN INTN GicInterruptInterfaceBase + IN UINTN GicInterruptInterfaceBase ) { ARM_GIC_ARCH_REVISION Revision; @@ -418,7 +425,7 @@ ArmGicEnableInterruptInterface ( VOID EFIAPI ArmGicDisableInterruptInterface ( - IN INTN GicInterruptInterfaceBase + IN UINTN GicInterruptInterfaceBase ) { ARM_GIC_ARCH_REVISION Revision; diff --git a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c b/ArmPkg/Drivers/Arm= Gic/GicV2/ArmGicV2Dxe.c index 1c2061181e83bcf3f91d7bd13056f0413e212c37..a1670021c30f05707d7c37a789f= dbacc4ffa9140 100644 --- a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c +++ b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c @@ -400,9 +400,10 @@ GicV2DxeInitialize ( // the system. ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gHardwareInterruptProtocolGuid= ); =20 + ASSERT (PcdGet64 (PcdGicInterruptInterfaceBase) <=3D MAX_UINTN); ASSERT (PcdGet64 (PcdGicDistributorBase) <=3D MAX_UINTN); =20 - mGicInterruptInterfaceBase =3D PcdGet64 (PcdGicInterruptInterfaceBase); + mGicInterruptInterfaceBase =3D (UINTN)PcdGet64 (PcdGicInterruptInterface= Base); mGicDistributorBase =3D (UINTN)PcdGet64 (PcdGicDistributorBase); mGicNumInterrupts =3D ArmGicGetMaxNumInterrupts (mGicDistributo= rBase); =20 diff --git a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2NonSecLib.c b/ArmPkg/Drive= rs/ArmGic/GicV2/ArmGicV2NonSecLib.c index 85c2a920a54a1acaccb98a94b5591ce36d20697c..781645e8ea68dfcbf83edeb6382= 3605ede2bc067 100644 --- a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2NonSecLib.c +++ b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2NonSecLib.c @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2011-2014, ARM Limited. All rights reserved. +* Copyright (c) 2011-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -13,7 +13,7 @@ VOID EFIAPI ArmGicV2EnableInterruptInterface ( - IN INTN GicInterruptInterfaceBase + IN UINTN GicInterruptInterfaceBase ) { /* @@ -26,7 +26,7 @@ ArmGicV2EnableInterruptInterface ( VOID EFIAPI ArmGicV2DisableInterruptInterface ( - IN INTN GicInterruptInterfaceBase + IN UINTN GicInterruptInterfaceBase ) { // Disable Gic Interface diff --git a/ArmPkg/Include/Library/ArmGicLib.h b/ArmPkg/Include/Library/Ar= mGicLib.h index 928d1541d9d6bd603ea687a7814fb31c35e14a8d..7253cda5b8f01193d3439061ccd= 903868ed2e145 100644 --- a/ArmPkg/Include/Library/ArmGicLib.h +++ b/ArmPkg/Include/Library/ArmGicLib.h @@ -113,7 +113,7 @@ UINTN EFIAPI ArmGicGetInterfaceIdentification ( - IN INTN GicInterruptInterfaceBase + IN UINTN GicInterruptInterfaceBase ); =20 // GIC Secure interfaces @@ -122,7 +122,7 @@ EFIAPI ArmGicSetupNonSecure ( IN UINTN MpId, IN UINTN GicDistributorBase, - IN INTN GicInterruptInterfaceBase + IN UINTN GicInterruptInterfaceBase ); =20 VOID @@ -136,13 +136,13 @@ ArmGicSetSecureInterrupts ( VOID EFIAPI ArmGicEnableInterruptInterface ( - IN INTN GicInterruptInterfaceBase + IN UINTN GicInterruptInterfaceBase ); =20 VOID EFIAPI ArmGicDisableInterruptInterface ( - IN INTN GicInterruptInterfaceBase + IN UINTN GicInterruptInterfaceBase ); =20 VOID @@ -203,8 +203,8 @@ ArmGicEndOfInterrupt ( UINTN EFIAPI ArmGicSetPriorityMask ( - IN INTN GicInterruptInterfaceBase, - IN INTN PriorityMask + IN UINTN GicInterruptInterfaceBase, + IN INTN PriorityMask ); =20 VOID @@ -252,19 +252,19 @@ EFIAPI ArmGicV2SetupNonSecure ( IN UINTN MpId, IN UINTN GicDistributorBase, - IN INTN GicInterruptInterfaceBase + IN UINTN GicInterruptInterfaceBase ); =20 VOID EFIAPI ArmGicV2EnableInterruptInterface ( - IN INTN GicInterruptInterfaceBase + IN UINTN GicInterruptInterfaceBase ); =20 VOID EFIAPI ArmGicV2DisableInterruptInterface ( - IN INTN GicInterruptInterfaceBase + IN UINTN GicInterruptInterfaceBase ); =20 UINTN --=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 (#105238): https://edk2.groups.io/g/devel/message/105238 Mute This Topic: https://groups.io/mt/99108661/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- From nobody Sat Dec 21 12:59:48 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+105242+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 1684935545317490.2773470219397; Wed, 24 May 2023 06:39:05 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id UujYYY1788612xlYDWOuDRCY; Wed, 24 May 2023 06:39:05 -0700 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.53]) by mx.groups.io with SMTP id smtpd.web11.9075.1684935543576451773 for ; Wed, 24 May 2023 06:39:04 -0700 X-Received: from AS8PR05CA0018.eurprd05.prod.outlook.com (2603:10a6:20b:311::23) by GV1PR08MB7777.eurprd08.prod.outlook.com (2603:10a6:150:55::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Wed, 24 May 2023 13:38:54 +0000 X-Received: from AM7EUR03FT044.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:311:cafe::70) by AS8PR05CA0018.outlook.office365.com (2603:10a6:20b:311::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:54 +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+105242+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 AM7EUR03FT044.mail.protection.outlook.com (100.127.140.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:53 +0000 X-Received: ("Tessian outbound 3a01b65b5aad:v136"); Wed, 24 May 2023 13:38:53 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3589eb7825c5224d X-CR-MTA-TID: 64aa7808 X-Received: from 5e7b203dec8f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C759EB29-2D55-49C0-8411-CD4EB7C5630E.1; Wed, 24 May 2023 13:38:47 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5e7b203dec8f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 May 2023 13:38:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HSE0ctpbqJxjVojyTeYi7wdCRbjWEb/wPYliHUYiI7uWw+i0iIxJvq53opqF2d34SOMbHGRrk/WZcB9/MJkLJmW5GK/RaFCtijylNflfgSWMZen7HgQiC5Di3OaqOq+hUIwn4tDHrnXq5/Nc786Zdop/AXLJNYOFoxeKMYcU991AMzFQi1iOkvCeNe3EMYl2XynjojW+2HiXAz9Lg/WLgEFV7Qfg+IwdZSFeCcCWnASKlDLvha1D95L8CK9hWkkAdG+Mv9g8HZFnpNhDwzQ1jPbdUprLy/aQwBjEoFZtP34VeKvq9oc1QdxqfnpLvz9l9jiODE29r7RCD47QLV9siw== 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=DzqUDzitr/gqHcuPyHVOtpQeOgF9H58HNdQ6maa7FcI=; b=T64uedd8A5lpLd83u5e2wOR46NI4vXz8IwQRbyAFAyMDkDL4dSBywjIib9HZm0SglGUfpHnQD/9Rrl8OzV0EdqThF6uN3Lyw6VrJdUDKof0djNzJLMc0yF6LA5bCbNLO9z394dVp0VSCOQ0MzeH8TCglhBocAbxlQ4l7CIzhDfN5APBcrH2DhOxPH4JCsNbTEQfi/X3w8NGdYQjYAiPztC12IIq6YVprcF+3FX0GkmbdxR46OJsuQHbGxjs3pR5Cb0+AJW27K96EPkVIx3dEZCyaU8oJC3O7OjL0UShNqwTNDpSjWGXg2VybYC+x9m0BPSN8wjJ9iVr8Eq9FRUC3ug== 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 AS9PR05CA0114.eurprd05.prod.outlook.com (2603:10a6:20b:498::16) by DB9PR08MB8435.eurprd08.prod.outlook.com (2603:10a6:10:3d5::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Wed, 24 May 2023 13:38:44 +0000 X-Received: from AM7EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:498:cafe::ed) by AS9PR05CA0114.outlook.office365.com (2603:10a6:20b:498::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29 via Frontend Transport; Wed, 24 May 2023 13:38:43 +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; Wed, 24 May 2023 13:38:43 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Wed, 24 May 2023 13:38:42 +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; Wed, 24 May 2023 13:38:42 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v2 03/11] ArmPkg: Fix ArmGicSendSgiTo() parameters Date: Wed, 24 May 2023 14:38:32 +0100 Message-ID: <20230524133840.28612-4-sami.mujawar@arm.com> In-Reply-To: <20230524133840.28612-1-sami.mujawar@arm.com> References: <20230524133840.28612-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT059:EE_|DB9PR08MB8435:EE_|AM7EUR03FT044:EE_|GV1PR08MB7777:EE_ X-MS-Office365-Filtering-Correlation-Id: ef5f4cba-e1a4-4203-0b6a-08db5c5c3777 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: Uohci//v7VmezdGrR3WgGz/083uKNCQmBycvGjbUxVBfNnoMwEVztdIiaE8ExUiD6U/5O7wiqV2RQdoxvsT6OfJC5Gpe7id0sLc2ePjwmsenXzrDreZ/i9V4RrD9Vk3a313EgA7segHjX724tPdW96mwhuRIgvINNDsGRbTfkOavufHIFcK+wpTz8piqSNDXmA25AECThJcE/VMkCrSBhBXhnNbj4ohMALxsnzaapHzdlxuzTB413NqMatLnrU4+I9XAoI8J675QDzw2LE9LEVp5xh8JUOL935m3lQWxnCKzcSv3eJr+qaVLDrOUb+tj1azTbPTeDpcRQDXAi589tXdXQMi++CXSmMPE2HBmbEtnk+40eDypJKHIoSfCFIXCLWjpHhdofPKMiBICFQ5VWf5YCn0zGHnTXHjfpe2USHepeui22FkXicJydRo+SUsuUVM4VvHjyOmvClwBQ5CHfN8Kaa85Eq1XEtZvM6lxxyy2vShMAYlLVOsM69JIQrynHbifm4WQpuZleYVt8wMJRZt0XD6sBiTLYHjAAucfO1Hy6nNiQmd8FBT4s2cTF4QjMrwbrmJ0i5sFi6VGJWFkcH/p2gdOs/QYQ6IKURVC1aN3OIzRAbrXLOA1PRtaD9bBW/TD2k1NiONyE/UJM0mR5lV6uyYMh9FDoQJTnAsswdIwRPIl03GKcGQNrFl/pYUWA66YWxjC1WpzzIEoxylXhOTTYYN3xcyhDjziLbCpBvbmABgXdYTcSkvVWPiOpgbj 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)(376002)(39860400002)(136003)(396003)(451199021)(36840700001)(46966006)(26005)(1076003)(5660300002)(44832011)(40480700001)(8936002)(8676002)(478600001)(86362001)(36860700001)(81166007)(356005)(6666004)(82310400005)(54906003)(82740400003)(70206006)(7696005)(41300700001)(2616005)(47076005)(36756003)(6916009)(70586007)(83380400001)(4326008)(336012)(426003)(2906002)(186003)(316002)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8435 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT044.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a330cd7b-c126-445c-c49c-08db5c5c316a X-Microsoft-Antispam-Message-Info: pZu8VnVh95onyuQI1hVgZpnDoh54+2Kfx7E12V5/U8lqf84wnXZN5ZOex9vVwmnY28fgfTikMstILCCjslFPngo82FgKrdJ8EHs6ZftTuDntnXujqfeJvg9NgIjslyYO62IVqCXomVM1WWfYGAI9nvAUFHqLQH1EIEjZBOarvN3oovDFCQP+TyVuhMRmzbe4ktNqK9yA8tf17vJrLWssWIQ9b44PVEHri6qNrksI/wEFFPCl020CcLK5D4MtR7jgMZn9xbH4kFxffPD4vSFFe+2iJD4OCQbuH5C4yLiv4kv1+Lgz+e8SGjp+BNL3EHOSzAMThmCrkBxeb0Wlzixia4vMHqy/Dx8DIQ5fc7Hkg0l3Fli2oHK8sIw57SPDUL9mQ/AKwT6Fx35ufNqxICJ2amS5bxM9Nc/D0GrztlisHl0bAAxcrlqY+Lg8qT8BiHREgVwKK/PVURLCZFZ8hIDEU5uMMhCkbQqjfVb6GmPm96wB7F9FP0BSIZ4oHXckM3SAA0r6E+orkrx1c7FvXyc7tBuA7AI6j7VBwIIW7vYDtZa1mvQXsfnLrA70DUUYeV9LlxLfPMq8f7yfrdqFvsI52hoLbt3EwH3YcXF/KIV0WIhrHvqcTrXbHYj8jVehZupm5qFkxaMCTEv53o0GjYAmTVR0rqEUAbvXqgQQh0NyfCbn45gW10JtM/tbQxYolMUPvYKV8SSjE6a8pB8Vp11RDFwOsWVBKVO4M3Ok4QR6hVsu1mwleZP/jkYVOlYHyIyX X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 13:38:53.9727 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef5f4cba-e1a4-4203-0b6a-08db5c5c3777 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: AM7EUR03FT044.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB7777 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: fpSuVV0Z4i73fl6IeuWrpwVyx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684935545; bh=neE+M0OJZkOc+MSSDXob9djtWjDCdern6HfEphNUmY8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=EqBwVBCR7IVI9/eZ2eV9ayKmFhcR0JFrLXc2bNpZ69VDtckXT6aPjI8PXWQYSTWlhL6 7Z3WdJAHT8nfKRUnOv+2885C8o+OVSi4A5WJJgJtXKIAeB+GLhEXfxDecLawhHAKcahXA nUIU7l5ZZt+U21Cg2ul9ED487eihNkWzZ2E= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684935546841100022 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The Software Generated Interrupt Register (GICD_SGIR) is a 32 bit register with the following bit assignment: TargetListFilter, bits [25:24] CPUTargetList, bits [23:16] NSATT, bit [15] SGIINTID, bits [3:0] Therefore, modify the TargetListFilter, CPUTargetList, SGI Interrupt ID parameters of the ArmGicSendSgiTo () to use UINT8 instead of INTN. Signed-off-by: Sami Mujawar --- Notes: v2: - no code change since v1 series [Sami] ArmPkg/Drivers/ArmGic/ArmGicLib.c | 6 +++--- ArmPkg/Include/Library/ArmGicLib.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmG= icLib.c index 2432715e43fa40ba6780909a83eaf7a6f8e791fc..eca4ddb7d3a40d5ef2fc2d0433c= 50afeb64c4b24 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c @@ -141,9 +141,9 @@ VOID EFIAPI ArmGicSendSgiTo ( IN UINTN GicDistributorBase, - IN INTN TargetListFilter, - IN INTN CPUTargetList, - IN INTN SgiId + IN UINT8 TargetListFilter, + IN UINT8 CPUTargetList, + IN UINT8 SgiId ) { MmioWrite32 ( diff --git a/ArmPkg/Include/Library/ArmGicLib.h b/ArmPkg/Include/Library/Ar= mGicLib.h index 7253cda5b8f01193d3439061ccd903868ed2e145..cede7a24b7126a90d0c1118b687= e77ea7b57bf97 100644 --- a/ArmPkg/Include/Library/ArmGicLib.h +++ b/ArmPkg/Include/Library/ArmGicLib.h @@ -167,9 +167,9 @@ VOID EFIAPI ArmGicSendSgiTo ( IN UINTN GicDistributorBase, - IN INTN TargetListFilter, - IN INTN CPUTargetList, - IN INTN SgiId + IN UINT8 TargetListFilter, + IN UINT8 CPUTargetList, + IN UINT8 SgiId ); =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 (#105242): https://edk2.groups.io/g/devel/message/105242 Mute This Topic: https://groups.io/mt/99108674/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- From nobody Sat Dec 21 12:59:48 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+105245+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 1684935549839104.89916019743578; Wed, 24 May 2023 06:39:09 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fE6UYY1788612xkg3eOgQfLD; Wed, 24 May 2023 06:39:09 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.44]) by mx.groups.io with SMTP id smtpd.web10.9079.1684935548452695144 for ; Wed, 24 May 2023 06:39:09 -0700 X-Received: from AS9PR06CA0463.eurprd06.prod.outlook.com (2603:10a6:20b:49a::14) by GVXPR08MB7677.eurprd08.prod.outlook.com (2603:10a6:150:3f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Wed, 24 May 2023 13:39:02 +0000 X-Received: from AM7EUR03FT027.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:49a:cafe::1a) by AS9PR06CA0463.outlook.office365.com (2603:10a6:20b:49a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:39:02 +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+105245+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 AM7EUR03FT027.mail.protection.outlook.com (100.127.140.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:39:02 +0000 X-Received: ("Tessian outbound 5154e9d36775:v136"); Wed, 24 May 2023 13:39:02 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c97272e1e347f9b7 X-CR-MTA-TID: 64aa7808 X-Received: from cc007dc5e5d6.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C2E42FFC-96F8-4762-86FB-85DF808FCE43.1; Wed, 24 May 2023 13:38:56 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id cc007dc5e5d6.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 May 2023 13:38:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dpdqi/v2ZRSIAReErD+b+pvhLRip1jb5MMidLeY0HZvYPj/34URl1twgfapwMaS0frsb7ay2+oaYKagtwrcydCAMfbZnhTshccTdBx75l4g/rY/h39UNO4qHeoci81xXJCEWzF30wJ4lsAIU1CJYlu9xMgty2TiMjvDAu65YJZ3hgqPwvVgNnhWGURf+W/EdCRSucbx4Xk58tAJr0Y5AbICoUuK4qnjHhSAskfeOIMmxycUBkcZxti5kCBUc4nexvhS+I/ik7yHSkMGzSKg4LgMHUN/ce5CBgx+I32DbziCBbG5g7bBrBLNO1iaMNcm6sskqGgr9/VthQfG2gyuC0g== 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=d47QiyIrfXmRuofG8VmKwt4egKsZ6zD27tJQL3mHK1Y=; b=mijoHdXcHtUTl9WYgVKxmIKlUg9Zp96akmfcfHySGCWqXiTUyJuHr8vjIz2yi95Q8+4c3Kfv/nA31CAz5vSCkWq4bvqqX/DQ/himSBpA9wJ3/QFjeQeyfr3qIhL1XjahUAoX8ecn2O72Z07SmVK8cbu3SNwhCFFmDNMZqhjD3/+OTkexRRs/P2n/AKC255kE2zCn9+kjRnCUcpdPRc+T8uDfuv1+IgyV6gsBxO9zwqyIPxQkuDKRCsP22SnfBYnlqV4SecagbeTVJKYm6DyVROaCDVtXylt01D7LVW8lr5hSYHWXCYrYnDj3tp728nJ2JBAH01nWvBvKpVPuXzJubA== 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 AS9PR05CA0094.eurprd05.prod.outlook.com (2603:10a6:20b:498::9) by PAWPR08MB9638.eurprd08.prod.outlook.com (2603:10a6:102:2e0::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Wed, 24 May 2023 13:38:45 +0000 X-Received: from AM7EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:498:cafe::8) by AS9PR05CA0094.outlook.office365.com (2603:10a6:20b:498::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:45 +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; Wed, 24 May 2023 13:38:45 +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; Wed, 24 May 2023 13:38:43 +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; Wed, 24 May 2023 13:38:43 +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; Wed, 24 May 2023 13:38:42 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v2 04/11] ArmPkg: Fix Non-Boolean comparison in ArmGicEnableDistributor Date: Wed, 24 May 2023 14:38:33 +0100 Message-ID: <20230524133840.28612-5-sami.mujawar@arm.com> In-Reply-To: <20230524133840.28612-1-sami.mujawar@arm.com> References: <20230524133840.28612-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT059:EE_|PAWPR08MB9638:EE_|AM7EUR03FT027:EE_|GVXPR08MB7677:EE_ X-MS-Office365-Filtering-Correlation-Id: 79f39ac7-2573-4a5c-7a2a-08db5c5c3c8a 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: lKkHaS+mO+/xOvPkmEo+PYybdAn8Q2hIdQHFrcCKrsqntwAgF+UcE9Br2Bs4VVaQnZ3O15Q0AeAG78ZQKWko88hl7MuN1IFCEgDpu9+1mzIVeRwSaGbKe09AxdTkN7CcS3McTEw94pCD0pIFJL8AsBqfKccSD4fdztKDOv7koMYyglKFF7qq1gP5UQNfhIM0xRuJ4mxv4B9kUVzNiZ+AKofDQmQJ3U2wNbZsZX9Qbf6t32Nsot6AENoA6y/LGtocAfVq08cSG6iZIYh7LUkm5zqELslYTZn5ifFNELkOmD2LYtel2fWSE2Yho70p+g4AzjmCcOdOIXXAKtaLdYsJnxZfWDH0Jjk3sIHtZV0s1F2dap3G9iak7TXTtztxkmj6wjCkCslrGoQHdR4VjYhlpHp0T4Qn4fKG0F2BTLkcWxrdnnrh43luUYbIAjKiCXbSXLCtzC8JYNu7Zqe3RiAx0A/hNX24khYa4YD1bhJrPOtIuzCMNzk17se0U7U8iZLbryCiieMYMoi2yRt0DqWkhZ82lwDQQCZ/Hk80oXENwx1zXnDOWTuj8cA+FhC556+1MfnkCscyBD0o4tf4R7VG7BrFSqcLyOuUbXg4no61U4H/D9dxH47XPHX33JQDTOfoBcNMnU7qiz/tyPkRKEM6Eycf1B8rwecoDaqvoEiPWa/q0WRU/4dV4rBf01bGYrpYuewwyCXn8Ies5PChVL5Lo0UXAsYerxM65fwGEpFPWhY= 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)(136003)(396003)(39860400002)(376002)(346002)(451199021)(36840700001)(46966006)(316002)(966005)(6916009)(70206006)(4326008)(70586007)(426003)(336012)(478600001)(8936002)(82310400005)(54906003)(8676002)(7696005)(6666004)(86362001)(41300700001)(5660300002)(26005)(44832011)(36756003)(36860700001)(83380400001)(82740400003)(356005)(47076005)(81166007)(1076003)(186003)(2906002)(2616005)(40480700001)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB9638 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT027.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: fb46669e-8718-4de5-51fc-08db5c5c3260 X-Microsoft-Antispam-Message-Info: oBIpqfdtf4zaeIot5ntzjbyWYs0nE5i61f2tQ5cUnHvFBgido50hBwbQrio14iXbotozv05ifR1e3qDG/pNxu1k+ZqzRVChbVjTL63g+b0JJ61JvOOMMXBUUJo0Y1KCATJGy5dJdNUS0uR8OL8WF5kQB5xa1xH4n7kFdjdsvjEU3fQ64Ggw2bI7jhe6uS5+lFSvSreRhgHB2c7mu3+vGjW1EOC9oNWIurJGQvk/QiGmePyt7Rqwvfieka5AXJCiVEpTEj/hT7n3ejK5pYcEQECvDvsoXXcVFiY7AFFer7Q5lDCTunJ75v2KooF4/zjAv2KNe4uvbM6LZ09OAH+y2LMit7PYl6fYHqBWZsPsmOao1IekOeVJysSKDezddkHVP5Bvady++9jqh9qW9apaJoNBTQwAkjpWOuOW5iOckF+s2eplHqEh8p6Lq/t2kWU1rRY+KlXPF5Ce5rjm8xti23oUPtjsgAIpw9aJdAwXwG+JY1AkEomgBbMZ+eWLrHER29PtxlVIUb/QBhHPMWO3R+r0Ci4PsveKqR9/z3qM8MFl//vzKKyT1qho2LUy5FS2TQaaVuync2lYC+lqHrx+RRATCQ6UHlZLG2Xl89vdW8LYL6v3kjZpnvTvTvpdzK7urv7Nws5Fma7vq+1lA2ZpKQ0OHMMEPX+WsNVlUJXpCPisZRdmH17/LX7vWSPp1p2by2aukPXlYbuW7lX09VL2JVYOZmd2j3FlXNV/fYosiN/I= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 13:39:02.4262 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 79f39ac7-2573-4a5c-7a2a-08db5c5c3c8a 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: AM7EUR03FT027.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB7677 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: 7JZFdlGO29vGUPfH6KaWibIAx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684935549; bh=GXAm1pvCMm/paZ/b4pjv8M+qIk+4aqjN7iD1wUtpBzY=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=PQxCUElQMlmZLu6c+w7VJOuKq70tc5FU5DiuYj3QebaywAevlzwg9RBwrgBu4EfDpvm t9Yw4XvhDi83f9NH8gk2WNitGGfeZxRjxqdd+8aGh7SN6WW67JP2/4OcrbBSxALsVt6Wx jDRkX1Z7DFKjgkDP/iXs4DJhgZLAfObhpgs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684935550875100030 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" According to edk2 coding standard specification, Non-Boolean comparisons must use a compare operator (=3D=3D, !=3D, >, < >=3D, <=3D). See Section 5.7.2.1 at https://edk2-docs.gitbook.io/ edk-ii-c-coding-standards-specification/5_source_files/ 57_c_programming Therefore, fix the comparison in ArmGicEnableDistributor() Signed-off-by: Sami Mujawar --- Notes: v2: - Improve coding style by using temporary variable [Ard] - Updated based on review feedback [Sami] - Ref: https://edk2.groups.io/g/devel/message/105189 ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c b/ArmPkg/Drivers/ArmGi= c/ArmGicNonSecLib.c index 38bbf2e9f81527b2545a0116120ceee56af17808..1a6ad48d1ff6c3eb5c8c375606c= 1600e42db42d6 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c @@ -17,6 +17,7 @@ ArmGicEnableDistributor ( ) { ARM_GIC_ARCH_REVISION Revision; + UINT32 GicDistributorCtl; =20 /* * Enable GIC distributor in Non-Secure world. @@ -26,7 +27,8 @@ ArmGicEnableDistributor ( if (Revision =3D=3D ARM_GIC_ARCH_REVISION_2) { MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x1); } else { - if (MmioRead32 (GicDistributorBase + ARM_GIC_ICDDCR) & ARM_GIC_ICDDCR_= ARE) { + GicDistributorCtl =3D MmioRead32 (GicDistributorBase + ARM_GIC_ICDDCR); + if ((GicDistributorCtl & ARM_GIC_ICDDCR_ARE) !=3D 0) { MmioOr32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x2); } else { MmioOr32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x1); --=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 (#105245): https://edk2.groups.io/g/devel/message/105245 Mute This Topic: https://groups.io/mt/99108682/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- From nobody Sat Dec 21 12:59:48 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+105243+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 1684935544962482.6620281358697; Wed, 24 May 2023 06:39:04 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id CVhJYY1788612xvi8gzRAzz7; Wed, 24 May 2023 06:39:04 -0700 X-Received: from EUR02-VI1-obe.outbound.protection.outlook.com (EUR02-VI1-obe.outbound.protection.outlook.com [40.107.241.68]) by mx.groups.io with SMTP id smtpd.web10.9076.1684935543642723959 for ; Wed, 24 May 2023 06:39:04 -0700 X-Received: from AM3PR07CA0074.eurprd07.prod.outlook.com (2603:10a6:207:4::32) by VE1PR08MB5583.eurprd08.prod.outlook.com (2603:10a6:800:1ac::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Wed, 24 May 2023 13:38:55 +0000 X-Received: from AM7EUR03FT004.eop-EUR03.prod.protection.outlook.com (2603:10a6:207:4:cafe::1b) by AM3PR07CA0074.outlook.office365.com (2603:10a6:207:4::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:55 +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+105243+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 AM7EUR03FT004.mail.protection.outlook.com (100.127.140.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.16 via Frontend Transport; Wed, 24 May 2023 13:38:55 +0000 X-Received: ("Tessian outbound 99a3040377ca:v136"); Wed, 24 May 2023 13:38:55 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d02a64c922690a89 X-CR-MTA-TID: 64aa7808 X-Received: from c88ee02a0860.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 92284114-0DD9-4209-9DAC-6ABB28BC80A6.1; Wed, 24 May 2023 13:38:47 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c88ee02a0860.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 May 2023 13:38:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h064rmznz3yRUD+CkV3EcJuIw3ROrb89haPGuaey9ByavpHZ1SsNCqTqY/nY+ZcNZKW63XQkHUO2OVUcBmcEMeOqR2SMoDiftFiaoBvnICUr0/ZiTBharxcgPLStwq0dPeQI0ZX0bb3ilGsL3YdyLZG2qNP1hUaXAaw75J9XscFmQkR1DcK/zwVAoK1RQCEvFZ4s+Ncg0OvQLeUC4aMWHIe3gzBcdoHH0Vc24YwUZ6S/oUCMHkEqG7qGdop4651hWuDWDFZQibR05289eN5uNzZVwvQS//fa8JdnVCErX/Q+q6QpdRbqCACJ1vrJo0usFtbZaVZnXBfYRBHz7OMtzA== 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=ai36JzWz/0P14qGrESHydkoIbpQOeWy8ERlpdGpSyNo=; b=T+N8cS0UlvcNen3vUTZsMbck4CKDm13Bjpyib2dPUZaRX124kRmMMm7Wzsy0jEymjR5XDdFBtcw7GSXNRQ5ateweqnVOVAYxWyYQI8rdkBb26S7I7lZ1IwHqEXnAZJ9hDhN0FNcnsXUCaIbJYZWI7yKv6zu8Gr3Q/Tmycj/AMmzdaey4NhLy8mz2n7FRyzgV4cq4j9FUZ4FL2OVAkvpZgzljXcHPu33pNUDNjp300JDDk47JNu+ZRCAQQq2klcKo9vpdtZp8hf6q/oo/AwqVymirWHwPi0QbclDT3uthYEKQ/fdIPlyc8620NlnOAPVRdFDrAcX1CvSiVtNkG8KZUw== 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 AS9PR05CA0095.eurprd05.prod.outlook.com (2603:10a6:20b:498::25) by AS1PR08MB7612.eurprd08.prod.outlook.com (2603:10a6:20b:477::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Wed, 24 May 2023 13:38:46 +0000 X-Received: from AM7EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:498:cafe::24) by AS9PR05CA0095.outlook.office365.com (2603:10a6:20b:498::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:46 +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; Wed, 24 May 2023 13:38:46 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Wed, 24 May 2023 13:38:43 +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; Wed, 24 May 2023 13:38:43 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v2 05/11] ArmPkg: Fix return type for ArmGicGetInterfaceIdentification Date: Wed, 24 May 2023 14:38:34 +0100 Message-ID: <20230524133840.28612-6-sami.mujawar@arm.com> In-Reply-To: <20230524133840.28612-1-sami.mujawar@arm.com> References: <20230524133840.28612-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT059:EE_|AS1PR08MB7612:EE_|AM7EUR03FT004:EE_|VE1PR08MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: 46bc961b-c9c4-4e14-50ff-08db5c5c383f 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: iH4VCOMQ9iEnb8oGUiSlYUOYexOInlwyrcM03IjCne3+JjtWbduSMQarhTKMHVhGSsCboGlU7jlYG+ggt0On59R2OX724SjU+xNhCul9kV1kTVVSJj4ZaK2VLPehlZf+QtxpncS8jbpSB/lA87Kvv6XhAJjbzIT1kw1CJFUInl28LtXapNLj39boJWq2cTYxjbYqydoMvPffoTtoFdssot81WlxIGuOfp+SF9BYb4Xooup6Z5y2UCZr1uQQudRTI1ozRsSbs6qs6X+vWCKyYBpzYxioBIsXez/yQNGFfHB1G56oFNk8u7nktlQw9DDwifxETV5z4Y+InhuKmTY8pnn0Sych1XJSONNZ093z8B2cpD9xymgCB5a9l2xgnSRQqMRedNDOsa/dhSDPR1vxFUBBfYACEWwdTFNQUnVhlLDZmQGtRwoM7NzUOnQsy4VhfWeF8PAAYmEBc+ftN01mpMjFlRDHjUJm90gAOSQ0oh7wt1Q4aozuWLIBcLlQ0szZviPg1GON4/E7vQzvVBK6hViWN2PttM8iHZAGKdLmbcqHrPv5spYXTldyL31O2rDV3o70BUWIX9VRev3KfYc10q4QABWr4wIvn9S70gUtRpfq5T6fhM1G5P7y6YgBH14dPCZIfcLOESs+1M+IafOpqMqlBsfnVH7lbtppIBs1AsqCJdtlo9tVM9sdYga1crBZq5wwsb15Ub0CleJ6YYXR5NoHAS0RbtH3LoH383U5upUBnFdRYxQau2sZeYSMsjKXtWfmoLFmFD8wTZWzPTDHHgA== 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)(39860400002)(376002)(346002)(136003)(396003)(451199021)(36840700001)(46966006)(82310400005)(426003)(36860700001)(336012)(316002)(82740400003)(356005)(5660300002)(44832011)(36756003)(41300700001)(40480700001)(81166007)(70586007)(70206006)(7696005)(6916009)(47076005)(83380400001)(4326008)(478600001)(186003)(8676002)(8936002)(86362001)(2906002)(6666004)(54906003)(1076003)(26005)(2616005)(213903007)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR08MB7612 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT004.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: db169866-d273-4da1-ae38-08db5c5c32bf X-Microsoft-Antispam-Message-Info: aGL0L+UqZNeLyZev0cNc72137vtSbWoEJJ8gbSUyE9uzYlRh5BlFXtdkzymIfspJbsoAl57t3QICG6McJ7aYIkpWPj9Gby9YSRhkpyFQCTmQhvJbixMlP3+pRiPwJ3PM0g2LEq8YwmFPUjwM+mPAJLSZ8HSAIlUzKqVD+FPvNCRdipNA5ndqv4u4I2Vq+kwPSUg24PFCsRBUgkslb/rFUBxLBxtw27pE9Qf+k5cam+5e+qzTuoKY9IT2ynIIes//u33T2R1Zns0EoOxhq/NZHDzftaPvxQZ/Zef2L9SoUG2hMhhB4bmVMiaryZoBtgu2HDZfHxjfgCw5Iy3eX04HwvYk27hiJUzzOJKTecpujNGbiGPBLUQeb3EcawbtocJ98nCWr6x0BSCJLZ6QZ2mjgjA9tpdDra9IYHBm7wVdhbVfJdFf7l0HJzL0xqnsrnklfu1tKYO3wWbjy9NgQvQD5Af38l8Vbm8XbBvOP+y6iF+mPuY3gEcESSFWAbvse8cE3dGhUDkUkIwzRymYPaIUjy6mRoN5/0XJqzcjpUKgEm/4LuGHlFomWgD2dfdG1nXaf9yni8J+nRRgOd/w+vK/RNCWVrkB6j6BUOvQjfyil0qJSHQg8lsj9VsZYhHJygu49ITDPpyl3e1LWFBDXDUNjfT/3grndcX+T2iQP15am3MM1CC2STOW/ZpeVRs32u7bNRlNewtYxODvedUMuSH58y6wA9gbGfZf5MzdI1wqcHyCx7xdApdp9vGgTnnOIIjfwA/TxHK12fPBe1kco4/WLQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 13:38:55.2852 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46bc961b-c9c4-4e14-50ff-08db5c5c383f 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: AM7EUR03FT004.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5583 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: Jlo1qqRFcUnPelJCld2wE3Lvx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684935544; bh=dUXinG2fEEHaE1AtLDa7vq9oDZ/Q+0GKi21T+B28bJM=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=bNGpd0D524r36ecIctTS+FqLaRL9mtuPS1VyA46YQdkSbQrYJqHjPDuWkPdEtL0UY/9 HxN/QdCXvDvlJzNCvUHlfXVMdpncohqR2E1SGcdXRIOUq17XrGWJxver9pALhRoHNaqzZ rcQB68FqcARzFcUpu+myYeU+I0xJ9EhI7/E= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684935546826100021 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The CPU Interface Identification Register (GICC_IIDR) is a 32-bit register. Since ArmGicGetInterfaceIdentification () returns the value read from the GICC_IIDR register, update the return type for this function to UINT32. Signed-off-by: Sami Mujawar --- Notes: v2: - No code change since v1 series [Sami] ArmPkg/Drivers/ArmGic/ArmGicLib.c | 2 +- ArmPkg/Include/Library/ArmGicLib.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmG= icLib.c index eca4ddb7d3a40d5ef2fc2d0433c50afeb64c4b24..eefe6350eb804bf9b2727b605d5= 9035877ffb817 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c @@ -111,7 +111,7 @@ GicGetCpuRedistributorBase ( =20 @retval CPU Interface Identification information. **/ -UINTN +UINT32 EFIAPI ArmGicGetInterfaceIdentification ( IN UINTN GicInterruptInterfaceBase diff --git a/ArmPkg/Include/Library/ArmGicLib.h b/ArmPkg/Include/Library/Ar= mGicLib.h index cede7a24b7126a90d0c1118b687e77ea7b57bf97..93ce8aeb199418c70367ad2386b= e427340aa28cf 100644 --- a/ArmPkg/Include/Library/ArmGicLib.h +++ b/ArmPkg/Include/Library/ArmGicLib.h @@ -110,7 +110,7 @@ // Bit Mask for #define ARM_GIC_ICCIAR_ACKINTID 0x3FF =20 -UINTN +UINT32 EFIAPI ArmGicGetInterfaceIdentification ( IN UINTN GicInterruptInterfaceBase --=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 (#105243): https://edk2.groups.io/g/devel/message/105243 Mute This Topic: https://groups.io/mt/99108675/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- From nobody Sat Dec 21 12:59:48 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+105240+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 1684935542619334.6808897496485; Wed, 24 May 2023 06:39:02 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id T6biYY1788612xwVx7jYNoJ5; Wed, 24 May 2023 06:39:02 -0700 X-Received: from EUR02-AM0-obe.outbound.protection.outlook.com (EUR02-AM0-obe.outbound.protection.outlook.com [40.107.247.58]) by mx.groups.io with SMTP id smtpd.web10.9071.1684935540839622631 for ; Wed, 24 May 2023 06:39:01 -0700 X-Received: from AM0PR06CA0087.eurprd06.prod.outlook.com (2603:10a6:208:fa::28) by DBAPR08MB5749.eurprd08.prod.outlook.com (2603:10a6:10:1af::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Wed, 24 May 2023 13:38:56 +0000 X-Received: from AM7EUR03FT024.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:fa:cafe::7d) by AM0PR06CA0087.outlook.office365.com (2603:10a6:208:fa::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:56 +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+105240+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 AM7EUR03FT024.mail.protection.outlook.com (100.127.140.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:56 +0000 X-Received: ("Tessian outbound 8b05220b4215:v136"); Wed, 24 May 2023 13:38:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ff75ec3936e6539e X-CR-MTA-TID: 64aa7808 X-Received: from 330afea6199a.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8C06E9A3-2AE4-4AA4-988A-9FACE88FBB74.1; Wed, 24 May 2023 13:38:50 +0000 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 330afea6199a.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 May 2023 13:38:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ia4J7Tv65mqopVQxgTB+tkEq9rb1BxXt/1IziK9D26aP1wM5bsh5biV4U9rEewuiHkRyzEyb/IjlmHf2FX10ETBFF+5X/vF5CKroPX5juyUYCa0SvKQO4UOfalGUViIM73fQIzGHiAs1x7nSoHSwgvt5zdJplOXvCeIMfJtGmFAQn7MocSdb1K88QInSWg1e1v7LJEQWbQj3efv0Siy4AZSscQRH8ysgVQUM6qeaHHrrJG5a1SGVjwCfT9nFRNe2EueHdMqICVXTMrIebAcmEbPzu/YKr5LRYwopFHJFI0dBxoDzqumSIJaQKC5Tz7S6vzDmcI324qPCX8TatZLCnA== 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=/J2wa26Xp/Fpot5jWcIWu7w5aHVVQnkWuLrRjaXDT4I=; b=Nxt2ahcHjSkQrk/DyJ5Fpj35dOv9JkuP/5iKJ8nm+Bqv7cBntGk1EtjxGHEpONR7QYFBfsUKxhg5i2JtGMB6+UA3cvxSqMdKBGkXSL4ZLV93UcdGH7lT00FzaU+ZtN1Tje4DP8pyGmUqRIkxKayQlBukiaTZeQq1106nJno7Ovln+PCp1Q0QXD4vD7uKldKV/fMhKJLfXwmPoEP10N+x9y6Cck3j2C6Q+FRbyCv2ytLCsxYoV342pOdQRQm80/mKcKFoSHntgYJ8mdH6V0F3cSHA7Em2vutYktpN34L2Fg453yiRDenKp0ly9CSm0s2+8dkzClmwZ7c5aed9wmXRoA== 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 AS9PR05CA0101.eurprd05.prod.outlook.com (2603:10a6:20b:498::15) by AS4PR08MB7477.eurprd08.prod.outlook.com (2603:10a6:20b:4e4::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.27; Wed, 24 May 2023 13:38:46 +0000 X-Received: from AM7EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:498:cafe::f6) by AS9PR05CA0101.outlook.office365.com (2603:10a6:20b:498::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:46 +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; Wed, 24 May 2023 13:38:46 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Wed, 24 May 2023 13:38:44 +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; Wed, 24 May 2023 13:38:43 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v2 06/11] ArmPkg: Make variables used for GicInterrupt UINTN Date: Wed, 24 May 2023 14:38:35 +0100 Message-ID: <20230524133840.28612-7-sami.mujawar@arm.com> In-Reply-To: <20230524133840.28612-1-sami.mujawar@arm.com> References: <20230524133840.28612-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT059:EE_|AS4PR08MB7477:EE_|AM7EUR03FT024:EE_|DBAPR08MB5749:EE_ X-MS-Office365-Filtering-Correlation-Id: d602b634-4540-452d-1d7c-08db5c5c38e7 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: nmhqEQIyI6zvyhFnzwuhewUU7mnnlgG4sj3AtphHeFneiRC1pSyONol1H2V3g92/GCtaiQbV9uO4PDDwgb7i8eSsnlNmVa/fosEFt/5O5p5ocZ4wb7Jwsdi5dnGhHlL5tpF83lW8F4fPIQq8YvQBkRGhGW4R9n4LWrNKzXPTEWXC0qfUjPqmyBgNVhv4y6nqXl/90a8+i1O3mKcasfjU51dAt1S/NP+6XgAuwl3gMNbSNFXjL+4iOdGR3KMjccgJ3N6DiamNkXYuthXqJwlaKYOVEibtaIKZfFSlCA05NUCSqfuRT0DilggEXwgLLxjPhRq6DJfU707PMNjYm3xYGmylsdnYYKRC+uv8BcVGCQ9PE23tckrXei/DNcDHROOhrow5R1L9TKtbTS/qSSF4uWAoqTEwBF6Zja3QMuLmXZGmk3gdy81GSyzXA/2dV0c+6KxaMy5hNLJj+SkMdIR7BhVOFGMVgGeXcZyTyaE7ySfp2I5orlg8mObx3EZsBMwEg7G8zgZWoynEkR+RuqHySwv3KTiDem+q6sxR1gDNjFzXIzjbn+VW25tp2PnUraeRuw72IV9PvMFc2ZKVruk+48nwRf9tkp4p7iuID+bKwxre2eTV8pkG2FLP/J2SYI+UXk7gSaDJxRCsNTpcwyoUFsx+QI/NXQpxbWKi8lzaNq65cmSIUABwzQe1GBwgo3FdYBQ2iUpgqWAhRvqhJbSFf615Fb3PvCSG23NMs21MlaQpBlYd6Qw3MZc8V3fqxYLg 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)(136003)(396003)(346002)(376002)(39860400002)(451199021)(36840700001)(46966006)(54906003)(82310400005)(7696005)(41300700001)(478600001)(19627235002)(316002)(4326008)(6916009)(70586007)(6666004)(70206006)(86362001)(5660300002)(8676002)(8936002)(44832011)(2906002)(1076003)(81166007)(26005)(356005)(82740400003)(186003)(426003)(83380400001)(336012)(40480700001)(2616005)(36756003)(36860700001)(47076005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB7477 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT024.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 86eec2a5-6c79-4a16-582c-08db5c5c332d X-Microsoft-Antispam-Message-Info: /N41wz/pXRDiqIAg1vGimByXqYxCrxm/K13pOIz4KeKvlJsONe4ZdL7E6+hUrBMKqmvkimL8DzgzTF7Dz+WaCuY7RMcosqlDcWWgZWjnQPBkBhf3AyAJO6tsVjYde4rycO/Ueeg2U+NatwMintpkhQz4gXRC3Qi+jWBVossAFcRQY9oC5ASAthlQ8qZLwjv+wMUfWoXpT3gvp2MI9/hObipm6Tgk9VB1nLGJreRv5fxLxvW0TXc5rS4VAhBnBaQILAeVs1GmdVgcaESVQLUz1QoNpPvKUkiEnmlE5m14o4we0Pc5l7m6xwQzWp0fcFilnQra3QJ41VnZKPABJd28pvZyEOJoSVDLA0F5yDxsh8LMjVuPkWK+8LnVBKJwdTtbA5BlF9XnUEomLgXfCQfC5IuxBc/HqA635CgDb28LpgZnF336IrIwiqYEYYOnzJNt1R9cApc7h3y0QuepoKfv9JUYgmR0F6trPlCW6OrW5ryZphkBk4LbrtAjO/H0bZYaGMCeex5G1Ir7CIoSodtcjgYyVsewRX4C/zNaAZrHggh68w+/fgUXXAWlebb3JzEuYqenAwPIfFKEjHxxQoTprMi+gDyShqz3iEw0VdMOaN8xwS5oCM9xg5pDr/fIku612oyoZicyT3ds77rfJdy4+bOLCPG4ARQod0+LWp6fnf1EBXgzzPzk05HFBmfUPWj1a2zdpKjpghV2O94YZUyZ+kng9AeexMg3rguaPk4tuHrTCw0IG5yRBVT8527AXg5r X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 13:38:56.4005 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d602b634-4540-452d-1d7c-08db5c5c38e7 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: AM7EUR03FT024.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5749 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: VVbL1ZVS0aU6y9C5iDmaFLAyx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684935542; bh=Qo+mdW4UHx+GbBn5vN9ItweZ6H0o2KvYO6q+diyP1Bo=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=RH5qL4mU1d1CiLLbsoroEZSkNZV+04+vIJtT9GdOgiL+DTXiv3t72U0AE90QuDHlaDh wOMuLHRfyAPk2QT59CadQrhOHx+bjx2r63dHgDdv8o2DTYiuYY7cfYeQBDMQiRxdYDnLT ONR1GSJUXkm4t7TKnlZzSlxXoPHd4CONXDU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684935544682100009 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Although the maximum interrupt ID on GicV2 is 10bit and for GicV3/4 is 24bit, and that the IAR and EOIR registers of the Gic CPU interface are 32 bit; the typedef HARDWARE_INTERRUPT_SOURCE is defined as UINTN in EmbeddedPkg\Include\Protocol\HardwareInterrupt.h Therefore, use UINTN for Gic Interrupt variables and use appropriate typecasts wherever needed. Signed-off-by: Sami Mujawar --- Notes: v2: - Updated GicV3IrqInterruptHandler () to change [Sami] GicInterrupt to UINTN and added typecast before printing GicInterrupt in both GicV[2|3]IrqInterruptHandler (). ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c | 8 ++++---- ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c b/ArmPkg/Drivers/Arm= Gic/GicV2/ArmGicV2Dxe.c index a1670021c30f05707d7c37a789fdbacc4ffa9140..cd371cab2a0159b54d8e6f0f5d3= 930e1276cbf7e 100644 --- a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c +++ b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c @@ -162,7 +162,7 @@ GicV2IrqInterruptHandler ( IN EFI_SYSTEM_CONTEXT SystemContext ) { - UINT32 GicInterrupt; + UINTN GicInterrupt; HARDWARE_INTERRUPT_HANDLER InterruptHandler; =20 GicInterrupt =3D ArmGicV2AcknowledgeInterrupt (mGicInterruptInterfaceBas= e); @@ -179,7 +179,7 @@ GicV2IrqInterruptHandler ( // Call the registered interrupt handler. InterruptHandler (GicInterrupt, SystemContext); } else { - DEBUG ((DEBUG_ERROR, "Spurious GIC interrupt: 0x%x\n", GicInterrupt)); + DEBUG ((DEBUG_ERROR, "Spurious GIC interrupt: 0x%x\n", (UINT32)GicInte= rrupt)); GicV2EndOfInterrupt (&gHardwareInterruptV2Protocol, GicInterrupt); } } @@ -349,8 +349,8 @@ GicV2ExitBootServicesEvent ( IN VOID *Context ) { - UINTN Index; - UINT32 GicInterrupt; + UINTN Index; + UINTN GicInterrupt; =20 // Disable all the interrupts for (Index =3D 0; Index < mGicNumInterrupts; Index++) { diff --git a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c b/ArmPkg/Drivers/Arm= Gic/GicV3/ArmGicV3Dxe.c index 719701a67e756c2d2aeae8fc23d50b519a1997aa..41aec70481e05594628fe01cf9a= d5626e4ddbf9b 100644 --- a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c +++ b/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c @@ -156,7 +156,7 @@ GicV3IrqInterruptHandler ( IN EFI_SYSTEM_CONTEXT SystemContext ) { - UINT32 GicInterrupt; + UINTN GicInterrupt; HARDWARE_INTERRUPT_HANDLER InterruptHandler; =20 GicInterrupt =3D ArmGicV3AcknowledgeInterrupt (); @@ -173,7 +173,7 @@ GicV3IrqInterruptHandler ( // Call the registered interrupt handler. InterruptHandler (GicInterrupt, SystemContext); } else { - DEBUG ((DEBUG_ERROR, "Spurious GIC interrupt: 0x%x\n", GicInterrupt)); + DEBUG ((DEBUG_ERROR, "Spurious GIC interrupt: 0x%x\n", (UINT32)GicInte= rrupt)); GicV3EndOfInterrupt (&gHardwareInterruptV3Protocol, GicInterrupt); } } --=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 (#105240): https://edk2.groups.io/g/devel/message/105240 Mute This Topic: https://groups.io/mt/99108670/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- From nobody Sat Dec 21 12:59:48 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+105247+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 1684935552126486.28271395898935; Wed, 24 May 2023 06:39:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id mkdzYY1788612x5DR9dbXyON; Wed, 24 May 2023 06:39:11 -0700 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.51]) by mx.groups.io with SMTP id smtpd.web10.9082.1684935550665196480 for ; Wed, 24 May 2023 06:39:11 -0700 X-Received: from AM6PR01CA0064.eurprd01.prod.exchangelabs.com (2603:10a6:20b:e0::41) by PAVPR08MB9746.eurprd08.prod.outlook.com (2603:10a6:102:31d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Wed, 24 May 2023 13:39:02 +0000 X-Received: from AM7EUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:e0:cafe::7) by AM6PR01CA0064.outlook.office365.com (2603:10a6:20b:e0::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:39:02 +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+105247+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 AM7EUR03FT053.mail.protection.outlook.com (100.127.140.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:39:02 +0000 X-Received: ("Tessian outbound 99a3040377ca:v136"); Wed, 24 May 2023 13:39:02 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c258d0f7f664c26c X-CR-MTA-TID: 64aa7808 X-Received: from ead3a07d0422.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 6D46B453-0B31-4EC6-BE0F-738AEFE2CD4B.1; Wed, 24 May 2023 13:38:51 +0000 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ead3a07d0422.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 May 2023 13:38:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bt8eXNG4tCH4hN06Uw10JAaVnbzKbal1QMgC74q4+g4djaJIUjWtBUA427JtpEq7HEBDqB5YwOBMwvdrgnu/nwvdxIfGlH32pLUonR9sttCgmivCEaf0idwNjGirXqPQgKBDsL4rnmfZc7mNE3V5Og5Gzx8v0nOFaf40FsRYdkJO41pu8pLBI6FzkLyo56Qr2RAyMhyF7F9RkOKoj0eHVyjS6OqrZE1X4T+CmZCRz+d5kcDAUTYoaoVJU5MHLxMa/E2HIfM6jrRnrHpYsZMfIu0InK3bZsyW93otootyJpl2+d7XSVjo1KIrFHJj+mXY3JWO/ZpM4k/xsKhAoOJl6Q== 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=hn7xhGhgegZB4dkBiZZWTyeRUiBVuY9xPNbIPE6vbWo=; b=FF5PsWe2cVX2UL7CuD+myUq1RYKLtfxmSjB7Xol2Qbb5cyGDg8fjGEG6oqOFXHMFQgYlM3Pa/Gk+Ibzf/GRZTn5AKvA4MA0x81EPMjgNgaSSLEbWmapab08RcEQVcxw/N1YDVrpyXAkFHaj/yLopPH/eha24cCfiokQ8Hxd+mtdtGygfJPuA01hJNmzpENKHPZGKhFMpdP+EcG8QwiXmRFw1+CMCpxEPkU3/YCcx9eagfthiwUN3OubswH/4LsZFyKDp3Rq0Z78tdJzvLrDyvl+0Ew0L8RASDBy1WEsGPr0ydpCafKUckU8Ms+c2On4rx03AoGnMyWaLVOiFcqqTbg== 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 AS9PR05CA0052.eurprd05.prod.outlook.com (2603:10a6:20b:489::10) by DU0PR08MB9774.eurprd08.prod.outlook.com (2603:10a6:10:445::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Wed, 24 May 2023 13:38:48 +0000 X-Received: from AM7EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:489:cafe::3e) by AS9PR05CA0052.outlook.office365.com (2603:10a6:20b:489::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29 via Frontend Transport; Wed, 24 May 2023 13:38:47 +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 AM7EUR03FT051.mail.protection.outlook.com (100.127.140.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6433.16 via Frontend Transport; Wed, 24 May 2023 13:38:47 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Wed, 24 May 2023 13:38:44 +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; Wed, 24 May 2023 13:38:44 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v2 07/11] ArmPkg: Typecast IntID to UINT32 in ArmGicV2EndOfInterrupt Date: Wed, 24 May 2023 14:38:36 +0100 Message-ID: <20230524133840.28612-8-sami.mujawar@arm.com> In-Reply-To: <20230524133840.28612-1-sami.mujawar@arm.com> References: <20230524133840.28612-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT051:EE_|DU0PR08MB9774:EE_|AM7EUR03FT053:EE_|PAVPR08MB9746:EE_ X-MS-Office365-Filtering-Correlation-Id: 77fa3973-81b7-47c9-b5ee-08db5c5c3c87 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: 0sDjHEY6/1pK8A5pvvKUcsFrx6UjV7hcYYGfCwHlJvZOeqaEaRM+QUKdBl50zZQa1mwXuFUvs/qZAjde82JggEqrpqE0M2sdMs8KWG7SasGlKW5ZftN2bQ3fyXYOwhISN4bZnj8DtYAXQprq33f1RseXoDmHjljA3oitbfQRJ06dGGOEi4VyodX135Z7XMppff7K5Uw84gTLCNtqj9CrIp9FmRkCAno2asHy8vlsADs6vr9c0Pmv3kMobqtK1tobteEiDNO0q5Bx3xNxkQhQEb3MkcrKqL2pqAaIEAIRYm9IeLi2n0QFKkVX8i2kvrgPf629xKGj0pxOTF7VhkrWv5CDLerq3Z71xkCaD1LGbJQbGwdsyxItSdFVLh1gOXYwg9H1xTTQcCyWAxVwdp2Bgd6pBez98208QN74DJMko0ncrbJrqCmtEvsUsWMh+r8DNFyUidBRub//KvJqdJ3+zSjbMqfmEiTtHOZ414fL7xYN7tAsXUKLG6iPHVZaermmoPlJofM1NrEKRoioXu9P5ws+VXpBaa3YWyCg/jUrQmWVgy7hpos9vwVT7tVLEDXmCQGyXCTQqDf+XTTdt5fxxJF6EirhiKd6pVXOCHnxHHT2rNdQo+hivYAZIOHcLcbRRa4Bta4ifk3PrN0EN/3uPlxehY6+OvNr86VliKRjm9i539umdnzdwNiJcj8ASSlmekfzeD+Ne2E9drX/rTZWZKWYicEXFg26fThWxIJ+mLw= 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)(6029001)(4636009)(346002)(39860400002)(136003)(376002)(396003)(451199021)(36840700001)(46966006)(70586007)(4326008)(966005)(70206006)(478600001)(316002)(6916009)(19627235002)(54906003)(36756003)(83380400001)(47076005)(5660300002)(26005)(426003)(2616005)(336012)(1076003)(186003)(36860700001)(41300700001)(8676002)(8936002)(44832011)(2906002)(6666004)(7696005)(82310400005)(40480700001)(86362001)(81166007)(82740400003)(356005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9774 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 5a29a1b9-57d9-4ca8-7e17-08db5c5c33ac X-Microsoft-Antispam-Message-Info: xWpky5pROb5cmsuALHyHoHqEXh31eWFB+Q4bVEgxobriypKAsBOTdem9uDBTqcUBiwgD2odV9zVSj76UQWtoZ2Ls29eGfwxT2GMW70wJiE8DIKojQ4TFtGECfBm9GOZia6CglNXw2QWgykMqKTids7it2FrOrxghf+OaOpAUzP7w6hBi/JBatjB7qaKXP9qv8QLOSG7TP5mXYiw8SoSOKr3EGBTOWs7l/+vpJfMXi/vjEftmodW1sCNVU0mf6hCK591saCr9n1otSuHoNfIfhV986/wP32Ls2HaP0fIHvAiYloRmGf8wNUqdh3HZZzhhMsUoDI3/+UM7Ll2bDiAWUF9wsT2+NRFw6gRGcZoZVm09gvTc27U5GmJptPDx207vBGj97A8MpJzzQLai6xOaBEkelqkN0OtoHHK79s7egQoKjWegacDLQA64dak3euI+IzzELiOJWC6wW339HYLKIE16jeHXEVLcYwjXmCzmeY+qo0ZIc0KBtp2Vhz4GsZ7y6QTVfP7x5Q+OKf+JP9KyjnijAIhpfrvE/tCj85zGc5v8zn1vSWeNybD1pSN/TpxbuWwEWSl8mlEfCAMYs7zJR1FB0qaZG8appwTMgtfyQD9Njdf8DdFWUJAp7Jh8aW9zCcLB1cFuLAaXDEZIbJJy7lRRAeY50bHGj9GcHftQkEWEyNb+rZQrLEm1ISycVZvirADpczqbiQW8Vxh/z3+cDUYPQYzWr3ZDqzcLFYHJyKY= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 13:39:02.3768 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 77fa3973-81b7-47c9-b5ee-08db5c5c3c87 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: AM7EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9746 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: 25J97hECYmstJlTXyI8JeRPmx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684935551; bh=KTsp+na6M8Z9pTzgVv1nQxf0TNPjovbfmP0LEB1N37A=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=XUyYTHw1BTa+OJbovq+fxt8SDtnTxUqFvXRqiEZQipdllbNKjlRFWEfqWFhgYs4TY4O 0pZ3JJ2knYStYFFDHTpT9WqkXU/e34ytwjztM5/q6rvKGEigZSsKW60jYxsbqMXQz/RUR aPHoXzdpO0dcDoF7R0CVL47a3lmhHT9cKZw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684935553500100039 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The EIOR register of the Gic CPU interface is a 32 bit register. However, the HARDWARE_INTERRUPT_SOURCE used to represent the interrupt source (Interrupt ID) is typedefed as UINTN, see EmbeddedPkg\Include\Protocol\HardwareInterrupt.h Therfore, typecast the interrupt ID (Source) value to UINT32 before setting the EOIR register. Also, add an assert to check that the value does not exceed 32 bits. Signed-off-by: Sami Mujawar --- Notes: v2: - Assert condition should be <=3D [Ard] - Fixed assert condition as per feedback and [Sami] also updated copyright year. - Ref: https://edk2.groups.io/g/devel/message/105187 ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Lib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Lib.c b/ArmPkg/Drivers/Arm= Gic/GicV2/ArmGicV2Lib.c index f403bec367b5254c248e620e56471904e520f9f2..d21caa90e5def04ff9666939c87= 9de4aa772f97e 100644 --- a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Lib.c +++ b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Lib.c @@ -1,12 +1,13 @@ /** @file * -* Copyright (c) 2013-2014, ARM Limited. All rights reserved. +* Copyright (c) 2013-2023, ARM Limited. All rights reserved. * * SPDX-License-Identifier: BSD-2-Clause-Patent * **/ =20 #include +#include #include =20 UINTN @@ -26,5 +27,6 @@ ArmGicV2EndOfInterrupt ( IN UINTN Source ) { - MmioWrite32 (GicInterruptInterfaceBase + ARM_GIC_ICCEIOR, Source); + ASSERT (Source <=3D MAX_UINT32); + MmioWrite32 (GicInterruptInterfaceBase + ARM_GIC_ICCEIOR, (UINT32)Source= ); } --=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 (#105247): https://edk2.groups.io/g/devel/message/105247 Mute This Topic: https://groups.io/mt/99108685/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- From nobody Sat Dec 21 12:59:48 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+105246+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 1684935550209255.2331217568253; Wed, 24 May 2023 06:39:10 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 8gcOYY1788612xuYVJP2qXab; Wed, 24 May 2023 06:39:09 -0700 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.40]) by mx.groups.io with SMTP id smtpd.web11.9080.1684935548700874105 for ; Wed, 24 May 2023 06:39:09 -0700 X-Received: from AM6PR01CA0060.eurprd01.prod.exchangelabs.com (2603:10a6:20b:e0::37) by AS8PR08MB9432.eurprd08.prod.outlook.com (2603:10a6:20b:5ec::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Wed, 24 May 2023 13:39:03 +0000 X-Received: from AM7EUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:e0:cafe::bd) by AM6PR01CA0060.outlook.office365.com (2603:10a6:20b:e0::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:39:03 +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+105246+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 AM7EUR03FT053.mail.protection.outlook.com (100.127.140.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:39:03 +0000 X-Received: ("Tessian outbound 3570909035da:v136"); Wed, 24 May 2023 13:39:02 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 46ff646ed48d5238 X-CR-MTA-TID: 64aa7808 X-Received: from 8440cda8f475.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4D1C26FB-5BB6-43BF-94BB-A26C49FB4F1F.1; Wed, 24 May 2023 13:38:51 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8440cda8f475.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 May 2023 13:38:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kez5Jq0kOLyFoMa35X1LfILYWU3178SkftUOf4UXo3zjUNL534w86JTaGVHxCnrpFCn6iqKWXxb7YAF5XpHR2fI+Agr2GKXb3BR2xBGCmB+bxCC8wqaBPHsggJuo5C0/inOIzypFB2mYKxvcuPI8A1ddxI1v3N7hi8Hkkyk3KosslkGgOcCAHLwHgz0O6nb/JryPApD9uJtZ8TvMXSXALDeGit8lIQ/rVB3hYT/3wEuGOBpXjPiD/q0aEWVaemguFpz0sogvq7/WJMGv5OYd1LPtawFgTfgv7gPEbWu9HFQlENUjj55KY1Gz8CYWZ2u/BI8xsrll4K9asVBDjgSotw== 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=UDWLGdjhZnrfkb2LWDzLWkIhmXOCrreCZ8tKTYut1rc=; b=T2dV6m+zF0ZGV8V6tmflyT1KB/fds3T38iici05SoVC2fdB4Xuxc0Kb/aN9ch6hN1RxhOnOHD6HVrbhnZOkyXIZwJuj3nHLyst7jEIarlzxPbPrU+Sk7evor4ElFM4385AYFeuG54m0q5p34nYAfOH2MGMYkaakeOLGTNeDx8MNJ+Z0/zSitdaSu4KcAObHtfPEVgHAK8kFfqX8XMZjjZzQVBXgqUHeGzxeBoTgFNVs18PM62TUDPRC9daHJiKWYQhtq9I4AA1kQSdcZVqkjgM2MbTIl+xxDSbB3AuZK4O2OT2rB7iNdfm1snxbzNIFVrTn7dVdQoG1/H3HNM23CvQ== 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 AS9PR05CA0036.eurprd05.prod.outlook.com (2603:10a6:20b:489::20) by PAXPR08MB7598.eurprd08.prod.outlook.com (2603:10a6:102:23d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Wed, 24 May 2023 13:38:48 +0000 X-Received: from AM7EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:489:cafe::61) by AS9PR05CA0036.outlook.office365.com (2603:10a6:20b:489::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:48 +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 AM7EUR03FT051.mail.protection.outlook.com (100.127.140.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6433.16 via Frontend Transport; Wed, 24 May 2023 13:38:48 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Wed, 24 May 2023 13:38:45 +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; Wed, 24 May 2023 13:38:44 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v2 08/11] ArmPkg: Remove unused function declarations Date: Wed, 24 May 2023 14:38:37 +0100 Message-ID: <20230524133840.28612-9-sami.mujawar@arm.com> In-Reply-To: <20230524133840.28612-1-sami.mujawar@arm.com> References: <20230524133840.28612-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT051:EE_|PAXPR08MB7598:EE_|AM7EUR03FT053:EE_|AS8PR08MB9432:EE_ X-MS-Office365-Filtering-Correlation-Id: 7f012f43-5ba4-4e9d-fdd8-08db5c5c3cf2 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: iUlJw4tVl4AzLHI8OxriPKw6THLTY2nY5Icj/F9QMVIKmA9G6jikM+31A72T6+k3/UZgjD943t0i3WmkU6tH4iJvqnT9tcaUz2z/RLVPIjhsll6GU7T0ujjK+UfcMypCVRKOrd6innvug50BsuYHo9pfTHRhRJnk3+pxqvnS3qCONvYeTNSF5heb5I9IbLRkgBVPPOQVI8QojiGMi1L7CaQiaph4Qm/nJNkxHhbW5EAt73R/B08rBBE+fiW0Uq+eBY61vCiRMbFOWVxD8Rmbc/JWjt4jSSWt3QfXAvGdeQ2wcQRrRaoVIKA0nvAI4PBrmlcBpPDd2klcxCUBjf6KG/t1yk2BLvwuTfCz57K8KVCatYd/Wndx+qbq2CopO7uvSEZBAd9TrNRfAnHBFdy8A0nkw1KRTPZyD5bH1yARTQ73jIp+K70n/uhj5PpssuEArg5YyTa7FW5pjhbYTfZFWC2sJAJdx4dt9Vjdlg5OCYqbLcf6fkj6Vcxfln4mJirczS/JymlhQe6FG6rT/llDzb7Lq33ZV1muYQLC8kvto5KRbeJ80EepsvpdXolM2SGBk+deN1YTeNkReapbdx3pasw2eFyRSvBVhnu4aQNmiV+uWu3X3DCDKTmaSCQ4XdkbOOEzXrKXUFqxZ89n3ipUsQKU+n8voNhoowT8ABai/w4sdC4UZtvWHh7UrwQjsnEdt3O4VeMQD5Ywf68AVqUxX9ar/ZExuwQkDAjoztBUof3Xk/cPPIuLepAFVd8KJRBM 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)(376002)(39860400002)(136003)(346002)(396003)(451199021)(36840700001)(46966006)(36860700001)(54906003)(83380400001)(478600001)(86362001)(2616005)(82310400005)(186003)(70206006)(70586007)(2906002)(6916009)(336012)(426003)(47076005)(316002)(26005)(1076003)(6666004)(82740400003)(40480700001)(44832011)(7696005)(4326008)(41300700001)(8936002)(5660300002)(8676002)(36756003)(356005)(81166007)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB7598 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: d1a7f343-2bf1-4c94-2449-08db5c5c3458 X-Microsoft-Antispam-Message-Info: bivS0fY7GcsFGWPAOJFJeH7SE3nuLhglqSDdEOosAMZpcI6ZQAqUwTPJiu7+Ova8Yi+xQZIwlBx/wbalhAMngzKjrpmaS+Xzr6NrfWn+1+8nFacPai8QczrdUYIwxPoxXgepvmUZBbgnnfBcn4l6Wex28xk7i7HkK6TEysP8m1m+YeNnnJ98YJgZTl3Z1iNf1mQJUt/sfvVHrzray0pPq+1xInEcCTv+3+8m+wQbZz/gfLyuV87W/xgk6+B9vDPXqF14yf/o70KmdpJqikYSMO53C2FfxWTKFeB+TGWuXlbWCgL5FcLKLoS9fQrxm2OX+TUta2ffvILMFmWAj07Yw2cfDyTdiIeu6e/IGOtdTG8atldNi6NkuaO4ZMI+FbMLy7/9rxtVU6XIekyI7Ob/hFt63Fx7EWnecKXYxTXtXQuNds9Q0TdXT894iWr1r6XP3VLMNQU0Pr6uJeqG/dPEnFtO3C+LaAZE272kbTDPljtMP1lftd8iYAsSlI8yUFrJUcEAK2ZeaaihYaWU3SXFXY3xyj2pN0rlUB+WF6Co+7NPtrcfQyOH7rUbzyUZvA64CWu5j0dmQEBpImmVi7dXyWEpY1+sD6XvUBW2BTMkwaZBSKmhe/XMLnLWhSCtiz42gGAHp0by5UtD+XwBwK4KQfFH/7qOZYFZ7VNb7xpU4lGfJAC7g/pdlfN5qz3ylFkVzkwqxjvbAaf37Jqh0gf12VFeRU6WsD1eZFfgIYCs5SuNBfasJ4sERtArg5PA0Cqz X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 13:39:03.1736 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7f012f43-5ba4-4e9d-fdd8-08db5c5c3cf2 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: AM7EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9432 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: AiWmUYyYl4wupwyxPLCN7uQox1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684935549; bh=JN1aDnk9nItEaG/S6DH2SFwIZb3hzRdcuOZyL+QlYu0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=H+LtWi6bEdbH7qwp4uxO3sGmAEangw/jjo9lHGjYV8Obpr99l7b9zOnFPjyov5BUjs+ 1LCI93EqsVOlzY57IcwQl3gJ5ovcsqJDqhqANiSK1Pv2pnN5S1mwLPTKGpCmB0CRWf71z jERpO5NIba19H8PYPYTHFfc6TY+o2ksxMFc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684935550873100029 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The IrqInterruptHandler () and ExitBootServicesEvent () function declarations were unused. Therefore, remove these declarations. Signed-off-by: Sami Mujawar --- Notes: v2: - No updates since v1 series. [Sami] ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c b/ArmPkg/Drivers/ArmGi= c/ArmGicCommonDxe.c index 8461fb7927eaf97c75135205f444d33c205910db..c285c27fdde4f1bd1d04068d479= 90442a6bdf20e 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c @@ -8,20 +8,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 #include "ArmGicDxe.h" =20 -VOID -EFIAPI -IrqInterruptHandler ( - IN EFI_EXCEPTION_TYPE InterruptType, - IN EFI_SYSTEM_CONTEXT SystemContext - ); - -VOID -EFIAPI -ExitBootServicesEvent ( - IN EFI_EVENT Event, - IN VOID *Context - ); - // Making this global saves a few bytes in image size EFI_HANDLE gHardwareInterruptHandle =3D NULL; =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 (#105246): https://edk2.groups.io/g/devel/message/105246 Mute This Topic: https://groups.io/mt/99108683/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- From nobody Sat Dec 21 12:59:48 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+105241+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 1684935543521660.3092399988399; Wed, 24 May 2023 06:39:03 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id af9YYY1788612xnUKJGDZ7fa; Wed, 24 May 2023 06:39:03 -0700 X-Received: from EUR02-DB5-obe.outbound.protection.outlook.com (EUR02-DB5-obe.outbound.protection.outlook.com [40.107.249.88]) by mx.groups.io with SMTP id smtpd.web10.9075.1684935542271000499 for ; Wed, 24 May 2023 06:39:02 -0700 X-Received: from DU2PR04CA0069.eurprd04.prod.outlook.com (2603:10a6:10:232::14) by AM9PR08MB6002.eurprd08.prod.outlook.com (2603:10a6:20b:2d6::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.27; Wed, 24 May 2023 13:38:59 +0000 X-Received: from DBAEUR03FT038.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:232:cafe::6b) by DU2PR04CA0069.outlook.office365.com (2603:10a6:10:232::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29 via Frontend Transport; Wed, 24 May 2023 13:38:59 +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+105241+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 DBAEUR03FT038.mail.protection.outlook.com (100.127.143.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.16 via Frontend Transport; Wed, 24 May 2023 13:38:59 +0000 X-Received: ("Tessian outbound 945aec65ec65:v136"); Wed, 24 May 2023 13:38:58 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 90f77c0b132da520 X-CR-MTA-TID: 64aa7808 X-Received: from f53714ad8f18.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C7DFBF5B-A8BE-4895-BD0E-110AEFECF96F.1; Wed, 24 May 2023 13:38:52 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f53714ad8f18.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 May 2023 13:38:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bbLbpHpunXGW1LJmWE3XxCpMsTKiKKxM/XCL26PfBughHOX+f9f74efNihyYmaC4nOUsSykyxTqyQXYFjcKHetMKrX3pWlmlf8D/KMHw+dWXQgV3n21ifyhy98F0z5/9/fouDIlx2YkGOZjIyZ5W5BzWpwQTXgWIl4WE0NWXL6DlgeVGDiGKjKDG1abI4tH70WmHUR78FvGTSrvXa6bDCMbuHbUuyfzi7xZObOYsAog70gIzMEMvJkyawQrGqysBUErfhGREZuQ1MxKEIYRl7hvHCtTDjn1X1xJsoA5JnQ/v4sIly9RjY2hE99zW/dNNlgdni7IdvYH9iTbJzx8QHw== 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=Bwfsd7Cw57ZHozkg2x19eiWezjaVr9rMed5QMrvOYEU=; b=l2rmoCB7C3MwvVQ3Zd7TVPi9oR3JHUhIGVoPP+ap3Muusq33mZLJDH2Wvl2kxO/BoFOloD0dNjzsaE1g4ZP4WBcEqrok8EIyC+b00Wm2AubT9dLsXd+xtz2zNYTZAeC5aLBXzkjxrZ71vfiVk9sG5rRZRc4zd8NQ2J3vd75mLDs+MR3QPYV4Qsyc/M+y7k9NC20VThEkyTLvbUl440Nj6xzxAruT3XGI2nUzmCqhawTv02y3hvArLj2L9XQsvFKDFekfAPrGy0m1Cu08Pp6XCDoozHsCvkNSJQep2OPViO9NoVMaaov4A+Aj4ztCHyJ97hh8ITpa8S/Ur1kyQN7LwA== 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 AS9PR05CA0051.eurprd05.prod.outlook.com (2603:10a6:20b:489::8) by AS1PR08MB7562.eurprd08.prod.outlook.com (2603:10a6:20b:471::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Wed, 24 May 2023 13:38:49 +0000 X-Received: from AM7EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:489:cafe::83) by AS9PR05CA0051.outlook.office365.com (2603:10a6:20b:489::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:49 +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 AM7EUR03FT051.mail.protection.outlook.com (100.127.140.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6433.16 via Frontend Transport; Wed, 24 May 2023 13:38:49 +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; Wed, 24 May 2023 13:38:45 +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; Wed, 24 May 2023 13:38:45 +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; Wed, 24 May 2023 13:38:45 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v2 09/11] ArmPkg: Prevent SgiId from setting RES0 bits of GICD_SGIR Date: Wed, 24 May 2023 14:38:38 +0100 Message-ID: <20230524133840.28612-10-sami.mujawar@arm.com> In-Reply-To: <20230524133840.28612-1-sami.mujawar@arm.com> References: <20230524133840.28612-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT051:EE_|AS1PR08MB7562:EE_|DBAEUR03FT038:EE_|AM9PR08MB6002:EE_ X-MS-Office365-Filtering-Correlation-Id: 2c476e53-5814-4897-0f6c-08db5c5c3a97 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: IKrL0thrbG9YyHonJzr1aZ0fXyMPCWbgCj9v7Ed1PC9CtZ85OQXzi2dMMT84rCgKS+rMhgQK+n1iaB32+DVnVU8fj2ERzPmC3fHTfy4uKdrpJwebnstS2WdqLJbOovar431Y9xXF4zA5J4xUdOdGDRGuUXzvulq9+RDsfxYLcMiWtNPRWBeL7kAGQQAat9xCP3OqoRgCc7pATQ85S3FC+5X4eEA1eqdiv6InZc/r29yRoO0AcmsnI48U9YjkhCKuBx/pUVZ6sDwQvI5oM/pFkbv+Xbhbs+vUfBL1I/E1IWS2H7AVqOEYsvvzWtUMmD9WYfxx82iWQj8RU15AUl1VX+55E4nk06QuTytLRUTRXzavr7l0s9aUAhCrsJfwuJpb+JPsuHotrVfDW/iyRZ9Ie4LfpLH5qKPdIFvg0kDW816DLdtfQLgpYxKykK6sHRsZg1YkQEEvknvfK1sNMzh5dKZ2a+4dwtEW34GoHYw9DRGlwAVNd1YOYfv7GSEPnSlnpJV2aurQ7Vjs3Ju0+oxjVVKSuvtdkC2otAgW09e3dDvAuZT0LzM7uJhPVRBiC9zZEvjEwbLovy6EihC3hOVQQoeymjeOeVXcnEgR9SMG8XIY2dzcOH/NxE0GLlhKBdedOKW+V01nBZNya/ct+NdjsB1eDooMmbTEc/ckjp3eXs/CPm0VOidWIsZ/blCb8mEvgJvsxNvxuOAA2z0WJXOGaqCe98B4/X51euegxr+xJTXqY6mKaPYXTe0RDdAw9tL4 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)(396003)(39860400002)(376002)(136003)(346002)(451199021)(36840700001)(46966006)(5660300002)(8676002)(8936002)(40480700001)(186003)(47076005)(36860700001)(86362001)(36756003)(2906002)(426003)(336012)(2616005)(83380400001)(82310400005)(44832011)(356005)(82740400003)(81166007)(1076003)(26005)(316002)(70206006)(70586007)(6916009)(4326008)(6666004)(54906003)(478600001)(41300700001)(7696005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR08MB7562 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT038.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 02fedb47-0d2c-47d0-a78c-08db5c5c34be X-Microsoft-Antispam-Message-Info: VYrasp63y7XPbIs1gF+ZtyeL8+g/K4j6d4IpFW7AzCkA6dWpxs8pPUuRc4L6Dlk/E3pF+ViQbhoKPGGtHxy9qFz/5MBxWfawie5p+osqrc5Jx1gp42EPF5vKfJONgcFU20AkxPRNKSAz2pGV8VdymAqsL8JgW3Jv6MJuTomNvF4r8C2xWf2gz/9r9VhstNoHV24/HwV1H4xbilOYVI1T6sQwOWaGBczJpkZP9Q3uETkkhwhUrKQgFGGIyYeFkbEP8dQ36ZZmHVwJHzsJeJ+/A6yHdkdWJrdWlDHu3eRkd2KMYkB0B3WvGQFkfLOSka1GOoYuZWWZL7IlG412SkEgKLgmz4YBHLXSReWaIr46ZfsoYs4m5o7oU6pvwQbE2e26st+DZO4G1IrtvLw8yZWs0nNxnpMZy6v7QM9sJR7lPQWEcfGPXHmvxBMP2yXh4Q4GOr9O3Mp2D22uUK+GnASvNrdxtCO+vD+Go+8ThQDW9ZlBk3/4ttG16Hz/Lv++BJlBbM0YPBxnxYPSPnzmGgoEJfZ/RILeIu8s71jFgkHdI2vbaVrfsR3WVrETlLzI9gJEEKPbs2Uh1dyoggLEtF+kR5K8JcoUT55VsRSGNgaCYZfL33KNsdL7Y4dIYmBSDa6+wdnN25iQUOgyrbML0sza+oHwI2xxE0KM9OUeQ8z0fX2NhiMlnpZS/19Osuyr6wSzAMb/kJTClt7Hd6r+RWYB5fznKZ2JSnEi7m3BWT7DEQntPqT61jkqokoJNanXDcTs X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 13:38:59.2157 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c476e53-5814-4897-0f6c-08db5c5c3a97 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: DBAEUR03FT038.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6002 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: RRycnYh1jGfTV88AgvM20lMTx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684935543; bh=olbQ/zSxq7cyWmU6npIZaoeSL0eeQirgnIwEUpmCP6M=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=TcMxp6/FwZX09iCSktb3s1FVuU1P7LccpggqyTkzDZjZLaBxxXK7rtOhv/uLuwBIRp+ movCzP3AAoVcY1UTouNa9YHnMERiHROrmPm/b7I2xgVqCpQEH9ppeJag0ju3pLLMk8Xey GybFUCywOwi+nDemvFbxUW2G/4R6TfZf6C0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684935545329100015 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 --- Notes: v2: - Updated copyright year [Sami] ArmPkg/Drivers/ArmGic/ArmGicLib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmG= icLib.c index eefe6350eb804bf9b2727b605d59035877ffb817..0127cca3bf0567bc80702f415e9= cbb9bd2709fbc 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c @@ -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 (#105241): https://edk2.groups.io/g/devel/message/105241 Mute This Topic: https://groups.io/mt/99108672/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- From nobody Sat Dec 21 12:59:48 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+105249+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 1684935562086795.1942511832275; Wed, 24 May 2023 06:39:22 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id NCuqYY1788612xzbeFtu5MnZ; Wed, 24 May 2023 06:39:21 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.83]) by mx.groups.io with SMTP id smtpd.web10.9086.1684935560917828133 for ; Wed, 24 May 2023 06:39:21 -0700 X-Received: from AM6PR0502CA0052.eurprd05.prod.outlook.com (2603:10a6:20b:56::29) by DBBPR08MB5961.eurprd08.prod.outlook.com (2603:10a6:10:203::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Wed, 24 May 2023 13:39:10 +0000 X-Received: from AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:56:cafe::71) by AM6PR0502CA0052.outlook.office365.com (2603:10a6:20b:56::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:39:10 +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+105249+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 AM7EUR03FT037.mail.protection.outlook.com (100.127.140.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:39:10 +0000 X-Received: ("Tessian outbound 945aec65ec65:v136"); Wed, 24 May 2023 13:39:09 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 88d6e5249b482c29 X-CR-MTA-TID: 64aa7808 X-Received: from e2449963ec0f.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4421332A-3B2A-4C2F-83FF-62519FFBA1B6.1; Wed, 24 May 2023 13:38:59 +0000 X-Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e2449963ec0f.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 May 2023 13:38:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Is1ovBXmc5Es7tjyr1hs97SKhfhlWPBx/OCPHyTbcD9qeBRz+gRZnjMfUAOrWB7obLX+dP8NUBEtWOqiNydIiXrNAjKBTeekHO1JspWM3l2Wr4+JMyq15cdpyR+gyT/0zIybEroip2PxXcIs7InahhNc0WLXpCcrSZllZXiq3gE2Dt8TzKP6etLWghMce+te2B2dbghwqJCQNAfGf1gW1+fNm9tU9XPbIpINRNQZ0WoagAjAPWyr9jrQzLowukAabC4CEzJoO3uTa+K2Pld8kmtJFDiUglwZfi/VsKTeAFLkPskD/z+fWydQR3BLNRMn8AZS4Ypz2A3tTGnxxLl7Cg== 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=bmQYOsWzU2Te+JCcuss4OC6+7lMKt1tkVmUvl6iLnWc=; b=WUCeGAvBg+Yi7LvLMgpSEvxVoslBqhxpMWhMb+6xdkWEmLvSOCiDLjY+nOse6RSOKqh51y/Qtuf2Us+Xx029ikDzOjwTWJo4PnxcHijg5xzJG/+FR7h7w51QZA+ycefE2xRSO5oBR+cdYIXhrfoMASG9PhpwME7Cbsqf/U42R7g1iGXYRUU6od7wrAKcgNjZoaM/3fqgG4jGkr/kkmR2CDfJPOKrbBUJ0+u7GCR4YT/tD44O+ZdkjmUIUFynbEIkDBmPUjCV90YGwnkIPdp4i8my+sEJco64A9rVLBktZQEapF+8WfeBlZU4LR8SnJIa+USCJElZXG19gbZO/3GdHw== 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 DU2PR04CA0264.eurprd04.prod.outlook.com (2603:10a6:10:28e::29) by DB4PR08MB9382.eurprd08.prod.outlook.com (2603:10a6:10:3f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.27; Wed, 24 May 2023 13:38:56 +0000 X-Received: from DBAEUR03FT044.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:28e:cafe::62) by DU2PR04CA0264.outlook.office365.com (2603:10a6:10:28e::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:56 +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 DBAEUR03FT044.mail.protection.outlook.com (100.127.142.189) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:56 +0000 X-Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 24 May 2023 13:38:46 +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; Wed, 24 May 2023 13:38:45 +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; Wed, 24 May 2023 13:38:45 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v2 10/11] ArmPkg: Adjust variable type and cast for RegShift & RegOffset Date: Wed, 24 May 2023 14:38:39 +0100 Message-ID: <20230524133840.28612-11-sami.mujawar@arm.com> In-Reply-To: <20230524133840.28612-1-sami.mujawar@arm.com> References: <20230524133840.28612-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT044:EE_|DB4PR08MB9382:EE_|AM7EUR03FT037:EE_|DBBPR08MB5961:EE_ X-MS-Office365-Filtering-Correlation-Id: 04a6663f-4e65-4b8a-dbd0-08db5c5c4111 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: HMCI4dX3LU0xWmw/ahJ9DhRjckcznujAa80y3GVCl63POlmkjkjhF7YleskLDl87LRWaArILbUNgm/xpRw1is3oWkB9ZJatQeY6gkqhLtcGPYzzi+UdNK+UvDlHyki8h2OMC1W3G7VfhttwSn/H6AP/0yqfE7vhnk29eIMyzHq0YQSmpcGwvSXzLrVsO2LREATUIZP3kABUfGbENOOlAnxo4GhDSVgnetpMfkOLQqSb/brIteOBNPSx7N/eMrShnHXbmW6L4tpgtlLzmQS46lofE5uTsFAG+osSkQhtlcoO7YslhcTVg7vbL5wVBze1ywDdK5pVjGTojyE9ufpXcwJAD33P5yTWS0K0qf7FKfo2GGsZj3RINBgB5CpESI2t6T5ooMk1pjk1aTvnws+DBQ9IHv1OHR4fZPpLzAKaRKOHvz4HVqoioSUQmJZ69sak5aR9OUD5EKzv4dqWv/cnlYsAYvXSuIJCMNbADCMUwT4C13aLEcL9zfgPKdGXc+0j+ZMsWhUq7fHKjC4JYtzaGguvBmqcHghVwV3QfWqsw7t7RlfdVbzr61C4Ns2AtWQUm+RUKNW2KOvK7iw0G92+Ts8+iKM6V12iOOQHscH3ARf92YHSlcmmNr1wEOM8wQggV/N85VtDqBRt6RVeWGKkM7cwPN8LYwQbYwrBCuozRgwyhxxoIufKJTCVuKxHthmVe6Rsm1ZZl8wF4ywVneSQ0fUfajJMtI2M+rXC2PuI5OHM= 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)(376002)(39860400002)(136003)(346002)(396003)(451199021)(46966006)(36840700001)(41300700001)(478600001)(6666004)(316002)(1076003)(26005)(7696005)(54906003)(19627235002)(6916009)(4326008)(70586007)(70206006)(5660300002)(8676002)(44832011)(8936002)(40480700001)(82310400005)(186003)(36756003)(47076005)(81166007)(2906002)(356005)(82740400003)(336012)(36860700001)(83380400001)(426003)(86362001)(2616005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR08MB9382 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 1b87a634-525e-4632-8f7a-08db5c5c38b7 X-Microsoft-Antispam-Message-Info: gMij3ki3FvglOGTo3tOJB6uPcGnExkY1UH2kuhdWWSMou+qgMsTVwelOhN+R6cWl8rymuZrGuWmtJ9jBBKjuRl/6YjaKiifvcibjSDHd+Y5dW93FUO0hUV6BSoByQNw76Q/3iF80I4sfZDh37NSWHX4ap8fkO4/aeea7AWOaChUR9dcwHi+5CwE8iwx3qFnbJQPFpwQF3tJ3f4Y8UgUpvGDLNxzAen7fHVHrLwnrAe6xOTHnbO7MBnJEUrGI7eGIptCxOp8P8iunrY7Ry/JGA4HZmjgPY45I/SPGE8oWHbDaEtMEz/DT8x1tzFJI32R5Vt2uTIMXk8JVyFCSkcbQ8VAh1cpneuBNRgOrxJBdwxeyvN68YVlOTWenNSTBgHbDVBercw4ETDJVyNu98Ht6SvCm+MTK4OCWAU61hG0paKNtsMcCGZwSW4Z/9zHjFCfnJwWMEc3ycHz8UI0STdcK0rlmqdfRKNlF3d1CZ+u3Cb+6qlL1+6prRk/e74XmwExZavQmtsMlJsL5jpdr3pbUP2/D8kF0rxkBQjTK+NETGefDHvFZ77oKiR7mN42RDnnXn4fj3f1QhK6FLRE40wZwMYJogY31yFuYjkRNO1gTpd/qYwcfsHzCTfNEtYFAuKKnRihhwlUghzNpD7T4EiCd9YheckZp7i1zgRerHPxrPO7akrdoJQZ9ElKALaAaFCzVgEP6OR+QcQcXsL8engsjmIf+FPvYjV0F7ru/RfDguGE= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 13:39:10.0868 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 04a6663f-4e65-4b8a-dbd0-08db5c5c4111 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: AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB5961 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: TyjPorTPkwYphJ0mmberEEffx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684935561; bh=DgWa+RnQYsoQoZqHM1bN7y48Aplf4U24oDlzwq/HREw=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=d6z0lmfT36700F63dZv/GdvM67qscTS8rHWMCg/qTYpucsiyiPnYvyDSoMLYB9i/A14 Dzf6cRHigwesuSx6ofGlYdvEq4hQ22I14hrn6c3eWFCOJUjTDFGbxFyLHKA8EWDTMLelC fvBRuDKBLa6KtOeeuIcn0MmDUn7LbC7yW5A= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684935563642100003 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" According to the GIC architecture version 3 and 4 specification, the maximum number of INTID bits supported in the CPU interface is 24. Considering this the RegShift variable is not required to be more than 8 bits. Therefore, make the RegShift variable type to UINT8. Also add necessary typecasts when calculating the RegOffset and RegShift values. Signed-off-by: Sami Mujawar --- Notes: v2: - updated copyright year [Sami] ArmPkg/Drivers/ArmGic/ArmGicLib.c | 24 ++++++++++---------- ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c | 6 ++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmG= icLib.c index 0127cca3bf0567bc80702f415e9cbb9bd2709fbc..8f3315d76f6f2b28a551d734009= 38430ff3e23c7 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c @@ -228,13 +228,13 @@ ArmGicSetInterruptPriority ( ) { UINT32 RegOffset; - UINTN RegShift; + UINT8 RegShift; ARM_GIC_ARCH_REVISION Revision; UINTN GicCpuRedistributorBase; =20 // Calculate register offset and bit position - RegOffset =3D Source / 4; - RegShift =3D (Source % 4) * 8; + RegOffset =3D (UINT32)(Source / 4); + RegShift =3D (UINT8)((Source % 4) * 8); =20 Revision =3D ArmGicGetSupportedArchRevision (); if ((Revision =3D=3D ARM_GIC_ARCH_REVISION_2) || @@ -272,13 +272,13 @@ ArmGicEnableInterrupt ( ) { UINT32 RegOffset; - UINTN RegShift; + UINT8 RegShift; ARM_GIC_ARCH_REVISION Revision; UINTN GicCpuRedistributorBase; =20 // Calculate enable register offset and bit position - RegOffset =3D Source / 32; - RegShift =3D Source % 32; + RegOffset =3D (UINT32)(Source / 32); + RegShift =3D (UINT8)(Source % 32); =20 Revision =3D ArmGicGetSupportedArchRevision (); if ((Revision =3D=3D ARM_GIC_ARCH_REVISION_2) || @@ -317,13 +317,13 @@ ArmGicDisableInterrupt ( ) { UINT32 RegOffset; - UINTN RegShift; + UINT8 RegShift; ARM_GIC_ARCH_REVISION Revision; UINTN GicCpuRedistributorBase; =20 // Calculate enable register offset and bit position - RegOffset =3D Source / 32; - RegShift =3D Source % 32; + RegOffset =3D (UINT32)(Source / 32); + RegShift =3D (UINT8)(Source % 32); =20 Revision =3D ArmGicGetSupportedArchRevision (); if ((Revision =3D=3D ARM_GIC_ARCH_REVISION_2) || @@ -361,14 +361,14 @@ ArmGicIsInterruptEnabled ( ) { UINT32 RegOffset; - UINTN RegShift; + UINT8 RegShift; ARM_GIC_ARCH_REVISION Revision; UINTN GicCpuRedistributorBase; UINT32 Interrupts; =20 // Calculate enable register offset and bit position - RegOffset =3D Source / 32; - RegShift =3D Source % 32; + RegOffset =3D (UINT32)(Source / 32); + RegShift =3D (UINT8)(Source % 32); =20 Revision =3D ArmGicGetSupportedArchRevision (); if ((Revision =3D=3D ARM_GIC_ARCH_REVISION_2) || diff --git a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c b/ArmPkg/Drivers/Arm= Gic/GicV2/ArmGicV2Dxe.c index cd371cab2a0159b54d8e6f0f5d3930e1276cbf7e..6300a2a54b194cb8c874a4e7db9= 051b9732d8be2 100644 --- a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c +++ b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c @@ -393,7 +393,7 @@ GicV2DxeInitialize ( EFI_STATUS Status; UINTN Index; UINT32 RegOffset; - UINTN RegShift; + UINT8 RegShift; UINT32 CpuTarget; =20 // Make sure the Interrupt Controller Protocol is not already installed = in @@ -411,8 +411,8 @@ GicV2DxeInitialize ( GicV2DisableInterruptSource (&gHardwareInterruptV2Protocol, Index); =20 // Set Priority - RegOffset =3D Index / 4; - RegShift =3D (Index % 4) * 8; + RegOffset =3D (UINT32)(Index / 4); + RegShift =3D (UINT8)((Index % 4) * 8); MmioAndThenOr32 ( mGicDistributorBase + ARM_GIC_ICDIPR + (4 * RegOffset), ~(0xff << RegShift), --=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 (#105249): https://edk2.groups.io/g/devel/message/105249 Mute This Topic: https://groups.io/mt/99108693/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- From nobody Sat Dec 21 12:59:48 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+105248+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 1684935556947847.1126730482441; Wed, 24 May 2023 06:39:16 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id H2WuYY1788612xyRPSdw3iox; Wed, 24 May 2023 06:39:16 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.73]) by mx.groups.io with SMTP id smtpd.web10.9084.1684935555556756397 for ; Wed, 24 May 2023 06:39:15 -0700 X-Received: from DU2PR04CA0037.eurprd04.prod.outlook.com (2603:10a6:10:234::12) by PAVPR08MB10339.eurprd08.prod.outlook.com (2603:10a6:102:30c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Wed, 24 May 2023 13:39:11 +0000 X-Received: from DBAEUR03FT021.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:234:cafe::43) by DU2PR04CA0037.outlook.office365.com (2603:10a6:10:234::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:39:11 +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+105248+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 DBAEUR03FT021.mail.protection.outlook.com (100.127.142.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:39:11 +0000 X-Received: ("Tessian outbound 945aec65ec65:v136"); Wed, 24 May 2023 13:39:10 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 615fbd475068209d X-CR-MTA-TID: 64aa7808 X-Received: from 52c52a9ee9eb.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B4077154-A46E-4034-B984-F8BF73A55808.1; Wed, 24 May 2023 13:38:58 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 52c52a9ee9eb.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 May 2023 13:38:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fvYvYCkLGTy3l3Y7Z7gahePeamMuRm9QA2c6pgZw5Ln5GJNe1SHDDZUadvevPOepvlAkvbI9VhM/tlLJdwyehsIeqh6CrOSgWFfR93gRiIZrqkq1cksScXqRqQzWi+VQzO9T51urQOrfWDYTBOWv9x5CjOyUXJT779Ax/YW/RtfaZLIupbDoPlbJf4Ox+UeJvcHAm6n1Qf3t43Bz37JxVZLxsmz+Nk1fxSX6Eidqa3VtJO8etUaHbGPhSnb8S8UVpIrWFQ9FrelYqUCrEaU+4vGVPUQFf48e7ZzxTcEGw1TDCY9OlSOYp4TQ48bb85EBs3+476ns529Po+levDHdAg== 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=3Vene/6hxr3I8YpVLItf60BqV5Y3VtR6Uu3E89ljt2Q=; b=l2gWhUALpDiQKGZofmYRmANg8AGaIw9Se16btEFAkr/oqw/A5g11BadKAn4zloDS8LmJbO35JvspHY1SPNRUcxkDbGX5zpW8+Qw76JOW7gpTjxojejCtjtDmRXRqO0MUjGp1mmkcFPFc/NVTBpbfYqftvAU0TL5RxEpeB6gN86ShsWEnSvv3ZVc5xMpWWuH5ZkLbTaXcst2cUgKOT8h5Ia1hHXjK6KQsye1JBvNE+Tvefy8Vr7KCv0REROnD+RCN8Cdl7uvLQRNJh1KmptJDJjhw0P6DoGVhqLYK3b+pLXy2CRbYVDMcCw/jd+Z18+1u5MAgTIfYFxM9Y1szeW8rqw== 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 DU2PR04CA0246.eurprd04.prod.outlook.com (2603:10a6:10:28e::11) by AS8PR08MB6055.eurprd08.prod.outlook.com (2603:10a6:20b:293::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Wed, 24 May 2023 13:38:56 +0000 X-Received: from DBAEUR03FT044.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:28e:cafe::2c) by DU2PR04CA0246.outlook.office365.com (2603:10a6:10:28e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:56 +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 DBAEUR03FT044.mail.protection.outlook.com (100.127.142.189) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 13:38:56 +0000 X-Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 24 May 2023 13:38:46 +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; Wed, 24 May 2023 13:38:46 +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; Wed, 24 May 2023 13:38:46 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v2 11/11] ArmPkg: Fix ArmGicAcknowledgeInterrupt () for GICv3 Date: Wed, 24 May 2023 14:38:40 +0100 Message-ID: <20230524133840.28612-12-sami.mujawar@arm.com> In-Reply-To: <20230524133840.28612-1-sami.mujawar@arm.com> References: <20230524133840.28612-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT044:EE_|AS8PR08MB6055:EE_|DBAEUR03FT021:EE_|PAVPR08MB10339:EE_ X-MS-Office365-Filtering-Correlation-Id: 0fab2df8-1cdc-44a8-acb1-08db5c5c419a 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: Fk3PG/tM1sqcvgg9gX0hzo2ESadcM7YQSOSG6/evIJ9PiGvvp31afZDDZu8p84mfwXthUshFzI1QRDcICsFqLWhdM3ZgoblxQIhrTvAhr963q3I/T7eX/tzIt9UhNOOOF8caVoxSRr5GKdjY7y9Eb6gB+K2aOZF6+hjFJ7W/wV+GfsiD4/esibGeUnpJaiY0squaH2+fjvKHZBYTZlC8PjrXpm/DrUkmPoitVj5kLvFd22qXJuThfehPYMQ1pJWHvVvPGJf6RWgWMB4jEp6Wpi0LFgpLMcgVfSnUgX4zt4ju+3EDZgOW8L3RA5DUpsEiSWJonwRs+hQBzq2EVTBTotGVU/I5iVLncxIQK1RzQhczOSwcyFgwWU4u9Nj7iA4s+14YbFepaPFZI72du94b9haL/aJhicm2iThqvdtcyFMmL20pQHyl404Qo8cZtduW5QiedPpkG92Jt7tU5V0a1nnhTLYh4Xb6kl8c6uCAn2nDm1UgINPzsF5WP0/LshWEmYO57F/vPdsRR0LAOSetGsr77SeuyaZj4PK1hnKg6DPovnsWn/bm/s84IoguospmoyRszC0bF+O9Bknyw7/OZGCtpHJLjY099/k3/zvUnq48K7/IbYptu+uDXHKK5XpTY8DndwzcTyBlSH+G/PKXkbl5kLPYAlHtrdtVyxEvY4Ll7UIXn4rtLI469Cj5WNDParMMXj7V102YbfPONwZmgUpSmOGa1QwGTFRd1quplcFs0dQmz31u4Bc7CJCc/1w0 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)(376002)(136003)(346002)(396003)(39860400002)(451199021)(36840700001)(46966006)(47076005)(83380400001)(82740400003)(6916009)(4326008)(81166007)(356005)(70206006)(70586007)(2906002)(41300700001)(44832011)(8936002)(8676002)(5660300002)(316002)(36860700001)(40480700001)(86362001)(36756003)(2616005)(54906003)(6666004)(26005)(7696005)(1076003)(186003)(82310400005)(478600001)(19627235002)(336012)(426003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6055 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT021.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 22a8f227-2755-46bd-14a1-08db5c5c38ff X-Microsoft-Antispam-Message-Info: G5EvQafFFWhepMNAwTHiiOEMkEQQ7LQ43qaA8NgZyhwfxI9Y7YsL0Hhk6v/wWcqgkIWFi5FQBHUaAn6gQeFbjZt2ZsdFAN/gPZETpb8izk4cEj+hv2sJSQ+Qgve7sgC5hbGCXSiLZDq8XgV4OJ3pDF7jNRY1dTwu9UC1FjqJsqpDeBtAMVn1KKJvn/F5Ja5TFimp7ZTNGV9Jt8WF8EBkLjD79Jtw61L9FmnXV9iwf4M9RmPWfKtoU+KwfcGQ150uAUvVjSjQ2vcC2a8BHtAFbUvV1yUxvGbZ4XFj3j7vOaz39xUff7IUVfOyZuaeSY2UMSyTk3FsL5kvyyyWRehbnb0jick0aO27QmrEgahlva2Rm5uEYTO/8+J1i3eDaoJpaFDNxhFz3pKAOVSlVlh+Xpu2QZj3yNnwg8o0jCAH0rxro/d+zAebywdhkPBqrePLnEGkR2MfKxxhaLF5TuiMdRU5VxKRDqaQldvS6datp2HJpEyKRBXpD7g7o1UN6/sFnZrCJe8FUPRnAySFAtyMjFDWJ0+j8BQohgllyTvhwjOUV5XI86thkQKWZYyJZjxCR2gy+QymG6AXnqMLbicbiUIRBs1w5hZfD7xbBucOHQudtMBxRveAlsKBFui7oUYGgYlmUV9/J02qaCorzif8GK+lLNmrxZtRNwbgoVVv7960Qf7u7uSOq8qdd0RvShK1dtl5363jdQ7FzPw8PxAEP4DgF18qB8mifpE6tB7EiKEsVZuaPUcBOTFWNIRInuOe X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 13:39:11.0147 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0fab2df8-1cdc-44a8-acb1-08db5c5c419a 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: DBAEUR03FT021.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB10339 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: qd8wNmX6IFSUH2E8ScRpj5yJx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684935556; bh=U/huMcRXxUOVnahRhwASvJvJ2aKGhyircKrCXk564pI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Lg4DjwLXu6Cl58G5US6uYwCUqsahMrHsv/m6oKkaYX91mpUGzVJoi486eMDAi2kTxds 562AxFjbt4bjfYBccWwEWh1amnMCGdm/mBxFdJbxqYuSwdeAWehax3BWCpZbZYdnvgmGJ XOsXmceyD18LHnRwJKysLsmqMOkafnbfMME= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684935557553100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The ArmGicAcknowledgeInterrupt () returns the value returned by the Interrupt Acknowledge Register and the InterruptID separately in an out parameter. The function documents the following: 'InterruptId is returned separately from the register value because in the GICv2 the register value contains the CpuId and InterruptId while in the GICv3 the register value is only the InterruptId.' This function skips setting the InterruptId in the out parameter for GICv3. Although the return value from the function is the InterruptId for GICv3, this breaks the function usage model as the caller expects the InterruptId in the out parameter for the function. e.g. The caller may end up using the InterruptID which could potentially be an uninitialised variable value. Therefore, set the InterruptID in the function out parameter for GICv3 as well. Signed-off-by: Sami Mujawar Reviewed-by: Ard Biesheuvel --- Notes: v2: - No updates since v1 series [Sami] ArmPkg/Drivers/ArmGic/ArmGicLib.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmG= icLib.c index 8f3315d76f6f2b28a551d73400938430ff3e23c7..7f4bb248fc7225bf63f0aea7204= 86092b30ced10 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c @@ -176,19 +176,17 @@ ArmGicAcknowledgeInterrupt ( ) { UINTN Value; + UINTN IntId; ARM_GIC_ARCH_REVISION Revision; =20 + ASSERT (InterruptId !=3D NULL); Revision =3D ArmGicGetSupportedArchRevision (); if (Revision =3D=3D ARM_GIC_ARCH_REVISION_2) { Value =3D ArmGicV2AcknowledgeInterrupt (GicInterruptInterfaceBase); - // InterruptId is required for the caller to know if a valid or spurio= us - // interrupt has been read - ASSERT (InterruptId !=3D NULL); - if (InterruptId !=3D NULL) { - *InterruptId =3D Value & ARM_GIC_ICCIAR_ACKINTID; - } + IntId =3D Value & ARM_GIC_ICCIAR_ACKINTID; } else if (Revision =3D=3D ARM_GIC_ARCH_REVISION_3) { Value =3D ArmGicV3AcknowledgeInterrupt (); + IntId =3D Value; } else { ASSERT_EFI_ERROR (EFI_UNSUPPORTED); // Report Spurious interrupt which is what the above controllers would @@ -196,6 +194,12 @@ ArmGicAcknowledgeInterrupt ( Value =3D 1023; } =20 + if (InterruptId !=3D NULL) { + // InterruptId is required for the caller to know if a valid or spurio= us + // interrupt has been read + *InterruptId =3D IntId; + } + return Value; } =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 (#105248): https://edk2.groups.io/g/devel/message/105248 Mute This Topic: https://groups.io/mt/99108687/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-