From nobody Mon Feb 9 23:03:35 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57326+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=nxp.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1586866549231647.6810787887526; Tue, 14 Apr 2020 05:15:49 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 4cYAYY1788612x7A9Y6r8H7F; Tue, 14 Apr 2020 05:15:48 -0700 X-Received: from EUR03-VE1-obe.outbound.protection.outlook.com (EUR03-VE1-obe.outbound.protection.outlook.com [40.107.5.69]) by mx.groups.io with SMTP id smtpd.web10.9613.1586866548244862584 for ; Tue, 14 Apr 2020 05:15:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D3ZblCh28JjyUQ/q/DborJ5+0p/6UgNZywBJU0wUxqZ/sVVkEMQPGxpXdhhNEumTbvrdtnS7gu9xCLwGN41vGlXXDVbVQAxR0/iug4FqBG8XPZmFuJVtn6Ecw4utrxFvkwmgdYcLAMt2tcvjZj5uSqvBKLD8ZlkWnGDuGquG8/dVzJSN8fF+ETBfYbu15rg431zz0GgMsHSd/yKcYhp7LaV4srtBIim5N7ncP+uJQF3rmcd267XCy0KRi/JSTcVphKzHvSwaAhkpucsmUy2shSThAgsEBrAzPdEU597ty67p/gV9iOK1BfHwjVGR7Ivi5gqbJWFkdeDjHavjkI25lQ== 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-SenderADCheck; bh=5WCAvKUT6KrxoJGvin1UK+AWhx7aNVeTCeCuoSfhPVc=; b=XtY0KQUufVOp42VhHPXiDsXsW07gNiKCOsS+WGi9qFcUCWu1gjQ7GgQQeu8YAPrQpkycJ/TrVdylq7ZnLu/LCEKHRhecBB+c23Qiw3gsDtqyYG1M9PUfUWExclaEGMeiIaFFswcWRKwaWbUhR3IC1R2JIFuC4vjCBBAIMFV0DbZ/Yp9jCjcHWEbWgTokQI4CgyQ1bXEf4s7Hm1IY39w5T1Ac/Exk2NdcS8TLhZs2M6OCpPMzulKdzO0z9J9ISNT+OuOpVKGamEjMOTf4nMWxpWo8PiuEdm6CB47EADmRRhiL/no6QAqWsVVyERZzO01weJh3IIonjNRYkLgOcv4rFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none X-Received: from VI1PR04MB5933.eurprd04.prod.outlook.com (2603:10a6:803:ec::16) by VI1PR04MB4461.eurprd04.prod.outlook.com (2603:10a6:803:70::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.28; Tue, 14 Apr 2020 12:15:46 +0000 X-Received: from VI1PR04MB5933.eurprd04.prod.outlook.com ([fe80::45c4:8846:5327:9513]) by VI1PR04MB5933.eurprd04.prod.outlook.com ([fe80::45c4:8846:5327:9513%7]) with mapi id 15.20.2900.028; Tue, 14 Apr 2020 12:15:46 +0000 From: "Pankaj Bansal" To: Leif Lindholm , Meenakshi Aggarwal , Michael D Kinney , devel@edk2.groups.io, Varun Sethi , Samer El-Haj-Mahmoud , Jon Nettleton , Ard Biesheuvel Subject: [edk2-devel] [PATCH edk2-platforms v3 20/24] NXP: LS1043aRdbPkg: Use ArmPlatformHelper.S from ArmPlatformPkg Date: Wed, 15 Apr 2020 17:43:38 +0530 Message-ID: <20200415121342.9246-21-pankaj.bansal@oss.nxp.com> In-Reply-To: <20200415121342.9246-1-pankaj.bansal@oss.nxp.com> References: <20200415121342.9246-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0092.apcprd01.prod.exchangelabs.com (2603:1096:3:15::18) To VI1PR04MB5933.eurprd04.prod.outlook.com (2603:10a6:803:ec::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Received: from uefi-workstation.ap.freescale.net (92.120.0.69) by SG2PR01CA0092.apcprd01.prod.exchangelabs.com (2603:1096:3:15::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Tue, 14 Apr 2020 12:15:42 +0000 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e94d3d54-193e-46b0-b227-08d7e06d8f09 X-MS-TrafficTypeDiagnostic: VI1PR04MB4461:|VI1PR04MB4461: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:161; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57326+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: None (protection.outlook.com: oss.nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: tvNsrTJI3wLztkjkF+jGahJNa3EdapDcpXryxX1SpYl9jlN5UgDBA+liZwSV0a8LJpqMn7QV1iUe3GhnJeNZSbQ0+eOIrvui7MGHck/JXKm6gc5FRgpEgR7lZfNuvXLW8kutpz6SXWt9f1CAZ+Fcnc5tSlfrR+JFIwcUzJCDfWwSJnsutJXVIfZxGgDtfBc9837s0LaJz3ZLns5mdEfuXTBIJ37vVONxJcQOCF8Cvja4WT3Jzt4v9Ba1V8LcsxhVJFlKhRcDnJVbD8zR/gPPrXn5sORaklosDdVerASj87vaKkjbQKBba4dfIb+841FjJI7UVLK4UqomocPd7HVphiAnn6+3hbj8rP5abcnVV7nz+ZplZJcML5uDdx5f3PLhP9/u2HC0FKd9RHiuIfe9D598wGIzVuIxE07suEhX37QL+IvGFv4bS7eRnmsyADW/ X-MS-Exchange-AntiSpam-MessageData: dHyqsPKtxrkxWdCJTqtf8ArS6RbARirYSgr3k10RX4bHsZMJn/0GHo/9WCzevJZ3T/nmoBcF7viFTNndjrSJ/ikav8LXa0lz1EOBa8DgwDJr9ytPs7aLdXYQhM86eViKhpLr4JRGwQ0gZFiJlVsNjg== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e94d3d54-193e-46b0-b227-08d7e06d8f09 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2020 12:15:45.9684 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GZwKIN44zElxBX14a3eX7hOOq9azOfNQ2jyLMntClnsDE3rjGJ8TjbGTZfj66H/CCJ+gRHDdGyc7olsKD/fjGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4461 Precedence: Bulk List-Unsubscribe: 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,pankaj.bansal@nxp.com X-Gm-Message-State: tRAe8DfG2wBaB23SmldCfCsix1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1586866548; bh=PyCfIz5VvWDnMz67YIAEqibVs2wNVYwCls0ecIfKPZ4=; h=Content-Type:Date:From:Reply-To:Subject:To; b=v6CIhMbbSh7qYt9WPM/48Hnzw6TPVgKA9EXXN6Ljcj6htQxExD8yAYhgu1F5tQ/DuAu DFatavpzmDSLpdRI6gSvg5CDyn1XH3Uaxezat3YNLDUNGIMfx8IRG5CJ4rG5acA40JuMY fOjtj/vRFGO8GCUReWziBIPmFRA7vinWPdU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pankaj Bansal ArmPlatformHelper.S is being replaced by the ArmPlatformPkg version at commit hash f4dfad05dda2c7b29e8105605621f2b413f0af2b. Signed-off-by: Pankaj Bansal Reviewed-by: Leif Lindholm --- Notes: - Modify commit description Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.inf = | 2 + Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.c = | 8 --- Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelpe= r.S | 60 ++++++++++++-------- 3 files changed, 39 insertions(+), 31 deletions(-) diff --git a/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/ArmPlatformL= ib.inf b/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.i= nf index 07ca6b34445f..1faf99b99c54 100644 --- a/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.inf +++ b/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.inf @@ -37,3 +37,5 @@ =20 [FixedPcd] gArmTokenSpaceGuid.PcdArmPrimaryCore + gArmTokenSpaceGuid.PcdArmPrimaryCoreMask + diff --git a/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/ArmPlatformL= ib.c b/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.c index a554d1377484..dc81e7ba3101 100644 --- a/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.c +++ b/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.c @@ -137,11 +137,3 @@ ArmPlatformGetPlatformPpiList ( *PpiList =3D gPlatformPpiTable; } =20 - -UINTN -ArmPlatformGetCorePosition ( - IN UINTN MpId - ) -{ - return 1; -} diff --git a/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmP= latformHelper.S b/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64= /ArmPlatformHelper.S index dfbf73675a2d..b7c6dbdc2e61 100644 --- a/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatform= Helper.S +++ b/Platform/NXP/LS1043aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatform= Helper.S @@ -1,31 +1,45 @@ -# @file -# -# Copyright (c) 2012-2013, ARM Limited. All rights reserved. -# Copyright 2017, 2020 NXP -# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# +// +// Copyright (c) 2012-2013, ARM Limited. All rights reserved. +// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// =20 #include -#include - -.text -.align 2 - -GCC_ASM_IMPORT(ArmReadMpidr) - -ASM_FUNC(ArmPlatformIsPrimaryCore) - tst x0, #3 - cset x0, eq - ret +#include =20 ASM_FUNC(ArmPlatformPeiBootAction) -EL1_OR_EL2(x0) -1: -2: ret =20 +//UINTN +//ArmPlatformGetCorePosition ( +// IN UINTN MpId +// ); +// With this function: CorePos =3D (ClusterId * 4) + CoreId +ASM_FUNC(ArmPlatformGetCorePosition) + and x1, x0, #ARM_CORE_MASK + and x0, x0, #ARM_CLUSTER_MASK + add x0, x1, x0, LSR #6 + ret + +//UINTN +//ArmPlatformGetPrimaryCoreMpId ( +// VOID +// ); ASM_FUNC(ArmPlatformGetPrimaryCoreMpId) - MOV32 (x0, FixedPcdGet32(PcdArmPrimaryCore)) - ldrh w0, [x0] + MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore)) + ret + +//UINTN +//ArmPlatformIsPrimaryCore ( +// IN UINTN MpId +// ); +ASM_FUNC(ArmPlatformIsPrimaryCore) + MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask)) + and x0, x0, x1 + MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCore)) + cmp w0, w1 + mov x0, #1 + mov x1, #0 + csel x0, x0, x1, eq ret --=20 2.17.1 -=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 (#57326): https://edk2.groups.io/g/devel/message/57326 Mute This Topic: https://groups.io/mt/73008839/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-