From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-DB5-obe.outbound.protection.outlook.com (EUR03-DB5-obe.outbound.protection.outlook.com []) by mx.groups.io with SMTP id smtpd.web12.37177.1591018565558875974 for ; Mon, 01 Jun 2020 06:36:35 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nxp1.onmicrosoft.com header.s=selector2-nxp1-onmicrosoft-com header.b=EOgrX1bo; spf=fail (domain: oss.nxp.com, ip: , mailfrom: pankaj.bansal@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=njpTI+ZIzZb75UnN62Hy4XHZuTAS7hOkkT5LXETlGs6twz3G9JI8JBaWsDdI0BdmPCG2JWuhUqMN+kCgWyX0eR9NSuvYP8e4ZojIpEdluN5s0sFpt6PHTkOlAhBhVtNVb8xIVQ4pucwXGjxHDb75C+mc7cdllAgYFlnV3bFq/+icTLGfB8MvJmv2M3Xo7I3M2TF0+sQbqzK433zXkA4G7klxVzvMjHj++xpOvqFNL5UZDzhHB/EOjXmBmR9OX0tTM0kVdWr+YJ7aSY4NsH7U4ez9BCE18GVNqXgxVqkwG0FBO82vTu2oH/3fsORoVXYkjcPdzGqBC6CGj/s3rJFjcA== 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=cmHN1SaQBFE72Sr93yyyB8mRaaUfhr6bJuYTk2GoLWE=; b=lHvqEByegUzTK0qyxNSGv1FMy+FWWFx4SRz9fJxYyplqXGEgAYmgSlwhVwS7zbKY7PK/DCVKSTXD2bsMI24WQzDGa+fNs8iFJ8aJTw+bHenEZ/8O3hVx0o+DRkCV/BJsnX6kPVexPV+zP3Nx9eq5QLkOWIw3e0xW+s3mgbdDXT4vg7Lfrq05QVfnmwmhTs/hqWk1+sCA4nA0XX1v+dVmB3Dgr4YQLkfOZTMmWc/odJt5NhmA7SsuT/JgtXxcKwLg6QgV1TzevGUvn1w8+f0ybWDSeC37HZtS6VbkoSJPf7HrYoDFo714k0zL0X8B5qu+V6BflLcJwcoZ30uU47sW9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cmHN1SaQBFE72Sr93yyyB8mRaaUfhr6bJuYTk2GoLWE=; b=EOgrX1boHHzv1QYapnm3Vq9jrfSIEExs7ebcKi2YbQJSJm5otBs3AS5QhsQfyN7vOWOuuHo/fhy/GaMIlBizuNqseC3xTIZp0llibsKoYAuTxdwSjFN+5g641bF0YGsVnLcmqOScM/Nb2ITdMDnt50GyZX1ChSdB7y3oEi2B6mg= Authentication-Results: nuviainc.com; dkim=none (message not signed) header.d=none;nuviainc.com; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR04MB5933.eurprd04.prod.outlook.com (2603:10a6:803:ec::16) by VI1PR04MB6096.eurprd04.prod.outlook.com (2603:10a6:803:f6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17; Mon, 1 Jun 2020 13:36:27 +0000 Received: from VI1PR04MB5933.eurprd04.prod.outlook.com ([fe80::45c4:8846:5327:9513]) by VI1PR04MB5933.eurprd04.prod.outlook.com ([fe80::45c4:8846:5327:9513%7]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 13:36:27 +0000 From: "Pankaj Bansal" To: Leif Lindholm , Meenakshi Aggarwal , Michael D Kinney , devel@edk2.groups.io, Varun Sethi , Samer El-Haj-Mahmoud , Jon Nettleton , Ard Biesheuvel Subject: [PATCH edk2-platforms v4 09/10] Platform/NXP: Add LX2160ARDB Platform Date: Mon, 1 Jun 2020 19:04:38 +0530 Message-ID: <20200601133439.5711-10-pankaj.bansal@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200601133439.5711-1-pankaj.bansal@oss.nxp.com> References: <20200601133439.5711-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0097.apcprd02.prod.outlook.com (2603:1096:4:92::13) To VI1PR04MB5933.eurprd04.prod.outlook.com (2603:10a6:803:ec::16) Return-Path: pankaj.bansal@oss.nxp.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from uefi-workstation.ap.freescale.net (92.120.0.69) by SG2PR02CA0097.apcprd02.prod.outlook.com (2603:1096:4:92::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Mon, 1 Jun 2020 13:36:24 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: de0f549d-b663-4cae-f110-08d80630c8ac X-MS-TrafficTypeDiagnostic: VI1PR04MB6096: 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-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5T1M9mcGdbk1oJBgIjfl6JjLBWqT2SNiEQXLIR269N0G+pOllUop2eRzHOrLQkoJehEqdZliHsEaHrby7vxJ9K3H9Qvb2eF5WPh1LsKr2lR7+aPnU5Z6VMNzWlTsEDI/neNcjaHDSU7BVtIO+Ou0AAaggLAl5Ypng3bmeKRO5i+n8s8Ykcx65GCbW90X1bUCXUEvQwydrTmdxMJagdGUEj07N0RJmnINojpO+sl38OGE0CgONvGm4IwodxVOJOK5ZzQOGFbZTDMmE0cJLOJBvw5kth/p0DLOtq8Q084onFklwDYDVuW2HKTqloX32R76cBFZsMSuFVp1OUkyf03rAw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5933.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(376002)(346002)(396003)(136003)(39860400002)(110136005)(1076003)(316002)(86362001)(6666004)(44832011)(16526019)(478600001)(6506007)(26005)(6512007)(186003)(6486002)(52116002)(30864003)(956004)(66556008)(66476007)(66946007)(2906002)(2616005)(5660300002)(19627235002)(83380400001)(8936002)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: BxnfvSMODYHf1834F/6yJZgF2LT5NfxMhSnuK909dOYDVKxXJZ+OdD/8VOLgK3KvNqpfYSnwmD6mYblusJJ5QtLJEhTwybx3CXe/v/VJxh2chPwB8TaHc9gMah3yfTS+8mrot8Pd9G1ctub4GzxjKZ3TQaQ7qq2aod+mjDXWpCcLrJpDX8k8wBtEQDAaZa5ekHIkPzbGhazr1mRCybQTkS4Ya/F/2rcWlih7j69GK30ooEv1fFrurDTlxZ7/CuhBubvdoGy8tXTmTSfi7U3jP6K5XWFrn3RY2nTbJr8urqYkGh9v7GC/hCnv2oK42/ODc1TteTxcJXzuI5fANPlBWjuPpgtsUZA9XX8iNw/Be+1RdLCEslu6DBzPIWUAqq97FPFNk8P7Af2yHZWDOyZPXv6K1PRncZH0eeHZNQQw6gSVwYy9UN6hiyYBhLS0N2/nIulL6FcTui9UMLQOZCeFefKrs5f0BLgbDOVrYwAdN70= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: de0f549d-b663-4cae-f110-08d80630c8ac X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 13:36:27.0837 (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: DgusfQnt7ik/Kd7CNIyLOrQQShWVvtygpiXpMpJ48ICPE0xp8Sx27BoohMqEZLl5WzQsj9ItqV+hDznbXw7cbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6096 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain 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 --- Notes: V4: - Alphabetically sorted Packages in Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.inf =20 V3: - Alphabetically sorted LibraryClasses in Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.inf =20 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..13ad6e73cd48 --- /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 0x1000 +NumBlocks =3D 0x140 + +##########################################################################= ###### +# +# 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 53d8af58925a..e1ab682c1976 100644 --- a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.inf +++ b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLib.inf @@ -18,11 +18,14 @@ ArmPlatformPkg/ArmPlatformPkg.dec MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec + Silicon/NXP/Chassis3V2/Chassis3V2.dec + Silicon/NXP/LX2160A/LX2160A.dec Silicon/NXP/NxpQoriqLs.dec =20 [LibraryClasses] ArmLib DebugLib + SocLib =20 [Sources.common] ArmPlatformLib.c 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