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.42]) by mx.groups.io with SMTP id smtpd.web10.13825.1584628644969928128 for ; Thu, 19 Mar 2020 07:37:25 -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=JqfUSHt+; spf=pass (domain: oss.nxp.com, ip: 40.107.5.42, mailfrom: pankaj.bansal@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b08UsppadTCjuTnJ76pSfv75KzFDrMVLBoIv30EeQzgXJNmf8T0/Aq09IBJIjxUNsc8x2KpHwTWZPu/8/FRMen66YNXqTx2CpR/U2uUTINzUyhWKjPjJjSBfWAXjrFSjeZxJnCFQXPP4f2uq0L39yF4BmmnuUe6g1W2B7tWAMnADJdwty6w8xt4Ydcs7tyhTJ81B54bwgduRTBfrqZAjFTpwKplIskWz5En4ExECnuPj4Qj8kRTQbDCwZJNdBfe4vE2ekHX+Y/z/KQq2v0hWsKaDTIWjyeODt9xVgJ4mKwAV2TO3fd/+bOtiS1YkdCFZTwWTWmds8UHpbYjclWfVIg== 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=2cAfhA+eyckYbsXyGhs1mWt+sGC4wcBePmDaJ57H7qc=; b=QIJLmTeYSnR5NrLzOcGJ3/7UHyDW+7Ut8/FIU1cynQknsJj2mgydUdXeQRCUXMjg4GkT9L4Pf8p7zr8bdXZfQ+4rugGs+RWw/bO+rw2kzWKCUMiw/RNDkXJrmq00MVDVjPxE9U2sP0ShviVdeJLfSNBac8DDomIQuREOUcD+FXCDTBhXDar3Zw9szsnh+r8pUJhZZ+M2NN4uzFP9vERilFWJ4c8xnkFG4AgbV0H9ahPQjFS86w1Ud7AFdGmFzYLx+FWO8jTODBSE0H4+/KUvFCAOIglTSFWGbbDUBI0O0ozkbUF4MMbKQHgKhxtsGF6Wr/nVysNvuzjbwTs+W9Nwdw== 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=2cAfhA+eyckYbsXyGhs1mWt+sGC4wcBePmDaJ57H7qc=; b=JqfUSHt+r/6qBdqISE8W13CmMaa3zdqeOZHgDiwmFThSc+Ep/0tANwCN3SR6P5N4NaIuIoMQqoXjMmc6LUa7l5/q/nt8GP5vdpVw9ZaaOOY0tu5C0D73rbkZsh4Nf62jMgwicn7cI17n14DRl6W9aRUVgkypSm7gfE9y859BMfo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=pankaj.bansal@oss.nxp.com; Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com (10.168.65.10) by VI1PR0401MB2269.eurprd04.prod.outlook.com (10.169.134.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.18; Thu, 19 Mar 2020 14:37:22 +0000 Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::196a:28a9:bb9:2fae]) by VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::196a:28a9:bb9:2fae%9]) with mapi id 15.20.2835.017; Thu, 19 Mar 2020 14:37:22 +0000 From: Pankaj Bansal To: Leif Lindholm , Meenakshi Aggarwal , Michael D Kinney , devel@edk2.groups.io, Varun Sethi , Samer El-Haj-Mahmoud , Jon Nettleton Subject: [PATCH v2 21/28] Slicon/NXP: Add PlatformPei Lib Date: Fri, 20 Mar 2020 20:05:36 +0530 Message-ID: <20200320143543.18615-22-pankaj.bansal@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200320143543.18615-1-pankaj.bansal@oss.nxp.com> References: <20200320143543.18615-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0042.apcprd02.prod.outlook.com (2603:1096:3:18::30) To VI1PR0401MB2496.eurprd04.prod.outlook.com (2603:10a6:800:56::10) 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 SG2PR02CA0042.apcprd02.prod.outlook.com (2603:1096:3:18::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19 via Frontend Transport; Thu, 19 Mar 2020 14:37:19 +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: f87d423e-affe-4890-db83-08d7cc1308dd X-MS-TrafficTypeDiagnostic: VI1PR0401MB2269:|VI1PR0401MB2269: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:506; X-Forefront-PRVS: 0347410860 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(376002)(136003)(366004)(346002)(396003)(39860400002)(199004)(2906002)(26005)(186003)(16526019)(6666004)(478600001)(81166006)(86362001)(44832011)(8676002)(5660300002)(81156014)(6486002)(66476007)(66946007)(316002)(1076003)(6512007)(66556008)(6506007)(956004)(8936002)(2616005)(52116002)(110136005);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0401MB2269;H:VI1PR0401MB2496.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0; 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: /hS21K/vTPwhQbX3LHDoQIyZq8HvsVIeqvbYL1Zn39RZHfAPXX/ssHd7zpjH3UJInEFlBQ2BVGZh9eZcyfj4azgkjHZYT7gMH5eymJFHrGO9ANrTC9xv4FLKaE2h52dlYGhgqHDV1rJMxawcHl79FAx14NMWsDK/7qbJQapIrAZNTX/NPV8NkMBBJekA3lqqFZKpq1NgTlZhVL+6ox79W0CS3gWWP7YlxaGzn+YQxh3RDXxKf/IjGRwUbyGiBrEfr9z15BTLniGRx3aDa4ZJx/PcaaGBY39nK1V2ft3IQrf1Cp0g4Vn8hgxb4bB1QvdMh0MJHrl1Oy7ovVQYGooRvdD7LBCRLeQ++v3ocj0y4C05HbEsGVzMdX3YTWBk/eUdHZ7yg8PRQp6UBODxIwFhGcx2mFQ542esdbXcwDMBQ5UBMMQecp2tChpWYCA7BbxN X-MS-Exchange-AntiSpam-MessageData: iSPbMdF2A754qZBICS1UVhut93Z5AoO558Cl2FoNarCWXn2DzLJua4fLeV2izKW50XRdgy60mBLYMUiFhTG0695l4X4u3AKwL/uCMhrvHrHRdZOkxWS8Bub9952ju/Uhsbf7fyIUhKYWtFOKRgv1dQ== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f87d423e-affe-4890-db83-08d7cc1308dd X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2020 14:37:22.5454 (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: FFC4MkrpqxOdxhLSCMWtvB1ly8Xz47ay/FeYW/jSQqydZsi56QceopZ9H0sw2sFvzTOTOYCSOtGKIbToJl844g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2269 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Pankaj Bansal PlatformPeiLib is going to be linked to Platform PEIM. Signed-off-by: Pankaj Bansal --- .../Library/PlatformPeiLib/PlatformPeiLib.c | 30 ++++++++++++++ .../Library/PlatformPeiLib/PlatformPeiLib.inf | 41 +++++++++++++++++++ Silicon/NXP/NxpQoriqLs.dsc.inc | 3 +- 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 Silicon/NXP/Library/PlatformPeiLib/PlatformPeiLib.c create mode 100644 Silicon/NXP/Library/PlatformPeiLib/PlatformPeiLib.inf diff --git a/Silicon/NXP/Library/PlatformPeiLib/PlatformPeiLib.c b/Silicon/= NXP/Library/PlatformPeiLib/PlatformPeiLib.c new file mode 100644 index 000000000000..f64e564469f8 --- /dev/null +++ b/Silicon/NXP/Library/PlatformPeiLib/PlatformPeiLib.c @@ -0,0 +1,30 @@ +/** @file +* +* Copyright (c) 2011-2014, ARM Limited. All rights reserved. +* Copyright 2020 NXP +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ + +#include + +#include +#include +#include + +#define XPRINT(x) PRINT(x) +#define PRINT(x) #x + +EFI_STATUS +EFIAPI +PlatformPeim ( + VOID + ) +{ + BuildFvHob (PcdGet64 (PcdFvBaseAddress), PcdGet32 (PcdFvSize)); + DEBUG ((DEBUG_INIT, "Edk2 version is %a\n", XPRINT (WORKSPACE_GIT_VERSIO= N))); + DEBUG ((DEBUG_INIT, "Edk2 platforms version is %a\n", XPRINT (PACKAGES_P= ATH_GIT_VERSION))); + + return EFI_SUCCESS; +} diff --git a/Silicon/NXP/Library/PlatformPeiLib/PlatformPeiLib.inf b/Silico= n/NXP/Library/PlatformPeiLib/PlatformPeiLib.inf new file mode 100644 index 000000000000..fb42693daa20 --- /dev/null +++ b/Silicon/NXP/Library/PlatformPeiLib/PlatformPeiLib.inf @@ -0,0 +1,41 @@ +#/** @file +# +# Copyright (c) 2011-2012, ARM Limited. All rights reserved. +# Copyright 2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +#**/ + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D ArmPlatformPeiLib + FILE_GUID =3D 49d37060-70b5-11e0-aa2d-0002a5d5c51b + MODULE_TYPE =3D PEIM + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D PlatformPeiLib + +[BuildOptions] + GCC:*_*_*_CC_FLAGS =3D -DWORKSPACE_GIT_VERSION=3D"$(WORKSPACE_GIT_VERSIO= N)" + GCC:*_*_*_CC_FLAGS =3D -DPACKAGES_PATH_GIT_VERSION=3D"$(PACKAGES_PATH_GI= T_VERSION)" + +[Sources] + PlatformPeiLib.c + +[Packages] + ArmPkg/ArmPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + Silicon/NXP/NxpQoriqLs.dec + +[LibraryClasses] + DebugLib + HobLib + PcdLib + +[FixedPcd] + gArmTokenSpaceGuid.PcdFvBaseAddress + gArmTokenSpaceGuid.PcdFvSize + +[depex] + TRUE diff --git a/Silicon/NXP/NxpQoriqLs.dsc.inc b/Silicon/NXP/NxpQoriqLs.dsc.in= c index 234a5e2707cd..5f77f47f0399 100644 --- a/Silicon/NXP/NxpQoriqLs.dsc.inc +++ b/Silicon/NXP/NxpQoriqLs.dsc.inc @@ -101,6 +101,8 @@ [LibraryClasses.common] PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf =20 + PlatformPeiLib|Silicon/NXP/Library/PlatformPeiLib/PlatformPeiLib.inf + [LibraryClasses.common.SEC] PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompres= sLib.inf @@ -111,7 +113,6 @@ [LibraryClasses.common.SEC] PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/Pre= PiHobListPointerLib.inf MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMe= moryAllocationLib.inf PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.= inf - PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf MemoryInitPeiLib|Silicon/NXP/Library/MemoryInitPei/MemoryInitPeiLib.inf =20 # 1/123 faster than Stm or Vstm version --=20 2.17.1