From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::243; helo=mail-wr0-x243.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 61D0C21E080FD for ; Thu, 19 Apr 2018 09:32:42 -0700 (PDT) Received: by mail-wr0-x243.google.com with SMTP id u11-v6so15683697wri.12 for ; Thu, 19 Apr 2018 09:32:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uknPxRjkGy+Ro76CIkjKz0XsKqKMvPASo/Br4ITiWXc=; b=OFWF0mO+e6Io63pe994qmdFUEf6F1HKZ0SIdOrGF+Xzv9YW1QpeK27sscg0me6yLd6 KYNZxttZN8rDOjLHkuQpTblNAzqmsP4pVUXzFlNX3xjw7IysPaJX2iH303DOeFLEFMQJ 9GcfrJml9IvItE3jMdHC2u7SVeHZPyrXhEW6Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uknPxRjkGy+Ro76CIkjKz0XsKqKMvPASo/Br4ITiWXc=; b=ZRAMhJSlZfhyDt4d4BMyQ+/Er1s8dTiw0doNErvJl0yqbSYnDYkGr9hQiZOMO+sxzY gTEHe8+575HfDIPfO61DAodyJEjWftZUGP2SCZrQCez8Qp3DatL9wM+OpgyrfqbfxVrG vUvW5eEPlNl4I5sjHz/L7nL4DPtSewV3eTor5lVMWtP/mXGcZWo3mq6Oq/QXPzHOaKhA wxp/eJLvR/IqWPT17JDtYzgmi44eGasOy6KIEsa1c3lEOgBTj5++/OBiQHnktDNM48Fs 7bl8a7jOEDQPCCZN2Sd9F+1bgk6CixVjU3FL1RGUk+sqRi4I4hkbnXORoXUsKOiAEy9F fo4g== X-Gm-Message-State: ALQs6tDzF4/z2G3hcn/uvuLuZ7FMKE/tDF7HD4749xwhodGg8Spu1hWj GPvngz5k6v9sMx0oO0RgNlcexQ== X-Google-Smtp-Source: AIpwx496M4ELC32MPkLgv9JTXb3xy0B+6cjudGtgz9Kp4k1qb1iGdigSkqnSdptbMMD4it5ycY+MJw== X-Received: by 2002:adf:e78b:: with SMTP id n11-v6mr1585595wrm.192.1524155560849; Thu, 19 Apr 2018 09:32:40 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id b105-v6sm7010750wrd.64.2018.04.19.09.32.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Apr 2018 09:32:39 -0700 (PDT) Date: Thu, 19 Apr 2018 17:32:38 +0100 From: Leif Lindholm To: Meenakshi Cc: ard.biesheuvel@linaro.org, edk2-devel@lists.01.org, udit.kumar@nxp.com, v.sethi@nxp.com, Wasim Khan Message-ID: <20180419163238.rcvznalccn7meda2@bivouac.eciton.net> References: <1518771035-6733-1-git-send-email-meenakshi.aggarwal@nxp.com> <1518771035-6733-32-git-send-email-meenakshi.aggarwal@nxp.com> MIME-Version: 1.0 In-Reply-To: <1518771035-6733-32-git-send-email-meenakshi.aggarwal@nxp.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms 31/39] LS2088ARDB: Enable NOR driver and Runtime Services X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Apr 2018 16:32:42 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Feb 16, 2018 at 02:20:27PM +0530, Meenakshi wrote: > From: Wasim Khan > > Enable NOR driver and Runtime Services for LS2088ARDB Platform > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Wasim Khan Ah, I guess the varstore changes may actually happen to this patch. No other comments on this. / Leif > --- > Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc | 15 ++++- > Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf | 6 +- > Platform/NXP/LS2088aRdbPkg/VarStore.fdf.inc | 99 ++++++++++++++++++++++++++++ > 3 files changed, 118 insertions(+), 2 deletions(-) > create mode 100644 Platform/NXP/LS2088aRdbPkg/VarStore.fdf.inc > > diff --git a/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > index 7894925..60449b5 100755 > --- a/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > +++ b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > @@ -42,6 +42,7 @@ > IfcLib|Silicon/NXP/Library/IfcLib/IfcLib.inf > BoardLib|Platform/NXP/LS2088aRdbPkg/Library/BoardLib/BoardLib.inf > FpgaLib|Platform/NXP/LS2088aRdbPkg/Library/FpgaLib/FpgaLib.inf > + NorFlashLib|Silicon/NXP/Library/NorFlashLib/NorFlashLib.inf > > [PcdsFixedAtBuild.common] > > @@ -89,6 +90,13 @@ > gDs3232RtcLibTokenSpaceGuid.PcdMuxRtcChannelValue|0x09 > gDs3232RtcLibTokenSpaceGuid.PcdMuxDefaultChannelValue|0x08 > > + # > + # NV Storage PCDs. > + # > + gArmTokenSpaceGuid.PcdVFPEnabled|1 > + gNxpQoriqLsTokenSpaceGuid.PcdFlashDeviceBase64|0x580000000 > + gNxpQoriqLsTokenSpaceGuid.PcdFlashReservedRegionBase64|0x580300000 > + > ################################################################################ > # > # Components Section - list of all EDK II Modules needed by this Platform > @@ -98,6 +106,11 @@ > # > # Architectural Protocols > # > - MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf > + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf{ > + > + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf > + } > + MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf > ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf > Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf > + Silicon/NXP/Drivers/NorFlashDxe/NorFlashDxe.inf > diff --git a/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf > index 14072a6..785f88b 100644 > --- a/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf > +++ b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf > @@ -55,6 +55,7 @@ gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize > FV = FVMAIN_COMPACT > > !include ../FVRules.fdf.inc > +!include VarStore.fdf.inc > ################################################################################ > # > # FV Section > @@ -103,7 +104,8 @@ READ_LOCK_STATUS = TRUE > INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf > INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf > INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf > - INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf > + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > + INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf > INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf > > INF Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf > @@ -122,6 +124,8 @@ READ_LOCK_STATUS = TRUE > INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf > INF EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf > > + INF Silicon/NXP/Drivers/NorFlashDxe/NorFlashDxe.inf > + > # > # Network modules > # > diff --git a/Platform/NXP/LS2088aRdbPkg/VarStore.fdf.inc b/Platform/NXP/LS2088aRdbPkg/VarStore.fdf.inc > new file mode 100644 > index 0000000..7d35042 > --- /dev/null > +++ b/Platform/NXP/LS2088aRdbPkg/VarStore.fdf.inc > @@ -0,0 +1,99 @@ > +## @file > +# FDF include file with FD definition that defines an empty variable store. > +# > +# 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-2018 NXP. > +# > +# This program and the accompanying materials are licensed and made available > +# under the terms and conditions of the BSD License which accompanies this > +# distribution. The full text of the license may be found at > +# http://opensource.org/licenses/bsd-license.php > +# > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR > +# IMPLIED. > +# > +## > + > +[FD.LS2088aRdbNv_EFI] > + > +BaseAddress = 0x580300000|gNxpQoriqLsTokenSpaceGuid.PcdNvFdBase #The base address of the FLASH device > +Size = 0x000C0000|gNxpQoriqLsTokenSpaceGuid.PcdNvFdSize #The size in bytes of the FLASH device > +ErasePolarity = 1 > +BlockSize = 0x1 > +NumBlocks = 0xC0000 > + > +# > +# Place NV Storage just above Platform Data Base > +# > +DEFINE NVRAM_AREA_VARIABLE_BASE = 0x00000000 > +DEFINE NVRAM_AREA_VARIABLE_SIZE = 0x00040000 > +DEFINE FTW_WORKING_BASE = $(NVRAM_AREA_VARIABLE_BASE) + $(NVRAM_AREA_VARIABLE_SIZE) > +DEFINE FTW_WORKING_SIZE = 0x00040000 > +DEFINE FTW_SPARE_BASE = $(FTW_WORKING_BASE) + $(FTW_WORKING_SIZE) > +DEFINE FTW_SPARE_SIZE = 0x00040000 > + > +############################################################################# > +# LS2088ARDB NVRAM Area > +# LS2088ARDB NVRAM Area contains: Variable + FTW Working + FTW Spare > +############################################################################# > + > + > +$(NVRAM_AREA_VARIABLE_BASE)|$(NVRAM_AREA_VARIABLE_SIZE) > +gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize > +#NV_VARIABLE_STORE > +DATA = { > + ## 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 = > + # { 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: 0xC0000 > + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, > + # Signature "_FVH" # Attributes > + 0x5f, 0x46, 0x56, 0x48, 0x36, 0x0E, 0x00, 0x00, > + # HeaderLength # CheckSum # ExtHeaderOffset #Reserved #Revision > + 0x48, 0x00, 0xFA, 0xF5, 0x00, 0x00, 0x00, 0x02, > + # Blockmap[0]: 0x3 Blocks * 0x40000 Bytes / Block > + 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 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 == FALSE as well. > + # Signature: gEfiAuthenticatedVariableGuid = > + # { 0xaaf32c78, 0x947b, 0x439a, > + # { 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92 }} > + 0x78, 0x2c, 0xf3, 0xaa, 0x7b, 0x94, 0x9a, 0x43, > + 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92, > + # Size: 0x40000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) - > + # 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) = 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|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize > +#NV_FTW_WORKING > +DATA = { > + # EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature = gEdkiiWorkingBlockSignatureGuid = > + # { 0x9e58292b, 0x7c68, 0x497d, { 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95 }} > + 0x2b, 0x29, 0x58, 0x9e, 0x68, 0x7c, 0x7d, 0x49, > + 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95, > + # Crc:UINT32 #WorkingBlockValid:1, WorkingBlockInvalid:1, Reserved > + 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|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize > +#NV_FTW_SPARE > -- > 1.9.1 >