From nobody Thu Oct 31 00:20:37 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+105175+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 1684847085095148.8104831567831; Tue, 23 May 2023 06:04:45 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id HrW7YY1788612xVQVkX9li2N; Tue, 23 May 2023 06:04:44 -0700 X-Received: from EUR02-DB5-obe.outbound.protection.outlook.com (EUR02-DB5-obe.outbound.protection.outlook.com [40.107.249.75]) by mx.groups.io with SMTP id smtpd.web10.21860.1684847082980447896 for ; Tue, 23 May 2023 06:04:43 -0700 X-Received: from DB6P193CA0013.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::23) by DB9PR08MB9513.eurprd08.prod.outlook.com (2603:10a6:10:459::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.27; Tue, 23 May 2023 13:04:39 +0000 X-Received: from DBAEUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:29:cafe::65) by DB6P193CA0013.outlook.office365.com (2603:10a6:6:29::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29 via Frontend Transport; Tue, 23 May 2023 13:04:39 +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+105175+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 DBAEUR03FT052.mail.protection.outlook.com (100.127.142.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Tue, 23 May 2023 13:04:39 +0000 X-Received: ("Tessian outbound 945aec65ec65:v136"); Tue, 23 May 2023 13:04:39 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 87bb84191ec39206 X-CR-MTA-TID: 64aa7808 X-Received: from a5850309d05c.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 790E4DF1-D4DB-40A4-B019-41A2734E19F6.1; Tue, 23 May 2023 13:04:32 +0000 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a5850309d05c.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 23 May 2023 13:04:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HCb5s/NqszrECCk8werhkQGZ/0nTrTKiWLfGUuWf3kaIjL9QROxLeUADdgScHyeuCpbmj97WKjSQ61LmoDtTc5+6mDuadE5lZvtpaZRZVvAUpK1vog3vFgyz5VGv3MZZB8HlOqooUo+HY4cx+LwOtsVvacQSR5pc4UH6C7G7Fwn+djZmNxVaC7ybYhrg3NBGMNePMr5wK/togrcAC36qnXPoMUWZV/lAnvavsjopt+A16OtHG6/xvVRgirOnK/zVgtEyJB5hdkRWryoailG7XThtHIn7hVbESfXlkd3l6EK6zjkfp0eEn7Fuop/gRY1/6WJ8yOSWj0+nlD05df8KSQ== 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=VnA6AubNH+7I8+qU74679VkeHGelrV09BV5TqKT2/TQ=; b=b8CVvqc6Yfx6wfNlnf4X7lKTADWj2ysa0Gu4LENlziumfAE5z1oLbGk+j/Pe1EWLPw+tkCwkpEkVrcYHPucGqz+1usFpq5m+SUZPldTaljd3CRYCxJhwuKu5YcgtqtjIU5jh4nQjptXL0hyi7K9zqg0laa1uy3Gg6Q2fqaDOBCiSb8w0YkxvtisEwVaJHRIMpa2qx/6ruK7+A49wJCZXLim0gHdm+PtwcoEQXmsip5f6c2PhzEYeZ9O6uhgcZQwrDOFkWNohHdijFZ7M3EwL0q0Nb/mbX05aTUgANkL3GocBppfAFm1N0xfzf7mHg7+YWKcvb7tF5pKUYEewL7SDLw== 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 AM6PR10CA0015.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:89::28) by DB9PR08MB6731.eurprd08.prod.outlook.com (2603:10a6:10:2a4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Tue, 23 May 2023 13:04:31 +0000 X-Received: from AM7EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:89:cafe::88) by AM6PR10CA0015.outlook.office365.com (2603:10a6:209:89::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29 via Frontend Transport; Tue, 23 May 2023 13:04:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C X-Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT059.mail.protection.outlook.com (100.127.140.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6433.14 via Frontend Transport; Tue, 23 May 2023 13:04:30 +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; Tue, 23 May 2023 13:04:27 +0000 X-Received: from E114225.Arm.com (10.1.196.36) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Tue, 23 May 2023 13:04:27 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , Subject: [edk2-devel] [PATCH v1 08/12] ArmPkg: Typecast IntID to UINT32 in ArmGicV2EndOfInterrupt Date: Tue, 23 May 2023 14:04:17 +0100 Message-ID: <20230523130421.10804-9-sami.mujawar@arm.com> In-Reply-To: <20230523130421.10804-1-sami.mujawar@arm.com> References: <20230523130421.10804-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT059:EE_|DB9PR08MB6731:EE_|DBAEUR03FT052:EE_|DB9PR08MB9513:EE_ X-MS-Office365-Filtering-Correlation-Id: 8be44f49-968e-42f3-1d60-08db5b8e446a 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: 71vj8LtK0VFyVDGBvXWILmZMqfU7lfvcihrVdqRo4pFRCy4NQ4B1+Hk2Ygn3iP4/sG7KfwaKjgH0TLtWQymuIRx3gi203GtFcq8M9opFWAt/Xs0mhXZsj6OMgtI4wgiHVaVPsg1Ddcq1eHk9U+pnRjVnByyT0gwLAw5wiAJvWLzDvXoA5VzZ54oFNETE7LeXDJEfLTM9XwwvtrFeWz70yqVGA20I39A1k3L1s51OoWN2L8gs/W+WzB87t0rSJysK9WZC5XkxCG4vtj/m+KlKcQWzBw5rwVIp7nmxAgE1hbAb1BJqqvACOd+cyDuih5Ikcc0pcv0htP4Bhi2n7HmIlW1F2CNsVkAYqFYFMwuQzqqOXOzvrnhUlnwXI+O4TUeDUzDiPyk2l+zPaRTbWp6nofBF+B9Ijr00ORoj65DrV58NEEtogqQS6eGo5NS0ZsC3LtvcpUEapaULGhwPEDaOodZbnw/zWwqnLvamUvuRO68wZiNt8zQCkJgko5cs9uLaOhxJshg2a6MmlVr8DxNJuCpuCCYatM3SMS0doYF31jhFrmVS+OYVARK0b3V2+NbolR09mkpSj/+iC7WUE99K/447T8e/ZFs/w+5ihVIEKNtPD3ZoCLIcJTVraOEneLn6oDzJXuWU9KXUuqtMHk6J5dR54uEI/DKjzLmBUEoQGhIb76P+O2K+BD5F9oqI4uwJHkuYbEZm4xTm3GNoXv5arbZWzb7x9frhGzI6nDNhFVlKQVZBFbp1+DWRYJnAXXYHWmfe9FOZ8YCtEZTqdQoETA== 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)(376002)(346002)(396003)(136003)(39860400002)(451199021)(40470700004)(46966006)(36840700001)(54906003)(86362001)(41300700001)(7696005)(82310400005)(478600001)(19627235002)(316002)(4326008)(6916009)(6666004)(70586007)(70206006)(5660300002)(8936002)(8676002)(44832011)(81166007)(356005)(40460700003)(82740400003)(26005)(186003)(1076003)(426003)(336012)(83380400001)(40480700001)(2906002)(2616005)(36756003)(36860700001)(47076005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6731 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT052.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2fa72022-15e2-4310-40b7-08db5b8e3f63 X-Microsoft-Antispam-Message-Info: GodPtOxaUVPaupuA43mHDxjzVZXU3iJ0yIE5z1fDGWPaO0ayd0hhdxar7nxTzX3F6UjOW94YLzzAtvQnivW+foWIcZnyLCPP4hh2eAxN2TG3pd2emonoLxebcynGjFP56PyJbikJPBSsn01UXrxqQOZGnbWRjF/BX3EQs6fwX5xgxPeKA16QWf/STY523ylhurTb2YTcCiEB3tDSRpATaDMZFU3rx3V1mTbeaWZwqJsw0cYnDADjjNWwKIqs+xusz/zlawp5olRV0gpPIJU9bIN6OT50rU+o54NoUxg9Z4uSAYJ5ivaYWBYAgbEDkOgRmGEFmdbuEa8vWC13jdOtxy0GfjYYGqTCb+DXZVC6euABaLaYjjZkPgFPMlNz9QrWoGXCs8iE8dHpQSZswlFAcEecSLP2GqgYncnCgr2n4m/7lzzkzd425TZTwzkQhSAmxHXfPZMCn/bgKC+/C8XWTMSEHBABwMjKb/2UkAYKRWSK1G0kDt6+JPmH+EOU9qGCo21CJZJI0gJFhwe71WQkDVp5fiHrHbBOEZ36zd6C+svpa2Nqhg0PZmXaPAUaYZ/CyjQ1BgoCrtxK0ywYI4AHNAhmiatKlqMmhW7qAjwxiHs7qf8C9TN/8FDbJDCcpOKTEQ/OXsyG6wrucRiXpk7eZRJL8qGZd1wKE1EvEtl6tZ86ewxjxnbMouiKHGePBR7UKVDwbOMqaOVbnz9nlvDwcE6mBNLpSACU6XPBP4JPugisn7lg0wT0QFx08SN06D5L X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 13:04:39.4033 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8be44f49-968e-42f3-1d60-08db5b8e446a 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: DBAEUR03FT052.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB9513 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: UcWdLjF5tOb3tcAtKxmSJX4ox1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684847084; bh=DHOexlWAluX0SeryU/hdipc68k+dIGN2ke8Q+v1wbzs=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=MdzJm/M38k1budQzSsTowwEbqznbvoBvUQ0B0IvAn0bzkuRWEyWNC+0gNNN1w9WNEiy riN1vmr6JOSd+k97cSgOuRz7WhX5r/guNY2rPNYGAccefKyUe+kweTJLlZPR/NfQ3WDxY PUu86HmJ15O0gRmtI0BWQfcP9KYIjVjFR+g= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684847086012100002 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 --- ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Lib.c b/ArmPkg/Drivers/Arm= Gic/GicV2/ArmGicV2Lib.c index 80115b243afabd5e4faad88089af738b19ce4cd1..e98cd9705616e7a8dfc7aaba7c8= 0b176f8f6d0c9 100644 --- a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Lib.c +++ b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Lib.c @@ -7,6 +7,7 @@ **/ =20 #include +#include #include =20 UINTN @@ -26,5 +27,6 @@ ArmGicV2EndOfInterrupt ( IN UINTN Source ) { - MmioWrite32 (GicInterruptInterfaceBase + ARM_GIC_ICCEIOR, Source); + ASSERT (Source < 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 (#105175): https://edk2.groups.io/g/devel/message/105175 Mute This Topic: https://groups.io/mt/99086450/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-