From nobody Tue Nov 26 02:29:41 2024 Delivered-To: importer@patchew.org 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+60321+1787277+3901457@groups.io; helo=web01.groups.io; 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+60321+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 1590569577866992.2087108896109; Wed, 27 May 2020 01:52:57 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id BI7uYY1788612xZPcCLOhDTF; Wed, 27 May 2020 01:52:57 -0700 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.60]) by mx.groups.io with SMTP id smtpd.web10.2235.1590569576601825803 for ; Wed, 27 May 2020 01:52:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FeTHUcX42WIktXcFZd32k2j8zeXyUrBBQWffIjyvUseKLlffHmIrh+Pw/iqUEDulbkaeW1hASozo/3i90edobjNfawTTwBBvQH47qjF21/cMMOd0sGqctViaU3lj4NgxC7AmbBy3yuhVsZHpfxVIwxUvafiiLypeStnoiEINDZLXvVqMJvg/v6thjlBPZcK/rBfN8RF6FPlmxa4HAdP1Rsd0KDe6cQfpcfoBbh/yCK7Tw4Nl5Pdy9fFcMm4eqGOwlpjiJppESW3yraNOvI4es85B+WD0rQCx+bV09NgAVbzvAVOb5YhlUWfDOr520b+VInk9bDlWqGAxsutKwBkVpw== 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=LlT/uACTOnbbeJfD25fdPTjdUy+ugUEv/s6QrQ0KAMU=; b=JFnNLib6K78Sz7IFp39OHViujNouEGyZrxy1OGIQBm+rx3ppunTJC5A1fLbeYfUwYVM3ZySpNvBFRnVIiAQzDr4D5Zf/s35knPPQFwXk+X+SForw4/z7PfJ6UA2ac/iy7DEs+p/wrHFiR0Ilccwq5CrDeKXj9JujTV8zedrW5bu1XaZFmvJSpwv5Bmc0UfHZh3X7hEb4jJH5HY2sNLZPPztwLFQ4EqYMASryL493e5meI7pPl5SVchCZNHdYdK69OEqVibOORd/5WFp7/+dgvPfzk5yCDVUeZz0Dz9i8a6kTTyFEGrK9pcaVzNlchBSU58dBGQgcCJRbtXu5I6uSJA== 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 VI1PR04MB5853.eurprd04.prod.outlook.com (2603:10a6:803:e3::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Wed, 27 May 2020 08:52:54 +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.3021.030; Wed, 27 May 2020 08:52:54 +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 v2 1/9] Silicon/NXP: Use Metronome implementation from MdeModulePkg Date: Wed, 27 May 2020 14:21:27 +0530 Message-ID: <20200527085135.16717-2-pankaj.bansal@oss.nxp.com> In-Reply-To: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> References: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) 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 SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Wed, 27 May 2020 08:52:51 +0000 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5af27a63-fb07-40e8-f357-08d8021b582c X-MS-TrafficTypeDiagnostic: VI1PR04MB5853: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: li22+Jm8s+NnqwJGTkK/+efaydwRk8FJzZCujTej56xR8jpwJZE9EvRaD2/2DJxWKyEWztttrQ8w0XVnYWGiiFN+RJLCeG1rIWC+QoCP8SLf1Ovr4OFoowAzR7ND1Z8xHTUj446JaxNuhOJFBwMQir9QvwGnZbJ94RByLa9bMoYRXqO8XyGhrZQEMuCZLGIbtDDcXDEpZRBPFKirQoTvv5Fa3WI+xbkyMnUkoykkmOpQxL+LZHfNNT/GiU9MegMJVXvwzz7F6NY2/PAJnrUdtDC6HwBG8rfgBlYg+/Npzmw17pHBC64DtM4qHAqNJfqnX43Kn0Bgyy5VPf/H93LtzQ== X-MS-Exchange-AntiSpam-MessageData: T33BGh5Dtor4dah6vknPxjlhwvlY5KTaKcNba1NK4QujSXUb7X0sFMtiIJTECCTLaah7YXAnb93SahSsuM1YRf5TxFtOpHevGGTuKrFne4R2aFkeezskyQ0f3yXCoLru1QMQOEHTpJgl0ItU29ZhEzmfKDxINGoxRusxnjdxCOkivuiyzxQCrkh4TWZeodXygQUdmB8j/0+y27JHxnFMlP89TisdSySXxupqkg/J+TWCPmVm6wuQlhBXN1Q9nFwvvERSIK0EoWedlF/qEPLtni4xuYFTzskTtmXHROT5UgKP/5m67FweLRYXYNwh+WVOtMduSneFUyOzdf4rC6gfzpUdihWrpo9TnZsAJh/xdvWQ8y+bDTbnzge2VEE/Xx1e94f1UAUUQ5oDX7SuJhN7ewvOYK7/E7ymrPXnrBP7yaFoGjc01MttgM9/F12tbJxjzvtPkaLR3/HkLmjx//oqs6SZcIxM6yMRXy9doOQF5h0= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5af27a63-fb07-40e8-f357-08d8021b582c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2020 08:52:54.2307 (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: cBHVre5w77t9BeCEBsq8CA0YRp7JSR+WvW5eh/4S4+IeXwE5zFr3k8VBaxz+COr7fg81+qnao0cuhunPwJw/IA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5853 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: IDORVdhvr4LoejkS0JHuzU2wx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590569577; bh=flGJ5v0nVRjF/NxvNrqO7j0VbQD7x58ah2rS7l4blGE=; h=Content-Type:Date:From:Reply-To:Subject:To; b=f/MSCe11MAMEUWitXa43gijhMINnSAhHbSGmyCkPFedQpZHAwAkV+9dIQnWqO26ZQi+ FXTZrG7Tq1l/MaswRnpDtxczuA3onhQxWa1Jq2ucWrg07esPOXZ24LTzIMJ5ch5X3Ppfl ekUHQRen6eN/bcyvgqMdm3KH19hbjiAQcpI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pankaj Bansal There are two implementations of Metronome protocol. EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf MdeModulePkg/Universal/Metronome/Metronome.inf Although nowhere it has been specified, which one to use, but we are going by the general practice of preferring MdeModulePkg/MdePkg over EmbeddedPkg. Signed-off-by: Pankaj Bansal --- Notes: V2: - No change Silicon/NXP/NxpQoriqLs.dsc.inc | 4 +--- Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Silicon/NXP/NxpQoriqLs.dsc.inc b/Silicon/NXP/NxpQoriqLs.dsc.inc index 03759c7cee7c..54236e19531c 100644 --- a/Silicon/NXP/NxpQoriqLs.dsc.inc +++ b/Silicon/NXP/NxpQoriqLs.dsc.inc @@ -218,8 +218,6 @@ gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVar= iableGuid|0x0|10 =20 [PcdsFixedAtBuild.common] - gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000 - gEmbeddedTokenSpaceGuid.PcdTimerPeriod|10000 # expressed in 100ns units,= 100,000 x 100 ns =3D 10,000,000 ns =3D 10 ms gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FAL= SE @@ -348,7 +346,7 @@ MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf MdeModulePkg/Universal/SerialDxe/SerialDxe.inf MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf - EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf + MdeModulePkg/Universal/Metronome/Metronome.inf ArmPkg/Drivers/TimerDxe/TimerDxe.inf ArmPkg/Drivers/ArmGic/ArmGicDxe.inf EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf diff --git a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf b/Platform/NXP/LS= 1043aRdbPkg/LS1043aRdbPkg.fdf index 931d0bb14f9b..fede51ced10e 100644 --- a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf +++ b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf @@ -115,7 +115,7 @@ READ_LOCK_STATUS =3D TRUE INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf =20 - INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf + INF MdeModulePkg/Universal/Metronome/Metronome.inf INF EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf =20 # --=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 (#60321): https://edk2.groups.io/g/devel/message/60321 Mute This Topic: https://groups.io/mt/74496016/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- From nobody Tue Nov 26 02:29:41 2024 Delivered-To: importer@patchew.org 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+60322+1787277+3901457@groups.io; helo=web01.groups.io; 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+60322+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 1590569580580922.9903631805176; Wed, 27 May 2020 01:53:00 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id NfGEYY1788612x7idt6ZaTNI; Wed, 27 May 2020 01:53:00 -0700 X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.84]) by mx.groups.io with SMTP id smtpd.web12.2303.1590569579463469694 for ; Wed, 27 May 2020 01:52:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L4sMCVarrgaIgc4ipM1byy07cnVpninVKIwznRzvJj1LiULsWl8jcXLPPccx//F5tEHGLiR8rz3njtYlnepb/wLgC/tr4zJ17FVgr24Lr8cOlzGLfKe9hhHi5T8CsVzXT9Xl2LWHg3eUcxfVJ7Ril3VV7yw69r6R2HtThkwp8cybVHh90Egg4Tk6C/y9a4DA+/b9zDpm6JpYzHhfrF8VZBFzeToFyfibU8kMw6ddUJHrLuQhI+F/w3l59nUGyaoTPGrjf5wuB5aadZ6KuIpppIZwZm90hh/oAWe4p80hH8npCH9xheIoQeLPnrXmYvgxRN7bwqQ9vT/bgom5aTSHtw== 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=g4LOKrBc8UoXRmEYs0IFhdj426Mw2vhzVyzo1xlhQUQ=; b=K/kH4u8KiKhkvAFfn2ipC/ibI5YMCG7eCUT1Vn3O13Zrqwm0h3mPkwNUOX6bkGTjcyBto1pRUIqEbqcKrHbZmEq9MPe+Hm+pvTkoZxhQ1T59CxEsD61t+wkckdk7V0Z8ysUUO09uAMyajOKxZui7whwJNMY8QqjAWVWeUrC0hDuzCEhdcxeIdRkxBPwuXnApSLhOYfN6DwW4vrP5izVA61RhVdYxM/E5u3PI7rIdHNgFNA2aQWijWhhE1aCFGGprNAPY01VKS39RnJp7VAUq6jJDcS2bgXHOOzdbf9QhCyjm3y26P2VXiu44tJVgzB6fY1hrXK+pLmrG1exOSDE4wg== 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 VI1PR04MB3181.eurprd04.prod.outlook.com (2603:10a6:802:a::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Wed, 27 May 2020 08:52:57 +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.3021.030; Wed, 27 May 2020 08:52:57 +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 v2 2/9] Platform/NXP: Use Monotonic counter from MdeModulePkg Date: Wed, 27 May 2020 14:21:28 +0530 Message-ID: <20200527085135.16717-3-pankaj.bansal@oss.nxp.com> In-Reply-To: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> References: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) 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 SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Wed, 27 May 2020 08:52:54 +0000 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6a3f4d3d-891f-44eb-4e7a-08d8021b59ed X-MS-TrafficTypeDiagnostic: VI1PR04MB3181: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:962; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: QKaJ75N9rwma79vDKlEoC/0evsnv+m9h8XfrCEVRn7bnatQAL2P8wy5l59TEZsg9aHidKz9Q42ffWZ4qSu40UtTsbMNSmcChNtt1/ZrsHN8ZzbLofakEUAECwAi0B0eIpyp/Lgo5daiJrVQy4B5UCVXE0prQMVAXY0biEoa8d0QRmpjBZTD0UmDh6Sy6UtPkU+mcrWWsElXns0Ml1HbPiW+/w25QYB+GXUAurhu/vwkr72nDKoF86t56eo0PlYQ6lXZ3x8qck7kBv/8aV4vJLg48AWXOOoqARLyBOX00lrWZIySrB2oWdTaMUFY3n+iCzoxjvin0iEinZRYAV/4JQQ== X-MS-Exchange-AntiSpam-MessageData: bYoRxWnGAWnwJWf+JAxuY5ezVYQddzJ/hKM7+iBl+ivghJi+Ou4dH4mDdqFn8GWLj88r2yP7c31MMH/4QYnHbxIT0sMESBAR1cymXetkCSX6W5bCQZ/+oFUrV5Iujru7RLIIZzrm+rqeXt9Qv2E+Brbf8cRt2E0y+oE5EEGcdWBytKOfWhput5Fx3dquRVmsNGHN7EHNoc3Cb0Yqagh/AsfNGaxOJObSwf5LboYk7+qWG0JDT1PtXPRo4ZWyNPKKUGp21iVfhFdO5JwGcAZOcsi2EVwicZ3yNZ2PwXhDUVIURFou6SWsVZeA235qR2QmyCKTvibpVcyZVU/n5v1DawGCheZ2Lkd4iOyy6a9hE1lUAZf4F+sYaHs6M2XojURHkkU4+htINPOMaPtmvP0YkOok5bOf6lKWVFKdpDCbtNZSBPismCSuTMnXwCZnSmFt0bbxF9nr/z1iFIp49atMmeY1AWcTkcgnMh0q0ZVUyRQ= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a3f4d3d-891f-44eb-4e7a-08d8021b59ed X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2020 08:52:57.1900 (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: ICIk1U0wrOvNw4hdot8/yWZB9i13YmsTPpx4ggAxMkUInGwWmiLFPqAv5LukEawZIiIFonb/ZXJxIp0op3GatA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3181 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: fBP5TzsK5ucsoDXvf9MOpSujx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590569580; bh=6VFxB4P7+r6H/STY9yHHRajp0dUc2dNczi9/OD5a6pU=; h=Content-Type:Date:From:Reply-To:Subject:To; b=sud0YPdFsrQPEgmRYSuoeUaneprjF8NxWg9fzZRcP4EyEn5YSj7hvhATwzVQKPl4ZrC 11NnW6Bzmd0VmHxFQDgrRXE4iBTse73G3w9znZRuza+NldIhEgI3cM1Vknq013LRwbUBs IZGO8o9/skQP1tO3MVc/tWoOzWT3xfYzFA0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pankaj Bansal Monotonic counter module from EmbeddedPkg doesn't treat the high 32 bit as non volatile, which is needed as per spec. Therefore, use Monotonic counter module from MdeModulePkg Signed-off-by: Pankaj Bansal --- Notes: V2: - No change Silicon/NXP/NxpQoriqLs.dsc.inc | 2 +- Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Silicon/NXP/NxpQoriqLs.dsc.inc b/Silicon/NXP/NxpQoriqLs.dsc.inc index 54236e19531c..12e2b89fac58 100644 --- a/Silicon/NXP/NxpQoriqLs.dsc.inc +++ b/Silicon/NXP/NxpQoriqLs.dsc.inc @@ -337,7 +337,7 @@ MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf - EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf + MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntim= eDxe.inf =20 # FDT installation MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf diff --git a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf b/Platform/NXP/LS= 1043aRdbPkg/LS1043aRdbPkg.fdf index fede51ced10e..49d8885477c7 100644 --- a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf +++ b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf @@ -98,7 +98,7 @@ READ_LOCK_STATUS =3D TRUE INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf - INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf + INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRu= ntimeDxe.inf INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.i= nf =20 --=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 (#60322): https://edk2.groups.io/g/devel/message/60322 Mute This Topic: https://groups.io/mt/74496017/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- From nobody Tue Nov 26 02:29:41 2024 Delivered-To: importer@patchew.org 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+60323+1787277+3901457@groups.io; helo=web01.groups.io; 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+60323+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 1590569583773369.2920370124381; Wed, 27 May 2020 01:53:03 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id zbu9YY1788612xKlhZaWLJKE; Wed, 27 May 2020 01:53:03 -0700 X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.89]) by mx.groups.io with SMTP id smtpd.web11.2220.1590569582594940560 for ; Wed, 27 May 2020 01:53:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ATMM86kL25S7Zwqhz7JgwCT8RyXQul++wgADQjRljnCl6Kl1tU1BHuM3O/iJr00xUVXwBgIuQVKeMg/7mOBi97L4r1ocQgFUBLBdScXOffLFcMh5Q8W7dbjx+24BJrGV7a1cI2/D/rHquGkRm/GjduZ+8Xk35dE0m8e0i1D/lcnQjl220O/S6dIsXRpP494EB66EZ6G9yqi5NqoqL8ST71ubq+wMYiWq5wE/9ddzvVRlrm6sZc0AWG141HukTTHx2kA/hXLRoTUIoIsX9ilg7R7HuVV8upcrJRRdQauRZGar6zLh4w7SR8D9LCkj985RZICSpjG3qAB7QXDnBsVwBw== 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=Q5L2Uor5vt+vyqopgY9qLvPh+Co0SyQfcJoSQmOzdHU=; b=gsEEIAp3GVKowbVw5IXkipy338KNRi0VY85O5cFDFCo/74AC/gsAJocqTJH5vV9zxGP3H4ne3U6/5HnvTfTZJrDr3kee/g4AAQKqQCYE3hziAwqFTGSyD0EfqIGpmCGpp+ZP2yWKbPxH7zT0YxijcG/1zz/yrinS3IauewawY2LqSQDaa7J8rS52zEk65Y6DBpaVqkYGXUifIMwvWZt2nOXw0bGbY9SWsbHx7S7z8qSqPBTEt2pYytRViUqLtGzfIoWq6oB5JD0F70qkkEdikrdi3yuMOG+ImIhNNJlIPv81IOdQ9haag1kWkq9KgpRtIYPw2SVbGHk2CbmdLIkGMg== 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 VI1PR04MB3181.eurprd04.prod.outlook.com (2603:10a6:802:a::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Wed, 27 May 2020 08:53:00 +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.3021.030; Wed, 27 May 2020 08:53:00 +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 v2 3/9] Silicon/NXP: Use edk2 recommended compilation flags Date: Wed, 27 May 2020 14:21:29 +0530 Message-ID: <20200527085135.16717-4-pankaj.bansal@oss.nxp.com> In-Reply-To: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> References: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) 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 SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Wed, 27 May 2020 08:52:57 +0000 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c2629da3-eb0d-4d25-8ebf-08d8021b5bb9 X-MS-TrafficTypeDiagnostic: VI1PR04MB3181: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2331; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: GR3wPEXxIypDcqWSGUDQc6UIFbZTeF9Dpg6/REU2JKtJoNxl/Rf+WsdC/hFM5EFW8jP8Tl1j5EC7EA+PUuRIgIQsg9Dyo4Tgb7MsnDcdpVBBxW5v54QniJg/HFMnehfG4PQ59ylBf8cfznv3YKP9KlS2oW8XvUCGO6pAtJIGfcS+G391dvV8D32VNa8+uqqlX1DyQ7ESc+xyd/DVGTzZP0am5zf7D8NJqK4QVEoTMUjikIJQOX1XZ1w24UxbWCQzOW21Okhnvm+SCRfzYtCGwtLFX0OKw6Y8BJJDVg+/UpNAe7U5CYN3lSqxyZuxPOEtekwTGX1lWZPg6iTTS0MMrg== X-MS-Exchange-AntiSpam-MessageData: hzaabPMyvXepD4+OkjNdb822cU9a1QhIzJGuu/S2kio69CwtItWQKWFssv3oyU/Y0Of9D0Ylq/ZCJOxEMzKnx91d9xNYqD1m/BfnCP+8Kj0yWxUoC9c4To9wgxOfLeoL44zlsnHlfvJLbYvdyU+xVVr7u9DGHoWdi6PKAb2Acz/9XOslv0W1wr9CWTsY0QSNHLS67xLkpAd3lXMqzoPKoVB+RN2Z8RVfgNdr+cSGcTpPPpBAaRKK/WgnC/C7ca+o6O1NPVg14zpDwKJGyLg1+WzoUgD8h0v+58QbJAX6CeYCA35V0PLAfwwf+jfuED/VK6iG/qMQE0vXbs7ZePMM+9NlFW3GgvvRLx4qCht/zZpr2/kWdD9VP/b2w/YFBZRablW2CJlGqc7aTG/0r2pfMFxroe9jufjiSCTakmRsLkp5NKmkMs4hiZfbv99MsldjWkAZLPK5zC8kt+Bhdu1pbcJqSI80E4HFrjQ/vI67GaY= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2629da3-eb0d-4d25-8ebf-08d8021b5bb9 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2020 08:53:00.3352 (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: jMqN2FE0XQ0WXYT71lbEqvJzRbILFQwZIcYDzoqo/U7mWk15Gz8Pcpz1xIn7oxmhwaC+fCW7lKZ+khbVoKa2Ww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3181 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: 2Dv7LRIVFrEJtQGypuPHyvdPx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590569583; bh=0zNiUrShB/hqjzzYdDWG5sH8Yqqaym1OCSfJoDBV5wk=; h=Content-Type:Date:From:Reply-To:Subject:To; b=xTQP5uBLPIuPvRwzZ5BgYw+OiyCMYBCLrCEh3mmUThqIjq20EiycHH5Q3HAp6v09XeM dJjkSDJw1k/WdhZ6RzTdy89T180dH/Yi+UqufrtLdQeVHUvJTZb3jptLfaIuCeGUlTWW2 XpHIRxiiZ3BkyHMYbPJ1LWEtFGQFtyR0UNQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pankaj Bansal edk2 recommends to use MDEPKG_NDEBUG for release builds and to use DISABLE_NEW_DEPRECATED_INTERFACES for all new platforms. Therefore, enable these flags for NXP platforms as well Signed-off-by: Pankaj Bansal --- Notes: V2: - No change Silicon/NXP/NxpQoriqLs.dsc.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Silicon/NXP/NxpQoriqLs.dsc.inc b/Silicon/NXP/NxpQoriqLs.dsc.inc index 12e2b89fac58..ee639d552483 100644 --- a/Silicon/NXP/NxpQoriqLs.dsc.inc +++ b/Silicon/NXP/NxpQoriqLs.dsc.inc @@ -173,7 +173,12 @@ NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 [BuildOptions] - RVCT:*_*_ARM_PLATFORM_FLAGS =3D=3D --cpu cortex-a9 + GCC:RELEASE_*_*_CC_FLAGS =3D -DMDEPKG_NDEBUG + + # + # Disable deprecated APIs. + # + GCC:*_*_*_CC_FLAGS =3D -DDISABLE_NEW_DEPRECATED_INTERFACES =20 [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER] GCC:*_*_ARM_DLINK_FLAGS =3D -z common-page-size=3D0x1000 --=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 (#60323): https://edk2.groups.io/g/devel/message/60323 Mute This Topic: https://groups.io/mt/74496018/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- From nobody Tue Nov 26 02:29:41 2024 Delivered-To: importer@patchew.org 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+60324+1787277+3901457@groups.io; helo=web01.groups.io; 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+60324+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 1590569587040686.580690188302; Wed, 27 May 2020 01:53:07 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id eEG1YY1788612x6OSyKAthLR; Wed, 27 May 2020 01:53:06 -0700 X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.41]) by mx.groups.io with SMTP id smtpd.web10.2240.1590569585958275842 for ; Wed, 27 May 2020 01:53:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=daapLLKuiDkkUcxb1nPYJhlgnGCkfHnkE2JHOkQZzOvp9cO0eVYEomfMZq0G9dV+AbZclG6ZNU5UmUQmHy6Ce0hd2Ie2mGOb+MxFgZdJnuP0Nvcb7npKS6QMlmyD7SLiAZ4HhB5JuHG0fZbDbpfP5valrfOeWeDuBcESKJuF0goJJ5CfviQ4xDzR972fC0YVKEWcIvYblAxO11mmj6TTpSue4nEerZoZuI5FrRrrlZvO+Qur/BNF1f37/Dg7UHS14l2fSviPNVBPH6f5TOpRModf44iklmgQO+Hh0RoP0DQdLV53wYaSY6Bej0x1J+cEylM8Lut/gaEKIS9j4hmmig== 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=cF6nqj4lxU4lFK+iZuNvb+9x7xlTFW52AlLWL14vS1Q=; b=DdceCBuxNILPCgnid0vtYrJ9QkoK2ZDaN/XCXmKKi4GM+SOYcLv0LRcKllvRWrfDjPZskbXhlqGllENCmpaX3m5tMb/mpz6jwsQVDupVL3e0GLyRQR38UVu/F+qvptiY/XPrdAEwJZcljDerk+e1iDL/O5Iq56joPWLgO8x6gztcLLgSn/gF7TLo0er1pH/91JrBN1lzEw56z5FCYmIUn+n58eSfdLJeHfA+FyGLHTm+W/+Ns1zjbt4ghy5g/Dl/RQlbU58CqJgl/NLYxc/ORPtlal0/NnLfCAblRU1qbrxLnDsXDXYf1l7KxAxoa8KHNnM0WRJeY47Uc9moCbdxYQ== 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 VI1PR04MB3181.eurprd04.prod.outlook.com (2603:10a6:802:a::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Wed, 27 May 2020 08:53:03 +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.3021.030; Wed, 27 May 2020 08:53:03 +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 v2 4/9] Platform/NXP/LX2160ARDB: Add ArmPlatformLib Date: Wed, 27 May 2020 14:21:30 +0530 Message-ID: <20200527085135.16717-5-pankaj.bansal@oss.nxp.com> In-Reply-To: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> References: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) 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 SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Wed, 27 May 2020 08:53:00 +0000 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2a26a3c2-2375-46c5-afbe-08d8021b5d93 X-MS-TrafficTypeDiagnostic: VI1PR04MB3181: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: +kx2VNJwWrJQUooeer55ZL7X6B1qlcwNQYAA8LqX02i2EGfL/4aNORM5S+4QngNc8cboguAgON7pO8juVK4eqR4jseXtdomQrXyMokwD919mA4rIHRLi741VFqPBuniUwrEYCOeIrUtGejnkiyNpB8xwSAhB9pkMBrRH22RMbIbjH++r9A70x/D7a89LAOM8VF7LhURm0ZbT1UdytCtd9VxB/DAcPdEsN9zYE0e30oci65Md+7RD0PkKr20UrStRYjvjipbQ3bk7Jf2q78HXrKd497DZ1/PbGk7BS/sKKB6rQJ+sR4Kg66EH8TxaGH5NgLU+MeomKKfBoxHZFhXu2A== X-MS-Exchange-AntiSpam-MessageData: 3CSR1OXqQNMUK+SPWDChogSgN4coHZodfd1HEGA0lxuykLdgLlwOalzk9zaZTtxR3TfUeztLkvwA/BaSvxHmeEgUhTCQTmazlVPAJaVUT4RAuppzEsmVTr6KGx3hewwd+IDcmikOw1mACvaGE0oIFz3eT0MlPXRKd8HYN/37NJVLz5Aa5cb8WL2KCpEakDfSmmydjI4OIDO0d7uHYYbt/aioT+4KQuHn7RfLvREOf+LKSDkSNie7mYenOhKhNNt3Brs/Ea/ImY1IKBo9aZgMK+BSl52Ykvqsi5V+w62cMy0tHRsPcIKgPKvrp8zWSGmhDjARejBhgULlcEkqOSIIZVmnlpygrDec4wLQEqmWrWinZAPcbJV5QhVzoL5fxBtMWgLz5Lkfgau+RSAYUORzBlOahTFGYulsFWCyo+GAQPbASq4l1COrmUtJNmMhrtpYcm7dh+4fXwYWhSZ4nGn23fRoskMVl4HVEpjPVj2X8oc= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2a26a3c2-2375-46c5-afbe-08d8021b5d93 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2020 08:53:03.2826 (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: 4G39pJaBk+aH8RdsTTuWOR5qe+KTI1FbtzxAaLI1gbwBo6XJyR43E9HTuN8Fb9UFA+I4l2oLsWtKHsPf3fNjGw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3181 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: gpQD5G6StP6TWc1RAIBHvmAMx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590569586; bh=t2yjpTJzBmnfBz7HTpCIVQJcmqM00B11NAIZ4h0arhE=; h=Content-Type:Date:From:Reply-To:Subject:To; b=arBZxQ3hjftxKhh+0vjUZhZR76r12KOtfVUp/PU5TCv3EDx0apYv4mrMF+QZf0Lpymj 4hM+Y4rMsemnypvAmNdOyCSFcvt97f+6Un+T3HZ9Q5uIlKciqOkZF6+hAWKU/CcjNlUeb mS5FdwjmQIP+ESDbOa0aIc7k5sBoVRcTF2A= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pankaj Bansal Add ArmPlatformLib for LX2160ARDB platform that is based on ArmPlatformPkg/Library/ArmPlatformLibNull. Apart from the the interfaces exposed by ArmPlatformLibNull, this library also implements gPlatformGetClockPpi, which is specific to NXP SOCs' based platforms. Refer edk2-platforms/Silicon/NXP/Include/Ppi/NxpPlatformGetClock.h for the details. Signed-off-by: Pankaj Bansal --- Notes: V2: - New commit - split Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ in two parts part containing gPlatformGetClockPpi is put before PL011UartClockLib implementation. Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.inf = | 39 ++++++ Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.c = | 145 ++++++++++++++++++++ Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c = | 28 ++++ Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatformHelpe= r.S | 45 ++++++ 4 files changed, 257 insertions(+) diff --git a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformL= ib.inf b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.i= nf new file mode 100644 index 000000000000..743836e57141 --- /dev/null +++ b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.inf @@ -0,0 +1,39 @@ +#/* @file +# Copyright 2018, 2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +#*/ + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D PlatformLib + FILE_GUID =3D d1361285-8a47-421c-9efd-6b262c9093fc + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D ArmPlatformLib + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + ArmPkg/ArmPkg.dec + ArmPlatformPkg/ArmPlatformPkg.dec + Silicon/NXP/NxpQoriqLs.dec + +[LibraryClasses] + ArmLib + DebugLib + +[Sources.common] + ArmPlatformLib.c + ArmPlatformLibMem.c + +[Sources.AArch64] + AArch64/ArmPlatformHelper.S + +[FixedPcd] + gArmTokenSpaceGuid.PcdArmPrimaryCoreMask + gArmTokenSpaceGuid.PcdArmPrimaryCore + +[Ppis] + gArmMpCoreInfoPpiGuid diff --git a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformL= ib.c b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.c new file mode 100644 index 000000000000..806cfd180bee --- /dev/null +++ b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.c @@ -0,0 +1,145 @@ +/** @file +* +* Copyright 2018-2020 NXP +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ + +#include +#include + +#include +#include + +ARM_CORE_INFO mLX2160aMpCoreInfoTable[] =3D { + { + // Cluster 0, Core 0 + 0x0, 0x0, + + // MP Core MailBox Set/Get/Clear Addresses and Clear Value + (EFI_PHYSICAL_ADDRESS)0, + (EFI_PHYSICAL_ADDRESS)0, + (EFI_PHYSICAL_ADDRESS)0, + (UINT64)0xFFFFFFFF + } +}; + +/** + Return the current Boot Mode + + This function returns the boot reason on the platform + +**/ +EFI_BOOT_MODE +ArmPlatformGetBootMode ( + VOID + ) +{ + return BOOT_WITH_FULL_CONFIGURATION; +} + +/** + Get the clocks supplied by Platform(Board) to NXP Layerscape SOC IPs + + @param[in] ClockType Variable of Type NXP_IP_CLOCK. Indicates which IP= clock + is to be retrieved. + @param[in] ... Variable argument list which is parsed based on + ClockType. e.g. if the ClockType is NXP_I2C_CLOCK= , then + the second argument will be interpreted as contro= ller + number. + if ClockType is NXP_CORE_CLOCK, then second argum= ent + is interpreted as cluster number and third argume= nt is + interpreted as core number (within the cluster) + + @return Actual Clock Frequency. Return value 0 should be + interpreted as clock not being provided to IP. +**/ +UINT64 +EFIAPI +NxpPlatformGetClock( + IN UINT32 ClockType, + ... + ) +{ + UINT64 Clock; + VA_LIST Args; + + Clock =3D 0; + + VA_START (Args, ClockType); + + switch (ClockType) { + case NXP_SYSTEM_CLOCK: + Clock =3D 100 * 1000 * 1000; // 100 MHz + break; + case NXP_I2C_CLOCK: + case NXP_UART_CLOCK: + Clock =3D NxpPlatformGetClock (NXP_SYSTEM_CLOCK); + break; + default: + break; + } + + VA_END (Args); + + return Clock; +} + +/** + Initialize controllers that must setup in the normal world + + This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/Pl= atformPei + in the PEI phase. + +**/ +EFI_STATUS +ArmPlatformInitialize ( + IN UINTN MpId + ) +{ + //TODO: Implement me + + return EFI_SUCCESS; +} + +EFI_STATUS +PrePeiCoreGetMpCoreInfo ( + OUT UINTN *CoreCount, + OUT ARM_CORE_INFO **ArmCoreTable + ) +{ + if (ArmIsMpCore()) { + *CoreCount =3D sizeof(mLX2160aMpCoreInfoTable) / sizeof(ARM_CORE_IN= FO); + *ArmCoreTable =3D mLX2160aMpCoreInfoTable; + return EFI_SUCCESS; + } else { + return EFI_UNSUPPORTED; + } +} + +ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi =3D { PrePeiCoreGetMpCoreInfo }; +NXP_PLATFORM_GET_CLOCK_PPI gPlatformGetClockPpi =3D { NxpPlatformGetClock = }; + +EFI_PEI_PPI_DESCRIPTOR gPlatformPpiTable[] =3D { + { + EFI_PEI_PPI_DESCRIPTOR_PPI, + &gArmMpCoreInfoPpiGuid, + &mMpCoreInfoPpi + } +}; + +VOID +ArmPlatformGetPlatformPpiList ( + OUT UINTN *PpiListSize, + OUT EFI_PEI_PPI_DESCRIPTOR **PpiList + ) +{ + if (ArmIsMpCore()) { + *PpiListSize =3D sizeof(gPlatformPpiTable); + *PpiList =3D gPlatformPpiTable; + } else { + *PpiListSize =3D 0; + *PpiList =3D NULL; + } +} diff --git a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformL= ibMem.c b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLibM= em.c new file mode 100644 index 000000000000..ad6862dd81eb --- /dev/null +++ b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c @@ -0,0 +1,28 @@ +/** @file +* +* Copyright 2018, 2020 NXP +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ + +#include +#include + +/** + Return the Virtual Memory Map of your platform + + This Virtual Memory Map is used by MemoryInitPei Module to initialize th= e MMU on your platform. + + @param[out] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTOR = describing a Physical-to- + Virtual Memory mapping. This array mus= t be ended by a zero-filled + entry + +**/ +VOID +ArmPlatformGetVirtualMemoryMap ( + IN ARM_MEMORY_REGION_DESCRIPTOR** VirtualMemoryMap + ) +{ + ASSERT(0); +} diff --git a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64/ArmP= latformHelper.S b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64= /ArmPlatformHelper.S new file mode 100644 index 000000000000..b7c6dbdc2e61 --- /dev/null +++ b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/AArch64/ArmPlatform= Helper.S @@ -0,0 +1,45 @@ +// +// Copyright (c) 2012-2013, ARM Limited. All rights reserved. +// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// + +#include +#include + +ASM_FUNC(ArmPlatformPeiBootAction) + ret + +//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 (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 (#60324): https://edk2.groups.io/g/devel/message/60324 Mute This Topic: https://groups.io/mt/74496019/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- From nobody Tue Nov 26 02:29:41 2024 Delivered-To: importer@patchew.org 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+60325+1787277+3901457@groups.io; helo=web01.groups.io; 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+60325+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 1590569589808140.0487403398048; Wed, 27 May 2020 01:53:09 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id q3rFYY1788612xZrTMPrQVd5; Wed, 27 May 2020 01:53:09 -0700 X-Received: from EUR03-DB5-obe.outbound.protection.outlook.com (EUR03-DB5-obe.outbound.protection.outlook.com [40.107.4.71]) by mx.groups.io with SMTP id smtpd.web11.2223.1590569588717610592 for ; Wed, 27 May 2020 01:53:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z1vSUyYhxxgBwr4U0U+gzPYUJzEC3J9x2lRW4JqBst+asKk73C5rSCeabQqwVpwTdJkk4rUfwKgm+tv9gloPjG1e8zSC+aFjRvMKfpFCnhPwxOQoCVoOs7pY2B8HNKS2b8rFS0BsI6HQiBU8mJMDDeQvyT80B7zVL1M4x0aJRpNj4mkFuS5dQc8meghluOsjx7Xkm0P8N/fv28vYIVcDymg1Uzao6JBUeUyAKCzYiPWvHDYPieiMwZo+kOSkyhBQUKfpdKsDJw6ZkZh00XkpnI681AdmuuTtQn68Y1LXsJ0oF7ccU22kfEp+YcEL4rfzz7XCWJMa9QBHLWh0EHNUmQ== 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=aIxTSGRweqvIpVMQzejBCYh3YW+bI5ByCzRwknhDYoU=; b=hr/n7Idv3r27x6hBpxXfSSHbcDducuf55q8L0Fi0muWaKHPvv5NZHgZwZvrcmYHjDN1JAhbTTpSMyYxAL7JW3xdhrXCcFCyNxAvo4bjDBOnlcYKnLNlSNWwrbig+R+phC5QrIC/jR6foddCdFcCHb/qCM8ivwcwQ/p7QxtF4s5k+Ew/9nilhartRp1p9EwCWdpmxfKqZvz3f93/4AoK0kXXi6hItlIZCYHSqCiY1AeS4LI8ZeUZabS04e0D0INHLMz+1ZYFZo2HZDpG0y3Wgtih3iHsL2I7H6S/hMnzM/xGjAlsP9sR2Q6L6YGqvXKHdAdRaXoPW6U/wQ4gO8cZw5Q== 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 VI1PR04MB3181.eurprd04.prod.outlook.com (2603:10a6:802:a::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Wed, 27 May 2020 08:53:06 +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.3021.030; Wed, 27 May 2020 08:53:06 +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 v2 5/9] Silicon/NXP: Implement PL011UartClockLib for NXP platforms Date: Wed, 27 May 2020 14:21:31 +0530 Message-ID: <20200527085135.16717-6-pankaj.bansal@oss.nxp.com> In-Reply-To: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> References: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) 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 SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Wed, 27 May 2020 08:53:03 +0000 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 64719994-dc1a-4334-5672-08d8021b5f56 X-MS-TrafficTypeDiagnostic: VI1PR04MB3181: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: xsF0QY8wxseexapfNKN0/jFECjqk2QfrB93BRI14Y4QS9/CKWxqoFU+qTVfZul46FYnvE9fcBjiGz/kotjiw1voqvQe5h4mub6sr1mlv0/KoGcYwsm1WEJt6yqizz5QJVSwwpQMAQEPgmqAseTwYxBSWwjt9E5Re1bMzljlfxX8CtuK2IoTGe4sWhD1rUoe/R3MkTWC76x0jMr17H+qJDzg17cFkRkZVFimgKMFzMmCdXdPxLH9fuOmQ/y96z06iG7ed0TFoOVDPdEkVSj2LaUwEsfUf9YjQhNx/ERicMdH/XVd7QgXsAbbU3QU3B95J1JSo61FDAVlpD4NJsFDIwg== X-MS-Exchange-AntiSpam-MessageData: M1ATzaXN58UshBqx+tINaYOjn7EgSt/i8NurB5X7+t/acLD3Aad9BnztkFscrGKLCGzy9pipEKTb6/BDcZDCpjID3/srWv0BJ4dr66kXkB/QHG8mt7zJN41kfLIyiHt4i/SM0Y5xgFzqfMkt8F3La4CVvBSssqK01fV5ajp5ahOLH9kXDcnUWxWt1UKlRVZT6N586exChkhsIvE1wLbrklQX7mVWxKitH3ADhDsOHVlollekWl0aQZQSn4YIe1FFGOkHa5vUrAM0CnCw1JicBm5tQ4hBazEClNzG13v4ZK+Yc1F5MDN5JJruW1z45Aq98pyzXNQYr9hwoiuE62ziROWAtB5wOb2/IaNUT9lVW5FPOR5UaS8OYor7jQeLtfJg6SbfzPptTwY6uz+joEuTD9qxu9OrM4C9hu59dDyar+kmVhwn6hDTaHDuVFPVIIVhM/hx557hwp130SgsrkxGyvleRYlq8lys7x9CeWtA7v4= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64719994-dc1a-4334-5672-08d8021b5f56 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2020 08:53:06.2110 (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: YFE/XLwEOQZnXLAkzuPmrwcaFpIMX26R87S+8FkOBgznK0Na+oKXsn7zaxUyqCz8nYw8Nzs2ze3YAOh8EeAQnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3181 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: 6hweWZNKHgWxcuvpI7kdyfK1x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590569589; bh=eEmGYUGRDPSyCciFogjEH1e3vd87aLNBwPeHeS6lJ9I=; h=Content-Type:Date:From:Reply-To:Subject:To; b=huQdMdy3FtxO0gaGRAAhmEKGtNhWolZhgBVszeN9c7gRzg4RXvvsMsrzFS/Ejvcmukm 4KNHU+xVvnbPxQbrA8Vlu3Kf+zPxMxcCnseL2jSr4jkARr7pFx2EV7BPV+CCjgLL1GSpk +FCJmNu2wedsp1wE9SuqRertsrtT7qNACNo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pankaj Bansal In NXP SOCs the UART clock is derived from System clock after PLL multiplication. Therefore, add the PL011UartClockLib implementation for NXP platforms. Signed-off-by: Pankaj Bansal --- Notes: V2: - No change Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.inf | 24 +++++++++= +++++++++++ Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.c | 22 +++++++++= +++++++++ 2 files changed, 46 insertions(+) diff --git a/Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.inf b/= Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.inf new file mode 100644 index 000000000000..b771dba7697f --- /dev/null +++ b/Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.inf @@ -0,0 +1,24 @@ +#/* @file +# Copyright 2018, 2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +#*/ + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D PL011UartClockLib + FILE_GUID =3D af8fef24-afbb-472a-b8b7-13101a79703c + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D PL011UartClockLib + +[Packages] + MdePkg/MdePkg.dec + Silicon/NXP/NxpQoriqLs.dec + +[Sources.common] + PL011UartClockLib.c + +[LibraryClasses] + ArmPlatformLib diff --git a/Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.c b/Si= licon/NXP/Library/PL011UartClockLib/PL011UartClockLib.c new file mode 100644 index 000000000000..3814685585eb --- /dev/null +++ b/Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.c @@ -0,0 +1,22 @@ +/** @file +* +* Copyright 2018, 2020 NXP +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ + +#include +#include + +/** + Return clock in for PL011 Uart IP +**/ +UINT32 +EFIAPI +PL011UartClockGetFreq ( + VOID + ) +{ + return gPlatformGetClockPpi.PlatformGetClock (NXP_UART_CLOCK, 0); +} --=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 (#60325): https://edk2.groups.io/g/devel/message/60325 Mute This Topic: https://groups.io/mt/74496020/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- From nobody Tue Nov 26 02:29:41 2024 Delivered-To: importer@patchew.org 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+60326+1787277+3901457@groups.io; helo=web01.groups.io; 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+60326+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 1590569592688186.83382496974878; Wed, 27 May 2020 01:53:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 2egpYY1788612xpWzuFigcSZ; Wed, 27 May 2020 01:53:12 -0700 X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.42]) by mx.groups.io with SMTP id smtpd.web11.2224.1590569591541636898 for ; Wed, 27 May 2020 01:53:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D5oTkeUQ4dcUqT6DZuCwkyAoqMVYYciVrSnhvVbjj9xFCds118nbxvf8Bpw6/YdoG7usKumOZufhmujPZwT9cR0et8nSQALWgVddTPh/yPXssUVShlGhyRo99csyhbsAD6SPsUTvjbfhMr9nU8VAjakpOOAx1TeTKS/ChDbM366d6A8SeAn1VsEHeHCtzL3ITl2uNaoEAXI5TgM0WlTOTIwS6dA+P/ft88dFWu49r5b43+MbW5ndPvihh9np1kY18KMGoWnNb53vfDVKZcRWo+RbqtpLqIQT5Zflp4cHRWqdeSQZnlIeDIkT0sPS+djJ/LSh8KnKDInN/8qllciyfw== 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=hndXk980Vw+4d7kCmnLKret7wWPWHr1tjEow8iqHfFo=; b=LLUfFFUw00/XNaJSK4VCNGFJadVGRFcQD5TnwaHyHO0Sh2L86tBbFQJY94nnuUV18XPTh/o8nYzsVJoGxVZwdSBBGo1ch2uOUhvmVeokd96N7KCmcIlXoFdE0VJJxh1nEkOkd8IIpyvJFpmlqieqOSDI5EyLE+hW7pCdLuUlFpQmbfLIubN4I78Lbphl/bRFbJLLwGHTqyea+EVQ7FRA79wLdf/TspVDpNU1nKMpDrm5p9fL09ZqE+Vu7YLuheQ65dFhd9tjBgGHO5zgoxK7c5o77GQfQCXz4MKWzIDahfQ2fheU+1MHYvCEHfh4EtvKMNzeL7eghW8xbbLYmkRz/w== 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 VI1PR04MB3181.eurprd04.prod.outlook.com (2603:10a6:802:a::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Wed, 27 May 2020 08:53:09 +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.3021.030; Wed, 27 May 2020 08:53:09 +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 v2 6/9] Silicon/NXP: Add Chassis3V2 Package Date: Wed, 27 May 2020 14:21:32 +0530 Message-ID: <20200527085135.16717-7-pankaj.bansal@oss.nxp.com> In-Reply-To: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> References: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) 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 SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Wed, 27 May 2020 08:53:06 +0000 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 493c0e2a-6158-4a3c-9fae-08d8021b610e X-MS-TrafficTypeDiagnostic: VI1PR04MB3181: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: NBKNAkl6vMlBPA/WNrLw2PRW+fxki1eTWP6/qies0CDJKGi4YyqXzRueOCqvqvc4LrkOH5H6WHJCvxn9u4OhE5UNUJUKJerIJ/H12Bb4Ufg7MgcNuEC+PC66ApSQRkAs4PkN4cbHgvMAg1s4HN2WRriA0z5qjlQPfsUFAX/vUF5ASUda2X0UVtUEHlYjxzFDBuk4NiFhEIqjqXbBzaWvn+YrprtR9Dmi6zkMLrTWzhDz9r9+ha3SAlrfWf4wKW8kQ2KWeN3IG7HbvxtoNFP3n4BkHT8jV7MyWyFnXT+ro+E3x+ebwTCc5AuUc+TQRVo3Kzw3s30Yi+sR86oAy1fn3Q== X-MS-Exchange-AntiSpam-MessageData: 4n4z//x6NU1xvnnV3ZoiHqP+mr9bLdH/zxOemaUXz4w4+2jX2GSowb2qR7jInnvpdYh+FNllzsYglGnq5kiCQkofEtVD6RcWsFS2WNBtCdP/eJ9Q1CjqZXLvE5oXlWoiIe183pw7tPxHZ2KsGTqSqS+evgKYZYt7xfCHhde+spHf0XZDLhSlJvy3yjbJBPjB6460WMLku3HmoN4oyFDnnKgoOtkkk+u/n2hoZDfSlHz0K9Gglk0mqBihWbjTioVKJ1ecg3Wy9/NU0K50CnrnLMGxlw1SA8UdqhoTPNftbJNvbTE1VcK2BowuOQ9HNiF3NOqhQJ3U5Fm9JK+j6StkBQOpdRj1b2IkQrMNJO3gzJ2EnbzisXSm5dArUmVyaugWAPOPeDstyplOCK5nQqiXtbdrF0vBltWj96l4rSf7zUghWtFzTQw3tFZ7NBoJmJwJBphRI2slC2Z1Qvf2n8RHI/ygLVWyTHWd6p0dUL0pL0U= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 493c0e2a-6158-4a3c-9fae-08d8021b610e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2020 08:53:09.1224 (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: UjZNjowVavmtRPTctpFmBGVgmSn0zuWApcRn66aYZHlp9TR3Jlq4fzxK97h+XSkLFljavf/u5nuscDaLuHCYOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3181 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: qKeRETqgxTt4H6zBAh1qg9Ivx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590569592; bh=him6zKEMGJLDMBAlcA1nhJQSvmZqcgjNddnCH78/0Fw=; h=Content-Type:Date:From:Reply-To:Subject:To; b=LbyK21riBS4aoHAH/wCOHLsk6MFoz13bQLrCGSVfjyeZBmKI2nm4QnEGjd2R4wd/TDG ULhNYcEhtw1+wnJ9FQ7QskSjIgI97v4hzTHzO2LUXAqcEhU2xe+fNQD98fIQZjq33ngJ0 Doy90f2v7b17RUHbjLmfUtachgVYUjthsbk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pankaj Bansal Chassis3V2 is the new chassis on which LS1028A and LX2160A SOCs are based. Add the Chassis3V2 package. Signed-off-by: Pankaj Bansal --- Notes: V2: - No change Silicon/NXP/Chassis3V2/Chassis3V2.dec | 22 ++++++ Silicon/NXP/Chassis3V2/Chassis3V2.dsc.inc | 10 +++ Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.inf | 33 +++++++++ Silicon/NXP/Chassis3V2/Include/Chassis.h | 26 +++++++ Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.c | 71 ++++++++++++= ++++++++ 5 files changed, 162 insertions(+) diff --git a/Silicon/NXP/Chassis3V2/Chassis3V2.dec b/Silicon/NXP/Chassis3V2= /Chassis3V2.dec new file mode 100644 index 000000000000..f7269e6bf6de --- /dev/null +++ b/Silicon/NXP/Chassis3V2/Chassis3V2.dec @@ -0,0 +1,22 @@ +# @file +# NXP Layerscape processor package. +# +# Copyright 2017, 2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# + +[Defines] + DEC_SPECIFICATION =3D 1.27 + PACKAGE_VERSION =3D 0.1 + +##########################################################################= ###### +# +# Include Section - list of Include Paths that are provided by this packag= e. +# Comments are used for Keywords and Module Types. +# +# +##########################################################################= ###### +[Includes.common] + Include # Root include for the package diff --git a/Silicon/NXP/Chassis3V2/Chassis3V2.dsc.inc b/Silicon/NXP/Chassi= s3V2/Chassis3V2.dsc.inc new file mode 100644 index 000000000000..b9f388a59f2a --- /dev/null +++ b/Silicon/NXP/Chassis3V2/Chassis3V2.dsc.inc @@ -0,0 +1,10 @@ +# @file +# +# Copyright 2018-2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# + +[LibraryClasses.common] + ChassisLib|Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.inf diff --git a/Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.inf b/Sil= icon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.inf new file mode 100644 index 000000000000..75b68cc4ca2d --- /dev/null +++ b/Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.inf @@ -0,0 +1,33 @@ +# @file +# +# Copyright 2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# + +[Defines] + INF_VERSION =3D 1.27 + BASE_NAME =3D Chassis3V2Lib + FILE_GUID =3D fae0d077-5fc2-494f-b8e1-c51a3023ee3e + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D ChassisLib + +[Packages] + ArmPkg/ArmPkg.dec + MdePkg/MdePkg.dec + Silicon/NXP/Chassis3V2/Chassis3V2.dec + Silicon/NXP/NxpQoriqLs.dec + +[LibraryClasses] + IoAccessLib + IoLib + PcdLib + SerialPortLib + +[Sources.common] + ChassisLib.c + +[FeaturePcd] + gNxpQoriqLsTokenSpaceGuid.PcdDcfgBigEndian diff --git a/Silicon/NXP/Chassis3V2/Include/Chassis.h b/Silicon/NXP/Chassis= 3V2/Include/Chassis.h new file mode 100644 index 000000000000..0fd70132d897 --- /dev/null +++ b/Silicon/NXP/Chassis3V2/Include/Chassis.h @@ -0,0 +1,26 @@ +/** @file + + Copyright 2018-2020 NXP + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#ifndef CHASSIS_H__ +#define CHASSIS_H__ + +#include + +#define NXP_LAYERSCAPE_CHASSIS3V2_DCFG_ADDRESS 0x1E00000 + +/** + The Device Configuration Unit provides general purpose configuration and + status for the device. These registers only support 32-bit accesses. +**/ +#pragma pack(1) +typedef struct { + UINT8 Reserved0[0x100 - 0x0]; + UINT32 RcwSr[32]; // Reset Control Word Status Register +} NXP_LAYERSCAPE_CHASSIS3V2_DEVICE_CONFIG; +#pragma pack() + +#endif // CHASSIS_H__ diff --git a/Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.c b/Silic= on/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.c new file mode 100644 index 000000000000..30f8f945b233 --- /dev/null +++ b/Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.c @@ -0,0 +1,71 @@ +/** @file + Chassis specific functions common to all SOCs based on a specific Chessis + + Copyright 2018-2020 NXP + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include +#include + +/** + Read Dcfg register + + @param Address The MMIO register to read. + + @return The value read. +**/ +UINT32 +EFIAPI +DcfgRead32 ( + IN UINTN Address + ) +{ + MMIO_OPERATIONS *DcfgOps; + + DcfgOps =3D GetMmioOperations (FeaturePcdGet (PcdDcfgBigEndian)); + + return DcfgOps->Read32 (Address); +} + +/** + Write Dcfg register + + @param Address The MMIO register to write. + @param Value The value to write to the MMIO register. + + @return Value. +**/ +UINT32 +EFIAPI +DcfgWrite32 ( + IN UINTN Address, + IN UINT32 Value + ) +{ + MMIO_OPERATIONS *DcfgOps; + + DcfgOps =3D GetMmioOperations (FeaturePcdGet (PcdDcfgBigEndian)); + + return DcfgOps->Write32 (Address, Value); +} + +/** + Function to initialize Chassis Specific functions + **/ +VOID +ChassisInit ( + VOID + ) +{ + // + // Early init serial Port to get board information. + // + SerialPortInitialize (); +} --=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 (#60326): https://edk2.groups.io/g/devel/message/60326 Mute This Topic: https://groups.io/mt/74496021/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- From nobody Tue Nov 26 02:29:41 2024 Delivered-To: importer@patchew.org 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+60327+1787277+3901457@groups.io; helo=web01.groups.io; 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+60327+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 1590569595388808.0642355553261; Wed, 27 May 2020 01:53:15 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id tkx5YY1788612xk0y1RBUaU8; Wed, 27 May 2020 01:53:15 -0700 X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.41]) by mx.groups.io with SMTP id smtpd.web10.2241.1590569594257565700 for ; Wed, 27 May 2020 01:53:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F8ZXkHTrMj04f9TKflkJoKyqIRRXabD51GHrwyQncKMrivDWS86SOynKS0hCA1z2V3RIaHCmje3P0HM2fhKNR0duqZI7cr4z9JnuxLL1admCoUyq0KWknyAkMYI2S0WGC2KBlS79EAIZOZBQHM/h/3OGdB9wrUCoEnWC2iw4MkJVmhQYWptR2WcrRaw7+bk5kwN80TjwLto9QOXqrSmPXR05RGNYh5hlNreXQ5zgLfQV+0C6ve0po/4fCMyB4a8xPhvmppRTD4L705ry4IcLQ4JyUoCz+tT/AUaKNUUoiu9hBYbsNrhQfnbOl+uS8wn0nmkyXy/1rwJHXSRMehTW6Q== 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=NNGMXNDbr14x5f/VtXg4LLtEfNTTLkaVM0LaMGhXkyE=; b=CBPyQUNMRNT9CBxwm+vxBZxAK+5POseD7zm5EbyJ5DR4UDupPyehgg02lub2kB3WE0KFUoValRR8m9/8iu9b4LjvbCl84bEP2PClprz5X4OJLzBjQA1at8JEqiXPB02Us8X1f7vRaVfA+KjZ89ptW1VhcaLgwS9aD4YUqistQIxWzLCzlfFsDZbAOl89efaF6z2ZCijm2aSKf57wjVBg3DKUxW4pGOB/7Te5ef5cAqvJuuzPmAtlqyvpL/Jtm2sdZeuPF6BS040bZmgzeScRS6hjtiwEnS4u1V1AZUP5p92bbu7ThjlkMWFvSv8z3F7WiSsiyHyLZPt+DzjpFbNIVA== 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 VI1PR04MB3181.eurprd04.prod.outlook.com (2603:10a6:802:a::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Wed, 27 May 2020 08:53:12 +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.3021.030; Wed, 27 May 2020 08:53:12 +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 v2 7/9] Silicon/NXP: Add LX2160A Soc package Date: Wed, 27 May 2020 14:21:33 +0530 Message-ID: <20200527085135.16717-8-pankaj.bansal@oss.nxp.com> In-Reply-To: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> References: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) 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 SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Wed, 27 May 2020 08:53:09 +0000 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3daf5d1c-2188-45fd-b002-08d8021b62ce X-MS-TrafficTypeDiagnostic: VI1PR04MB3181: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: G1PlgLuFVoJjf7Nm4+EpyZID+sMrCNUM3RR+WnnR/C2/TOcADUQjhz3VRYXI7eiv0YyVPoTd1f2X8Y9WxlUQ9Q6k+kCaT+lLfwOdfxVslHpegztsbZQmgwUf8yUaC8eu4EJTlwOKf61G1B9+lh3UdqQ+3Mn1L9ofL90TJ75OjPjKFx46Lg0ErQxBg00jlesSMlOL61H4ZMNrhuHpvR/MDJX43XeTVMzhALMfkKuI6+qC/NtQ1WUQt+c2Xnqe9G6GBbOFVYsTEw2+e+j1ZUHSq8ETXj0/A3tSzgKYHOpPTVieXjK7SO/Ahf2XFWRtFBZHJDRTa4K57yApExJHzd6Fjw== X-MS-Exchange-AntiSpam-MessageData: +nJizgZfQ7RwKnyozYi6rFBwuNl3ssyFDMpzX2MXL6PUUTCOSk0c+ylqOFHOii1AS/ryDRxKoDbBuJrksQT3lCpYWorIAYekWDhONcfEsPallJm3oSDzMDL0Pv/USYxbeZu9syD0nD6WQh5qZT3LfKZYuzobeXRBpQXQ1b0DrTzHAv3X9SwVRqR5RVAmLPSdu58bNX89sll4UK/5CskkoJFNNdJLdB2A1oW6aOgWL1GoToi4wui/Cdhnf4c4aNpOj/IKEqY7sccj56BUbljD363/IrYUmGeXri8UYG9PUstdcZwrkHpUOdRZ331WwnjqVytNSmserOCb3kz6Mh942FAV40D8J0vh05VaminR7v9bkreWyVlpQA1UB/HgE+L/NT4Yn0AmHD8I1uuuGdtNBc/d85ZkaFOztKfHLSBkjyeNNLCJOD5ZmF76AZmnx4o7jO2BmbHQUWc8YdktaLmqP0Ok8rjIE3/e3k7aoNwF1vw= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3daf5d1c-2188-45fd-b002-08d8021b62ce X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2020 08:53:12.0519 (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: lUKkGArzdkiJ6vTulBKo621U51h9s9V2kIEb1bEa7cF30mzHeZ/38jOsRnFVWYUoeVZEdKkZeLvHTl5X+P+bHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3181 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: n1HKv087GZNWd9gDikbHKd9px1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590569595; bh=6K8ZKmwk88dhbU3xDtcDpEdvz1TZ81WBTHj96p43PGQ=; h=Content-Type:Date:From:Reply-To:Subject:To; b=OkA74BgYT/SszviBPLj8DU2Zy7F9Ytjh0hS0/QaUobH9ZJldN3riRFCQZ3cuqHGBlqx DGpvf/DSocwLRWRawJRdZqiZJOiegGqqwqbxqTjKl8FEYYEwGbhIGxePM4Wh/nHVpICrO gD3x8+WQM9tVCUyPyCo2DUDvFhgETaGgDms= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pankaj Bansal LX2160A is QorIq Layerscape multicore communications processor with sixteen Arm Cortex-A72 cores. This SOC is based on Layerscape Chassis v3.2. Signed-off-by: Pankaj Bansal --- Notes: V2: - No change Silicon/NXP/LX2160A/LX2160A.dec | 13 ++++ Silicon/NXP/LX2160A/LX2160A.dsc.inc | 50 ++++++++++++ Silicon/NXP/LX2160A/Library/SocLib/SocLib.inf | 27 +++++++ Silicon/NXP/LX2160A/Include/Soc.h | 38 ++++++++++ Silicon/NXP/LX2160A/Library/SocLib/SocLib.c | 80 ++++++++++++++++++++ 5 files changed, 208 insertions(+) diff --git a/Silicon/NXP/LX2160A/LX2160A.dec b/Silicon/NXP/LX2160A/LX2160A.= dec new file mode 100644 index 000000000000..50481c0f2ebd --- /dev/null +++ b/Silicon/NXP/LX2160A/LX2160A.dec @@ -0,0 +1,13 @@ +# LX2160A.dec +# +# Copyright 2018, 2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# + +[Defines] + DEC_SPECIFICATION =3D 0x0001001A + +[Includes] + Include diff --git a/Silicon/NXP/LX2160A/LX2160A.dsc.inc b/Silicon/NXP/LX2160A/LX21= 60A.dsc.inc new file mode 100644 index 000000000000..af22b4dd973c --- /dev/null +++ b/Silicon/NXP/LX2160A/LX2160A.dsc.inc @@ -0,0 +1,50 @@ +# LX2160A.dsc +# LX2160A Soc package. +# +# Copyright 2018-2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# + +!include Silicon/NXP/Chassis3V2/Chassis3V2.dsc.inc + +[LibraryClasses.common] + SocLib|Silicon/NXP/LX2160A/Library/SocLib/SocLib.inf + + PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf + SerialPortLib|ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortL= ib.inf + PL011UartClockLib|Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLi= b.inf + +##########################################################################= ###### +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +##########################################################################= ###### +[PcdsDynamicDefault.common] + # + # ARM General Interrupt Controller + gArmTokenSpaceGuid.PcdGicDistributorBase|0x6000000 + gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x6200000 + gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0xC0C0000 + +[PcdsFixedAtBuild.common] + gArmTokenSpaceGuid.PcdGenericWatchdogControlBase|0x23A0000 + gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase|0x2390000 + gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum|91 + + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x21C0000 + +[PcdsFeatureFlag] + gNxpQoriqLsTokenSpaceGuid.PcdI2cErratumA009203|TRUE + +##########################################################################= ###### +# +# Components Section - list of all EDK II Modules needed by this Platform +# +##########################################################################= ###### +[Components.common] + ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf + +## diff --git a/Silicon/NXP/LX2160A/Library/SocLib/SocLib.inf b/Silicon/NXP/LX= 2160A/Library/SocLib/SocLib.inf new file mode 100644 index 000000000000..421072b88019 --- /dev/null +++ b/Silicon/NXP/LX2160A/Library/SocLib/SocLib.inf @@ -0,0 +1,27 @@ +# @file +# +# Copyright 2018-2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D SocLib + FILE_GUID =3D 3b233a6a-0ee1-42a3-a7f7-c285b5ba80dc + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D SocLib + +[Packages] + MdePkg/MdePkg.dec + Silicon/NXP/Chassis3V2/Chassis3V2.dec + Silicon/NXP/LX2160A/LX2160A.dec + Silicon/NXP/NxpQoriqLs.dec + +[LibraryClasses] + ChassisLib + DebugLib + +[Sources.common] + SocLib.c diff --git a/Silicon/NXP/LX2160A/Include/Soc.h b/Silicon/NXP/LX2160A/Includ= e/Soc.h new file mode 100644 index 000000000000..52674ee5f32c --- /dev/null +++ b/Silicon/NXP/LX2160A/Include/Soc.h @@ -0,0 +1,38 @@ +/** @file + + Copyright 2018-2020 NXP + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#ifndef SOC_H__ +#define SOC_H__ + +#include + +/** + Soc Memory Map +**/ +#define LX2160A_DRAM0_PHYS_ADDRESS (BASE_2GB) +#define LX2160A_DRAM0_SIZE (SIZE_2GB) +#define LX2160A_DRAM1_PHYS_ADDRESS (BASE_128GB + BASE_2GB) +#define LX2160A_DRAM1_SIZE (SIZE_128GB - SIZE_2GB) // 126 GB +#define LX2160A_DRAM2_PHYS_ADDRESS (BASE_256GB + BASE_128GB) +#define LX2160A_DRAM2_SIZE (SIZE_128GB) + +#define LX2160A_CCSR_PHYS_ADDRESS (BASE_16MB) +#define LX2160A_CCSR_SIZE (SIZE_256MB - SIZE_16MB) // 240MB + +#define LX2160A_FSPI0_PHYS_ADDRESS (BASE_512MB) +#define LX2160A_FSPI0_SIZE (SIZE_256MB) + +#define LX2160A_DCFG_ADDRESS NXP_LAYERSCAPE_CHASSIS3V2_DCFG_ADDRESS + +/** + Reset Control Word (RCW) Bits +**/ +#define SYS_PLL_RAT(x) (((x) & 0x7c) >> 2) // Bits 2-6 + +typedef NXP_LAYERSCAPE_CHASSIS3V2_DEVICE_CONFIG LX2160A_DEVICE_CONFIG; + +#endif // SOC_H__ diff --git a/Silicon/NXP/LX2160A/Library/SocLib/SocLib.c b/Silicon/NXP/LX21= 60A/Library/SocLib/SocLib.c new file mode 100644 index 000000000000..6f774eb7dc6c --- /dev/null +++ b/Silicon/NXP/LX2160A/Library/SocLib/SocLib.c @@ -0,0 +1,80 @@ +/** @Soc.c + SoC specific Library containg functions to initialize various SoC compon= ents + + Copyright 2018-2020 NXP + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include + +/** + Return the input clock frequency to an IP Module. + This function reads the RCW bits and calculates the PLL multiplier/divi= der + values to be applied to various IP modules. + If a module is disabled or doesn't exist on platform, then return zero. + + @param[in] BaseClock Base clock to which PLL multiplier/divider values= is + to be applied. + @param[in] ClockType Variable of Type NXP_IP_CLOCK. Indicates which IP= clock + is to be retrieved. + @param[in] Args Variable argument list which is parsed based on + ClockType. e.g. if the ClockType is NXP_I2C_CLOCK= , then + the second argument will be interpreted as contro= ller + number. e.g. if there are four i2c controllers in= SOC, + then this value can be 0, 1, 2, 3 + e.g. if ClockType is NXP_CORE_CLOCK, then second + argument is interpreted as cluster number and thi= rd + argument is interpreted as core number (within the + cluster) + + @return Actual Clock Frequency. Return value 0 should be + interpreted as clock not being provided to IP. +**/ +UINT64 +SocGetClock ( + IN UINT64 BaseClock, + IN NXP_IP_CLOCK ClockType, + IN VA_LIST Args + ) +{ + LX2160A_DEVICE_CONFIG *Dcfg; + UINT32 RcwSr; + UINT64 ReturnValue; + + ReturnValue =3D 0; + Dcfg =3D (LX2160A_DEVICE_CONFIG *)LX2160A_DCFG_ADDRESS; + + switch (ClockType) { + case NXP_UART_CLOCK: + RcwSr =3D DcfgRead32 ((UINTN)&Dcfg->RcwSr[0]); + ReturnValue =3D (BaseClock * SYS_PLL_RAT (RcwSr)) >> 3; + break; + case NXP_I2C_CLOCK: + RcwSr =3D DcfgRead32 ((UINTN)&Dcfg->RcwSr[0]); + ReturnValue =3D (BaseClock * SYS_PLL_RAT (RcwSr)) >> 4; + break; + default: + break; + } + + return ReturnValue; +} + +/** + Function to initialize SoC specific constructs + **/ +VOID +SocInit ( + VOID + ) +{ + ChassisInit (); + + return; +} --=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 (#60327): https://edk2.groups.io/g/devel/message/60327 Mute This Topic: https://groups.io/mt/74496023/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- From nobody Tue Nov 26 02:29:41 2024 Delivered-To: importer@patchew.org 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+60328+1787277+3901457@groups.io; helo=web01.groups.io; 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+60328+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 1590569598868190.8888243280495; Wed, 27 May 2020 01:53:18 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 2LQkYY1788612xNconXFi7z4; Wed, 27 May 2020 01:53:18 -0700 X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.84]) by mx.groups.io with SMTP id smtpd.web12.2306.1590569597593838125 for ; Wed, 27 May 2020 01:53:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hnxuKDjlrAsH0LqUkWEtFVWuFuQIfsf4Vmnd7O85XcLGc6vmH67ftIyDixW+CxJa20ieF//p+OaqtboMXIdUFNO/Tnrr3YLi7ReBcoDe0qpo9liZNDLeKnZQ3x1xLRFj6F3Fdg2AKs9+Z2kh+JSKNWCcWgIvRrKgIfjsJMld5xDs+bmG+pnFKCrlzz09Y8NdsTE1alsqSxE8FmvCVRecfV0kJEl+/b2vY4YEEP8YHclRpxSBcb7hcmq/PKiJYg607rRf4A+vg0VHF2PYmYwIDuC01vfyOJldO99MJ9vAeYst0bH/Vr5w+kdxyj4lBLH51gBKPsmiaUWuLF/BYrx2vw== 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=QoQhTRinEXtn1mUOztHYiRGRkj2+exYDgCpvcExOSzs=; b=EJXL5ZzNSuXxeiKZvLestYrGqawC9uLR05RM8OSdtJh6agY18WSqdpd6C/roxt2F+XZB6odNuf0E2L8GTg2G+ORenOiF3DgATeKLQauBjCZjNF0iP6FuwXo7fa+CwrbksP8L6Ps0rGAI+4jO3RyzvMUM0y/IF0owiMwd7Ko8F6nck9CX85O0w5A9myo5j96x9kbERYJvZpiSXL8w7s2XmHsDxXm1/BTMn6uPlZf6Ta6FPcw+smEZDeBWI2ZIBj3ZICAxN9WZjfsY0BbKWQsYTvgj9mArYSSh8izKL6TFLL3D/fcNpYh8XVdKsV33dYiXUKDDlZ8byPwv/6sU+5pmaw== 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 VI1PR04MB3181.eurprd04.prod.outlook.com (2603:10a6:802:a::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Wed, 27 May 2020 08:53:15 +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.3021.030; Wed, 27 May 2020 08:53:15 +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 v2 8/9] Platform/NXP: Add LX2160ARDB Platform Date: Wed, 27 May 2020 14:21:34 +0530 Message-ID: <20200527085135.16717-9-pankaj.bansal@oss.nxp.com> In-Reply-To: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> References: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) 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 SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Wed, 27 May 2020 08:53:12 +0000 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 650dc20f-462c-474d-d199-08d8021b648f X-MS-TrafficTypeDiagnostic: VI1PR04MB3181: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:162; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: IjQUI/bE21zweyeKa97UCmjmsz2xI6BXs+H14/FHYxhSPkJFHCCFFeM9qEgKZAXNTbCo4fK9qDNZYEHExOFL1Qb8QVt/B2hIOUIE7/eCupb2ZVZaQYOJfhZV/vz3Byth8/62+r8LtJgacEd7bpSemHf1xQi8K1BA9T9vzEobGSWlPk9s8PCuT8gpy1QKLGmAPgHTgUPEiy5CoTMY3x4Q3zoVdLfJKkWAKF4WxaD0YK/nZFgWcb8KmnbsMkjMVZDKFchGyq2fpx6YjRp1eVQpZpICKF2DBNDeJFqm4gAElG3SSfpezvNG9C661oypyKpxzItqOBIS0Z3UjMGkHNtsMA== X-MS-Exchange-AntiSpam-MessageData: U4JQ2oosKtGNs3vqxLqey180r9B0vQC8Q/M1ScPevuMNbCj7pjI0vR0H0aGk83zdAltD5DYkFHbvBUYX70O9fsEq7NRDL8NrP29NVKVBZIdazNrzIgXhiklxtAMw01XFDEvn4oQ3EtHbzjSA5dGAj3j36fhEu3vECBYcq3JwSfwdtN98I2q18zo28zUWcqMd/cyjIOMr6voj0nc1Nz2v3SVg/tyHTRh4VZWbdI0ArVmXa9cd3G2tMAjSKDXPwe/uhQ9quafVsEyfd9k4d/dxWJHhOeGY9w3RNZfnYumPuLiBRiVUZ2KX7ETIQZkQMQRJt4m+tC8MFZ8A5znFBdyw24v6oQBNHR9O7QKaptE+IzLYnaQaN3AcAHRNB6r+JuHvAg1BhX816rcnrLr/xzcu1AC2Rp1IhzIwj8CbYcb7y5R9brC2gB7973bE4oA2FMx/27EolIB4nxvjMg3Tn1Cy8RO7Aw4qYtMPM0AkMhH/Hxs= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 650dc20f-462c-474d-d199-08d8021b648f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2020 08:53:15.1572 (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: 4WmidjwS6pl1v/OMbMxDYB4Mc/nwdOtqoGEeP+PV3vS9TsuSwdVb4TWdWDHLzm4VoHYWfLQ44E7jgk0B0FxBAQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3181 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: uJxEdDTEarTunOtBJBBRn8WEx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590569598; bh=kZdtH3Lfzx0QnsNwGyJ57sevyGAyCcKoe4eDc2Wrpcs=; h=Content-Type:Date:From:Reply-To:Subject:To; b=IEBc9VLNRMNc7j+tzTKtTO43Fiiy6Xuw40PSz/biBxmfEcCX653IeLyOy8Og9cN/i0n EjOJYbD7UGoQd6TgfAvcO5egRZggL+emq4G1+MvmFf6gLm1ySI/iD9yyXnwJxsInhnx3E oS9Y22JfJsZftYUY/RxYK/2w7QPzi32yTDs= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pankaj Bansal LX2160A Reference Design Board (RDB) is a high-performance development platform that supports the QorIQ LX2160A Layerscape Architecture SOCs. Signed-off-by: Pankaj Bansal Reviewed-by: Leif Lindholm --- Notes: V2: - split Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ in two parts part containing gPlatformGetClockPpi is put before PL011UartClockLib implementation. Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.dec | 2= 3 +++ Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.dsc | 4= 6 ++++++ Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.fdf | 16= 8 ++++++++++++++++++++ Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.inf | = 3 + Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.c | = 4 +- Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c | 5= 4 ++++++- 6 files changed, 296 insertions(+), 2 deletions(-) diff --git a/Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.dec b/Platform/NXP/LX= 2160aRdbPkg/LX2160aRdbPkg.dec new file mode 100644 index 000000000000..03996b07fcb9 --- /dev/null +++ b/Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.dec @@ -0,0 +1,23 @@ +# LX2160aRdbPkg.dec +# LX2160a board package. +# +# Copyright 2018, 2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +[Defines] + PACKAGE_NAME =3D LX2160aRdbPkg + PACKAGE_GUID =3D 474e0c59-5f77-4060-82dd-9025ee4f4939 + +##########################################################################= ###### +# +# Include Section - list of Include Paths that are provided by this packag= e. +# Comments are used for Keywords and Module Types. +# +# Supported Module Types: +# BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_D= RIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION +# +##########################################################################= ###### +[Includes.common] + Include # Root include for the package diff --git a/Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.dsc b/Platform/NXP/LX= 2160aRdbPkg/LX2160aRdbPkg.dsc new file mode 100644 index 000000000000..9b3e0386c13e --- /dev/null +++ b/Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.dsc @@ -0,0 +1,46 @@ +# LX2160aRdbPkg.dsc +# +# LX2160ARDB Board package. +# +# Copyright 2018-2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +##########################################################################= ###### +# +# Defines Section - statements that will be processed to create a Makefile. +# +##########################################################################= ###### +[Defines] + # + # Defines for default states. These can be changed on the command line. + # -D FLAG=3DVALUE + # + PLATFORM_NAME =3D LX2160aRdbPkg + PLATFORM_GUID =3D be06d8bc-05eb-44d6-b39f-191e93617ebd + OUTPUT_DIRECTORY =3D Build/LX2160aRdbPkg + FLASH_DEFINITION =3D Platform/NXP/LX2160aRdbPkg/LX2160aRdb= Pkg.fdf + +!include Silicon/NXP/NxpQoriqLs.dsc.inc +!include Silicon/NXP/LX2160A/LX2160A.dsc.inc + +[LibraryClasses.common] + ArmPlatformLib|Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlat= formLib.inf + RealTimeClockLib|EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualReal= TimeClockLib.inf + +##########################################################################= ###### +# +# Components Section - list of all EDK II Modules needed by this Platform +# +##########################################################################= ###### +[Components.common] + # + # Architectural Protocols + # + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { + + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE + } + + ## diff --git a/Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.fdf b/Platform/NXP/LX= 2160aRdbPkg/LX2160aRdbPkg.fdf new file mode 100644 index 000000000000..19d2ca9bbe58 --- /dev/null +++ b/Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.fdf @@ -0,0 +1,168 @@ +# LX2160aRdbPkg.fdf +# +# FLASH layout file for LX2160a board. +# +# Copyright 2018-2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +##########################################################################= ###### +# +# FD Section +# The [FD] Section is made up of the definition statements and a +# description of what goes into the Flash Device Image. Each FD section +# defines one flash "device" image. A flash device image may be one of +# the following: Removable media bootable image (like a boot floppy +# image,) an Option ROM image (that would be "flashed" into an add-in +# card,) a System "Flash" image (that would be burned into a system's +# flash) or an Update ("Capsule") image that will be used to update and +# existing system flash. +# +##########################################################################= ###### + +[FD.LX2160ARDB_EFI] +BaseAddress =3D 0x82000000|gArmTokenSpaceGuid.PcdFdBaseAddress #The bas= e address of the FLASH Device. +Size =3D 0x00140000|gArmTokenSpaceGuid.PcdFdSize #The siz= e in bytes of the FLASH Device +ErasePolarity =3D 1 +BlockSize =3D 0x10000 +NumBlocks =3D 0x14 + +##########################################################################= ###### +# +# Following are lists of FD Region layout which correspond to the location= s of different +# images within the flash device. +# +# Regions must be defined in ascending order and may not overlap. +# +# A Layout Region start with a eight digit hex offset (leading "0x" requir= ed) followed by +# the pipe "|" character, followed by the size of the region, also in hex = with the leading +# "0x" characters. Like: +# Offset|Size +# PcdOffsetCName|PcdSizeCName +# RegionType +# +##########################################################################= ###### +0x00000000|0x00140000 +gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize +FV =3D FVMAIN_COMPACT + +!include Platform/NXP/FVRules.fdf.inc +##########################################################################= ###### +# +# FV Section +# +# [FV] section is used to define what components or modules are placed wit= hin a flash +# device file. This section also defines order the components and modules= are positioned +# within the image. The [FV] section consists of define statements, set s= tatements and +# module statements. +# +##########################################################################= ###### + +[FV.FvMain] +FvNameGuid =3D 1037c42b-8452-4c41-aac7-41e6c31468da +BlockSize =3D 0x1 +NumBlocks =3D 0 # This FV gets compressed so make it just= big enough +FvAlignment =3D 8 # FV alignment and FV attributes setting. +ERASE_POLARITY =3D 1 +MEMORY_MAPPED =3D TRUE +STICKY_WRITE =3D TRUE +LOCK_CAP =3D TRUE +LOCK_STATUS =3D TRUE +WRITE_DISABLED_CAP =3D TRUE +WRITE_ENABLED_CAP =3D TRUE +WRITE_STATUS =3D TRUE +WRITE_LOCK_CAP =3D TRUE +WRITE_LOCK_STATUS =3D TRUE +READ_DISABLED_CAP =3D TRUE +READ_ENABLED_CAP =3D TRUE +READ_STATUS =3D TRUE +READ_LOCK_CAP =3D TRUE +READ_LOCK_STATUS =3D TRUE + + INF MdeModulePkg/Core/Dxe/DxeMain.inf + INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf + + # + # PI DXE Drivers producing Architectural Protocols (EFI Services) + # + INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf + + INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf + INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf + INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf + INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRu= ntimeDxe.inf + INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.i= nf + INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf + INF MdeModulePkg/Universal/Metronome/Metronome.inf + INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf + + # + # Multiple Console IO support + # + INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf + INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf + INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe= .inf + INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf + INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf + + INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf + INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf + INF ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf + + # + # FAT filesystem + GPT/MBR partitioning + # + INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf + INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf + INF FatPkg/EnhancedFatDxe/Fat.inf + INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.i= nf + + # + # UEFI application (Shell Embedded Boot Loader) + # + INF ShellPkg/Application/Shell/Shell.inf + + # + # Bds + # + INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf + INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf + INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf + INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf + INF MdeModulePkg/Application/UiApp/UiApp.inf + +[FV.FVMAIN_COMPACT] +FvAlignment =3D 8 +ERASE_POLARITY =3D 1 +MEMORY_MAPPED =3D TRUE +STICKY_WRITE =3D TRUE +LOCK_CAP =3D TRUE +LOCK_STATUS =3D TRUE +WRITE_DISABLED_CAP =3D TRUE +WRITE_ENABLED_CAP =3D TRUE +WRITE_STATUS =3D TRUE +WRITE_LOCK_CAP =3D TRUE +WRITE_LOCK_STATUS =3D TRUE +READ_DISABLED_CAP =3D TRUE +READ_ENABLED_CAP =3D TRUE +READ_STATUS =3D TRUE +READ_LOCK_CAP =3D TRUE +READ_LOCK_STATUS =3D TRUE + + INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf + INF MdeModulePkg/Core/Pei/PeiMain.inf + INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf + INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.i= nf + INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf + INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf + INF ArmPkg/Drivers/CpuPei/CpuPei.inf + INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf + INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf + + FILE FV_IMAGE =3D 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { + SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRE= D =3D TRUE { + SECTION FV_IMAGE =3D FVMAIN + } + } diff --git a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformL= ib.inf b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.i= nf index 743836e57141..692ba74ec59e 100644 --- a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.inf +++ b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.inf @@ -19,9 +19,12 @@ ArmPkg/ArmPkg.dec ArmPlatformPkg/ArmPlatformPkg.dec Silicon/NXP/NxpQoriqLs.dec + Silicon/NXP/Chassis3V2/Chassis3V2.dec + Silicon/NXP/LX2160A/LX2160A.dec =20 [LibraryClasses] ArmLib + SocLib DebugLib =20 [Sources.common] diff --git a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformL= ib.c b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.c index 806cfd180bee..f3f1e5b3f220 100644 --- a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.c +++ b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.c @@ -8,6 +8,7 @@ =20 #include #include +#include =20 #include #include @@ -76,6 +77,7 @@ NxpPlatformGetClock( case NXP_I2C_CLOCK: case NXP_UART_CLOCK: Clock =3D NxpPlatformGetClock (NXP_SYSTEM_CLOCK); + Clock =3D SocGetClock (Clock, ClockType, Args); break; default: break; @@ -98,7 +100,7 @@ ArmPlatformInitialize ( IN UINTN MpId ) { - //TODO: Implement me + SocInit (); =20 return EFI_SUCCESS; } diff --git a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformL= ibMem.c b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLibM= em.c index ad6862dd81eb..391dab265ad7 100644 --- a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c +++ b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c @@ -7,7 +7,12 @@ **/ =20 #include +#include #include +#include +#include + +#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 6 =20 /** Return the Virtual Memory Map of your platform @@ -24,5 +29,52 @@ ArmPlatformGetVirtualMemoryMap ( IN ARM_MEMORY_REGION_DESCRIPTOR** VirtualMemoryMap ) { - ASSERT(0); + UINTN Index; + ARM_MEMORY_REGION_DESCRIPTOR *VirtualMemoryTable; + + Index =3D 0; + + ASSERT (VirtualMemoryMap !=3D NULL); + + VirtualMemoryTable =3D AllocatePool (sizeof (ARM_MEMORY_REGION_DESCRIPTO= R) * + MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS); + + if (VirtualMemoryTable =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __FUNCTION_= _)); + return; + } + + VirtualMemoryTable[Index].PhysicalBase =3D LX2160A_DRAM0_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LX2160A_DRAM0_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LX2160A_DRAM0_SIZE; + VirtualMemoryTable[Index++].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_W= RITE_BACK; + + VirtualMemoryTable[Index].PhysicalBase =3D LX2160A_DRAM1_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LX2160A_DRAM1_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LX2160A_DRAM1_SIZE; + VirtualMemoryTable[Index++].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_W= RITE_BACK; + + VirtualMemoryTable[Index].PhysicalBase =3D LX2160A_DRAM2_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LX2160A_DRAM2_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LX2160A_DRAM2_SIZE; + VirtualMemoryTable[Index++].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_W= RITE_BACK; + + // CCSR Space + VirtualMemoryTable[Index].PhysicalBase =3D LX2160A_CCSR_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LX2160A_CCSR_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LX2160A_CCSR_SIZE; + VirtualMemoryTable[Index++].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_D= EVICE; + + // FlexSPI + VirtualMemoryTable[Index].PhysicalBase =3D LX2160A_FSPI0_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LX2160A_FSPI0_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LX2160A_FSPI0_SIZE; + VirtualMemoryTable[Index++].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_D= EVICE; + + // End of Table + ZeroMem (&VirtualMemoryTable[Index], sizeof (ARM_MEMORY_REGION_DESCRIPTO= R)); + + ASSERT (Index < MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS); + + *VirtualMemoryMap =3D VirtualMemoryTable; } --=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 (#60328): https://edk2.groups.io/g/devel/message/60328 Mute This Topic: https://groups.io/mt/74496024/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- From nobody Tue Nov 26 02:29:41 2024 Delivered-To: importer@patchew.org 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+60329+1787277+3901457@groups.io; helo=web01.groups.io; 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+60329+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 15905696026801004.4245594027568; Wed, 27 May 2020 01:53:22 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 3ENPYY1788612xvvXdoJYKkD; Wed, 27 May 2020 01:53:22 -0700 X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.70]) by mx.groups.io with SMTP id smtpd.web11.2226.1590569601589081627 for ; Wed, 27 May 2020 01:53:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EZJXZufmxwo+6dx3wZxCpTRlcfdQj6Jon+O4wKVSRGpeIsF/Rk/aL4zeTD2QTyDyCWUluVWEH+gWBcK+EyRzZsBoApdxGAT9KYF6seaK3FUKvPEqqarya/mQeh/MVezu/ank1t87bp1XnHeaexkmHi0p+p7bBNVj/JZUBBcwoGGtSfeLBarZEEPWcRC/J//M2LZUPb8k5sAsW9pc7WtV97kQK15pA5O73MUJypgQHJJP9i7zUmcC8Rcp4BgdpsqVA7Ie5lejVm+6Te4TmPN4ehDcxT574TYr3lj6lpVHi4re7ig7xynEgUI08dNKPbUrpl8IuQiUmOu7zuQ4GIDJUQ== 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=x3qkXHnApGBwhQsPbRvmVXHZ4CIhXvS5Qg43+05LmPg=; b=hIo3/c8IbqdpcqLqPV6UyWzpenEFVf2teFFqyx2XGcwQSYh5NXe5pOq7PnmC02rq+/SNmP97a1qqpR80m4IR7T3FZZJ+FIC49btkyl+1VhEmt+rzixyUY+kog0pNNi7qOFt8o2/AOdd1zanUE31CvQYuDqX3CN6gu2UvozAk7LHbtyhUvYBBvL/zB88h9NzlWhQpbBYI7DbIFN0+g4kgJq2gaIuV+GPlkpbDRLUlUkUJiC22XPIEHicFIXBPo4Km0LokHIFBNcaIFfqHeyutfpyoeop0O/CR11h6KOhSMUbpG+ju5gUKVUa/9fGinACJCsg/A2B86XRsUU0b9Jho1g== 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 VI1PR04MB3181.eurprd04.prod.outlook.com (2603:10a6:802:a::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Wed, 27 May 2020 08:53:19 +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.3021.030; Wed, 27 May 2020 08:53:19 +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 v2 9/9] Platform/NXP/LX2160aRdbPkg: Add VarStore Date: Wed, 27 May 2020 14:21:35 +0530 Message-ID: <20200527085135.16717-10-pankaj.bansal@oss.nxp.com> In-Reply-To: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> References: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) 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 SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Wed, 27 May 2020 08:53:16 +0000 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3c909ab2-18ae-456a-bf92-08d8021b671f X-MS-TrafficTypeDiagnostic: VI1PR04MB3181: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: n7dDVX2JZw78Xn0zPwCPVVqyACVqw49FhgUJgU3LWSBqqzJHSIc++OOFsSmqc04F6VeX4W0sL6plswvcTn24MYoE5aiglgVH1mNpVozYzvPTlZUdn67jaOIheoKSWorMhruIpFUt/w4n+98XKAUWid4oKVG5Q9+xVJ/nG7s+7gPiPIUL3snGawHquhNLYQmY364Bo5MoeCk+RIAMn6HEO7BykW9fu0Fsb+9Gik7pD3wusJYvZiXAQq6FufSvIU1L54udLDD7ioszJlfmo1fChFwqJC96KEpHEkYYP+qRtvutriUIIo7TQuoeOoAeJSAD X-MS-Exchange-AntiSpam-MessageData: tcsZ0QUM6KC0qXotIcXmoxHuwHjOH+dof715LpJD52Dj2SX1bKZAY5jJ43JNldLQgbLqxwiWfFPwisF5IxzpJz0Ver1qvfEZhhiY4ClhDNTKBhoBkrKW+ZVfNn/HnBIJSCzFK7Oe3zkP/KxZVqiX35cKusDd8W0Iqcg7D0MIyn1nWFdM6CqXIdCf7D6QE7+Wbxu5sWWWrwpuV65S/t2xdf8YL+WCPpqzEAlG7+kKxkojIP+09xw73iqierupjBnhaS3KszYHwlWv6E/AxXJlAsU89MavEUpnknq+noe6m/OPFsAcw3C/pDeBXCoQVDyfebUTd4CfAhEUgzrC6/AbgFrflw/wJ5Xj3bYI99KTjPsrRjs/1ZFIDGryjxBXS5RK1v7SniBQ8D6C/ENCQIG/fTe1wTUyz41ikh3+0o7nroO6HwTopX4SywwrUFWr9qS/Tf+M/zOVtNJzGxSQt5KwFT6ou+DgpgJG2//2TRDyMa4= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c909ab2-18ae-456a-bf92-08d8021b671f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2020 08:53:19.3899 (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: +x5+NVxy/6Vwe0hlHXUPaaHsg4r1daszbz5JnKMMc+x1INX2wEEuuAeTUr4UKzayNwGeRn07rfHx6WBFC4ofHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3181 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: MXbuC263vKp84naOy1KQyp8Bx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590569602; bh=B3pzxVRmRbM3b2llkIP0ZMaQ+ceAsPDtzSFwh/z/MRI=; h=Content-Type:Date:From:Reply-To:Subject:To; b=FEpg1wYM+TV6vM5Sjqk+ATOCqdm96mKspI0B4/F2yfOGH5iSGwKuVR4V3CMoNY3jW9V XAV8SIcRGEQEFUFBVwyMY5U3ATub0guUPwSOmOuNCczDxZeUmSvVtalE9YqY/yDkDbEZm Xe0O1+PGv8gzlViCED/alP6TUXwQulvH0MQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pankaj Bansal Add VarStore Fd. This Fd is used to store non volatile variables in flash. Signed-off-by: Pankaj Bansal --- Notes: V2: - No change Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.fdf | 1 + Platform/NXP/LX2160aRdbPkg/VarStore.fdf.inc | 91 ++++++++++++++++++++ 2 files changed, 92 insertions(+) diff --git a/Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.fdf b/Platform/NXP/LX= 2160aRdbPkg/LX2160aRdbPkg.fdf index 19d2ca9bbe58..eec1c0774a86 100644 --- a/Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.fdf +++ b/Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.fdf @@ -48,6 +48,7 @@ gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.Pc= dFvSize FV =3D FVMAIN_COMPACT =20 !include Platform/NXP/FVRules.fdf.inc +!include VarStore.fdf.inc ##########################################################################= ###### # # FV Section diff --git a/Platform/NXP/LX2160aRdbPkg/VarStore.fdf.inc b/Platform/NXP/LX2= 160aRdbPkg/VarStore.fdf.inc new file mode 100644 index 000000000000..799eee87193f --- /dev/null +++ b/Platform/NXP/LX2160aRdbPkg/VarStore.fdf.inc @@ -0,0 +1,91 @@ +## @file +# FDF include file with FD definition that defines an empty variable stor= e. +# +# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved. +# Copyright (C) 2014, Red Hat, Inc. +# Copyright (c) 2016, Linaro, Ltd. All rights reserved. +# Copyright (c) 2016, Freescale Semiconductor. All rights reserved. +# Copyright 2017-2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[FD.LX2160aRdbNv_EFI] +BaseAddress =3D 0x20500000 #The base address of the FLASH device +Size =3D 0x000C0000 #The size in bytes of the FLASH device +ErasePolarity =3D 1 +BlockSize =3D 0x1000 +NumBlocks =3D 0xC0 + +# +# Place NV Storage just above Platform Data Base +# +DEFINE NVRAM_AREA_VARIABLE_BASE =3D 0x00000000 +DEFINE NVRAM_AREA_VARIABLE_SIZE =3D 0x00040000 +DEFINE FTW_WORKING_BASE =3D $(NVRAM_AREA_VARIABLE_B= ASE) + $(NVRAM_AREA_VARIABLE_SIZE) +DEFINE FTW_WORKING_SIZE =3D 0x00040000 +DEFINE FTW_SPARE_BASE =3D $(FTW_WORKING_BASE) + $= (FTW_WORKING_SIZE) +DEFINE FTW_SPARE_SIZE =3D 0x00040000 + +##########################################################################= ### +# LX2160ARDB NVRAM Area +# LX2160ARDB NVRAM Area contains: Variable + FTW Working + FTW Spare +##########################################################################= ### + + +$(NVRAM_AREA_VARIABLE_BASE)|$(NVRAM_AREA_VARIABLE_SIZE) +gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|gEfiMdeModu= lePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize +#NV_VARIABLE_STORE +DATA =3D { + ## This is the EFI_FIRMWARE_VOLUME_HEADER + # ZeroVector [] + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + # FileSystemGuid: gEfiSystemNvDataFvGuid =3D + # { 0xFFF12B8D, 0x7696, 0x4C8B, + # { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }} + 0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C, + 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50, + # FvLength: Flash Size : 0x4000000 + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, + # Signature "_FVH" # Attributes + 0x5f, 0x46, 0x56, 0x48, 0x36, 0x0E, 0x00, 0x00, + # HeaderLength # CheckSum # ExtHeaderOffset #Reserved #Revision + 0x48, 0x00, 0x08, 0xA6, 0x00, 0x00, 0x00, 0x02, + # Blockmap[0]: 0x4000 Blocks * 0x1000 Bytes / Block =3D SIZE_64MB + 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + # Blockmap[1]: End + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + ## This is the VARIABLE_STORE_HEADER + # It is compatible with SECURE_BOOT_ENABLE =3D=3D FALSE as well. + # Signature: gEfiVariableGuid =3D + # { 0xddcf3616, 0x3275, 0x4164, + # { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }} + 0x16, 0x36, 0xcf, 0xdd, 0x75, 0x32, 0x64, 0x41, + 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d, + # Size: 0x40000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariabl= eSize) - + # 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) =3D 0x3ffb8 + # This can speed up the Variable Dispatch a bit. + 0xB8, 0xFF, 0x03, 0x00, + # FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32 + 0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +} + +$(FTW_WORKING_BASE)|$(FTW_WORKING_SIZE) +gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|gEfiMdeMo= dulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize +#NV_FTW_WORKING +DATA =3D { + # EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature =3D gEdkiiWorkingBl= ockSignatureGuid =3D + # { 0x9e58292b, 0x7c68, 0x497d, { 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0= x1b, 0x95 }} + 0x2b, 0x29, 0x58, 0x9e, 0x68, 0x7c, 0x7d, 0x49, + 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95, + # Crc:UINT32 #WorkingBlockValid:1, WorkingBlockInvalid:1, Res= erved + 0x5b, 0xe7, 0xc6, 0x86, 0xFE, 0xFF, 0xFF, 0xFF, + # WriteQueueSize: UINT64 + 0xE0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 +} + +$(FTW_SPARE_BASE)|$(FTW_SPARE_SIZE) +gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|gEfiMdeModu= lePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize +#NV_FTW_SPARE --=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 (#60329): https://edk2.groups.io/g/devel/message/60329 Mute This Topic: https://groups.io/mt/74496028/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-