From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=NOItqcqi; spf=pass (domain: arm.com, ip: 40.107.8.89, 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=vJ//nmb++wWxqJyExDf1Skexr5Y5KCQxckRMBc9qhCA=; b=NOItqcqiD0rBG7iW18h+XBVDL6OmmECLo0uSxsvgop2FPc/15DFABZn/NIf0RsPEWfMLXjTRzA5oMsorVDm31RKqurcmMyXzrcLcoSTJNuOyO+TkfWIkt4NRVzmNCuRMHFCWZGJXRIMjvkPAIxxHDXiXrZiaZjuw5WhluONMYnM= 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 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 (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 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 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 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 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 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=vJ//nmb++wWxqJyExDf1Skexr5Y5KCQxckRMBc9qhCA=; b=NOItqcqiD0rBG7iW18h+XBVDL6OmmECLo0uSxsvgop2FPc/15DFABZn/NIf0RsPEWfMLXjTRzA5oMsorVDm31RKqurcmMyXzrcLcoSTJNuOyO+TkfWIkt4NRVzmNCuRMHFCWZGJXRIMjvkPAIxxHDXiXrZiaZjuw5WhluONMYnM= 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 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 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 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 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: [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> 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: 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 Return-Path: Sami.Mujawar@arm.com 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: BCL:0; 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-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)(136003)(376002)(346002)(396003)(451199021)(36840700001)(40470700004)(46966006)(40460700003)(26005)(82740400003)(1076003)(81166007)(186003)(44832011)(2616005)(36860700001)(47076005)(36756003)(83380400001)(336012)(426003)(2906002)(40480700001)(82310400005)(316002)(6666004)(70586007)(86362001)(70206006)(6916009)(4326008)(41300700001)(7696005)(19627235002)(478600001)(966005)(54906003)(8676002)(8936002)(5660300002);DIR:OUT;SFP:1101; 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 Content-Type: text/plain 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 <= 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/ArmGic/ArmGicCommonDxe.c index d560c42fc9f3d5e86c2aece504102f43cb841877..8461fb7927eaf97c75135205f444d33c205910db 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2013-2017, ARM Ltd. All rights reserved.
+Copyright (c) 2013-2023, Arm Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -61,7 +61,7 @@ GicGetDistributorIcfgBaseAndBit ( RegIndex = Source / ARM_GIC_ICDICFR_F_STRIDE; // NOTE: truncation is significant Field = Source % ARM_GIC_ICDICFR_F_STRIDE; - *RegAddress = PcdGet64 (PcdGicDistributorBase) + *RegAddress = (UINTN)PcdGet64 (PcdGicDistributorBase) + ARM_GIC_ICDICFR + (ARM_GIC_ICDICFR_BYTES * RegIndex); *Config1Bit = ((Field * ARM_GIC_ICDICFR_F_WIDTH) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmGicLib.c index dd3670c7ccbb18586bb28f4ac02514055471529f..e26035a90201a7cd3025537d9351cc30019090b6 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/ArmGic/ArmGicNonSecLib.c index aa4f0e2123929e0a86626b0f068d474065ca67fb..38bbf2e9f81527b2545a0116120ceee56af17808 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/ArmGic/GicV2/ArmGicV2Dxe.c index 25290342bde4de907bef050d6f1bdd6e03f8dccc..1c2061181e83bcf3f91d7bd13056f0413e212c37 100644 --- a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c +++ b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c @@ -2,7 +2,7 @@ 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.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -400,8 +400,10 @@ GicV2DxeInitialize ( // the system. ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gHardwareInterruptProtocolGuid); + ASSERT (PcdGet64 (PcdGicDistributorBase) <= MAX_UINTN); + mGicInterruptInterfaceBase = PcdGet64 (PcdGicInterruptInterfaceBase); - mGicDistributorBase = PcdGet64 (PcdGicDistributorBase); + mGicDistributorBase = (UINTN)PcdGet64 (PcdGicDistributorBase); mGicNumInterrupts = ArmGicGetMaxNumInterrupts (mGicDistributorBase); for (Index = 0; Index < mGicNumInterrupts; Index++) { diff --git a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c b/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c index b1f0cd48c752666e8b01eb5a25f8639e49213119..719701a67e756c2d2aeae8fc23d50b519a1997aa 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); - mGicDistributorBase = PcdGet64 (PcdGicDistributorBase); + mGicDistributorBase = (UINTN)PcdGet64 (PcdGicDistributorBase); mGicRedistributorsBase = PcdGet64 (PcdGicRedistributorsBase); mGicNumInterrupts = ArmGicGetMaxNumInterrupts (mGicDistributorBase); diff --git a/ArmPkg/Include/Library/ArmGicLib.h b/ArmPkg/Include/Library/ArmGicLib.h index 4ab670967598f21852e46f72116bf4c78ca7dd44..928d1541d9d6bd603ea687a7814fb31c35e14a8d 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 ); @@ -148,28 +148,28 @@ ArmGicDisableInterruptInterface ( VOID EFIAPI ArmGicEnableDistributor ( - IN INTN GicDistributorBase + IN UINTN GicDistributorBase ); VOID EFIAPI ArmGicDisableDistributor ( - IN INTN GicDistributorBase + IN UINTN GicDistributorBase ); UINTN EFIAPI ArmGicGetMaxNumInterrupts ( - IN INTN GicDistributorBase + IN UINTN GicDistributorBase ); 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 ); /* @@ -251,7 +251,7 @@ VOID EFIAPI ArmGicV2SetupNonSecure ( IN UINTN MpId, - IN INTN GicDistributorBase, + IN UINTN GicDistributorBase, IN INTN GicInterruptInterfaceBase ); -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'