From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=yFORjg24; spf=pass (domain: arm.com, ip: 40.107.247.58, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/J2wa26Xp/Fpot5jWcIWu7w5aHVVQnkWuLrRjaXDT4I=; b=yFORjg24txLCS95adJnN/zpuuefsNHoQ6/ncvrh6A/ukYTHCXUuhRG9UIIWiVNcQiRJCrovMF0hYThnhPhadWh3Ey+3HOWhi1IssKakukwTQiTIUr1pXHS8oOTCH8C9j3Hno1HHry0tjapQHQGTP1OD6T1EQzE830XXbAEayHyU= 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 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 (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 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 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 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 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/J2wa26Xp/Fpot5jWcIWu7w5aHVVQnkWuLrRjaXDT4I=; b=yFORjg24txLCS95adJnN/zpuuefsNHoQ6/ncvrh6A/ukYTHCXUuhRG9UIIWiVNcQiRJCrovMF0hYThnhPhadWh3Ey+3HOWhi1IssKakukwTQiTIUr1pXHS8oOTCH8C9j3Hno1HHry0tjapQHQGTP1OD6T1EQzE830XXbAEayHyU= 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 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 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 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 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: [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> X-Mailer: git-send-email 2.16.2.windows.1 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 Return-Path: Sami.Mujawar@arm.com 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: BCL:0; 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-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(346002)(136003)(376002)(396003)(451199021)(40470700004)(36840700001)(46966006)(8936002)(40480700001)(8676002)(5660300002)(40460700003)(26005)(186003)(41300700001)(44832011)(36860700001)(83380400001)(19627235002)(82740400003)(82310400005)(54906003)(81166007)(478600001)(86362001)(70586007)(70206006)(316002)(1076003)(6916009)(4326008)(7696005)(2616005)(6666004)(36756003)(2906002)(47076005)(336012)(426003);DIR:OUT;SFP:1101; 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 Content-Type: text/plain 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/ArmGic/GicV2/ArmGicV2Dxe.c index a1670021c30f05707d7c37a789fdbacc4ffa9140..cd371cab2a0159b54d8e6f0f5d3930e1276cbf7e 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; GicInterrupt = ArmGicV2AcknowledgeInterrupt (mGicInterruptInterfaceBase); @@ -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)GicInterrupt)); GicV2EndOfInterrupt (&gHardwareInterruptV2Protocol, GicInterrupt); } } @@ -349,8 +349,8 @@ GicV2ExitBootServicesEvent ( IN VOID *Context ) { - UINTN Index; - UINT32 GicInterrupt; + UINTN Index; + UINTN GicInterrupt; // Disable all the interrupts for (Index = 0; Index < mGicNumInterrupts; Index++) { diff --git a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c b/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c index 719701a67e756c2d2aeae8fc23d50b519a1997aa..41aec70481e05594628fe01cf9ad5626e4ddbf9b 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; GicInterrupt = 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)GicInterrupt)); GicV3EndOfInterrupt (&gHardwareInterruptV3Protocol, GicInterrupt); } } -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'