From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nxp1.onmicrosoft.com header.s=selector2-nxp1-onmicrosoft-com header.b=VFGY8p4z; spf=pass (domain: oss.nxp.com, ip: 40.107.5.69, mailfrom: pankaj.bansal@oss.nxp.com) 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5WCAvKUT6KrxoJGvin1UK+AWhx7aNVeTCeCuoSfhPVc=; b=VFGY8p4zuzqhXqauLYn4oiEGRmILxPoRL+lgE0SuqAa5bY6LyajI457BjAeHwob1CMc4mUydgroXow09JD5zRGS5AxOAZJYcFRJYQUX5YUmE0BHsYGWoecqGiX0tKTzW63JBYhRxSdCd6XPR8f/4A4B1FeHuBZulkxjgb2p6b1w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=pankaj.bansal@oss.nxp.com; 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 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: [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> X-Mailer: git-send-email 2.17.1 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) Return-Path: pankaj.bansal@oss.nxp.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 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-Mailer: git-send-email 2.17.1 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; X-Forefront-PRVS: 0373D94D15 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5933.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10009020)(4636009)(376002)(366004)(346002)(136003)(39850400004)(396003)(1076003)(186003)(8936002)(16526019)(86362001)(110136005)(26005)(478600001)(81156014)(8676002)(6512007)(66946007)(316002)(44832011)(66476007)(66556008)(52116002)(5660300002)(6666004)(2906002)(6486002)(6506007)(956004)(2616005);DIR:OUT;SFP:1101; Received-SPF: None (protection.outlook.com: oss.nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Pankaj Bansal ArmPlatformHelper.S is being replaced by the ArmPlatformPkg version at commit hash f4dfad05dda2c7b29e8105605621f2b413f0af2b. Signed-off-by: Pankaj Bansal --- 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