From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 229052007D1EB for ; Mon, 11 Sep 2017 12:11:01 -0700 (PDT) Received: by mail-wm0-x236.google.com with SMTP id i189so47113383wmf.1 for ; Mon, 11 Sep 2017 12:13:57 -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=CwpAF9YlbLf30eDigVdtK3Qq9lrrYwHkYQuDYzr9XHc=; b=RYLursqkZsu989L/ldXeBnC1J4BV+tQVfelVmR63A//ZIG/Ca8tgNa1AcLuU1UW6E8 6nWtefjR3vLI9WfPQAxigL17i+P7wS6HLLSBFogIxeYd/vV65po2elATSqRMruWt3XfA APEynHYQ28QcV6VKdhFvfGbASp6a2I7V3AN9w= 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=CwpAF9YlbLf30eDigVdtK3Qq9lrrYwHkYQuDYzr9XHc=; b=JZa8HwPDCBkghhJUnZUKhQVaklKptcnkajgeLzH4qfqhCpJ+hvQfe4Dol02h0WnodO OEdNQ0RQtDilQUoYXm0/t/mxhzUp+cQx113boOKm/kSZSgAm5AWCEisC9V/DpTLq+c0e ePnCYpIyFI/Co1XFwid0RihrcQIkqoF6Rc96rExf7LzBSsxLYBKcqGZ97w92s52XALxf RH7pUItG9HDGS4grWyDk/5T1phbXIPj4PCBEG1pMGJxQd0tOgP0A1KAXKqf6aVKB3O/i YfiTfksYjoBaBHTIPtvmcRU3O8ZGBHrzuoB4tnGhxGlXA+29rRTaPvkE5UnUtbocHDku z3Qw== X-Gm-Message-State: AHPjjUiPVRsLAwPBhfhpMqCzRjE1pudfhGWj5iB0nQWvhriyvSQLTTyR jemz4g1GPO3KGoXv X-Google-Smtp-Source: AOwi7QDQaqjqr4yoLui1i6C8jYAl7F4TFSqThAJMbnWX512Xc8uM4roosYYInJ1WGBxsPJYJWsnueg== X-Received: by 10.28.133.195 with SMTP id h186mr8275032wmd.18.1505157235654; Mon, 11 Sep 2017 12:13:55 -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 k141sm4650564wmg.15.2017.09.11.12.13.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Sep 2017 12:13:54 -0700 (PDT) Date: Mon, 11 Sep 2017 20:13:53 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, methavanitpong.pipat@socionext.com, masahisa.kojima@linaro.org, masami.hiramatsu@linaro.org Message-ID: <20170911191353.yegeteynxj6qr4de@bivouac.eciton.net> References: <20170908182315.9591-1-ard.biesheuvel@linaro.org> <20170908182315.9591-15-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20170908182315.9591-15-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms 14/14] Platform/Synquacer: incorporate NOR flash and variable drivers X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2017 19:11:01 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Sep 08, 2017 at 07:23:15PM +0100, Ard Biesheuvel wrote: > Wire up the non-volatile EFI variable store support, by switching from > the emulation driver to the real one, and enabling the prerequisite > FTW and NOR flash drivers. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > Platform/Socionext/SynquacerEvalBoard/SynquacerEvalBoard.dsc | 32 ++++++++++++++++++-- > Platform/Socionext/SynquacerEvalBoard/SynquacerEvalBoard.fdf | 9 ++++-- > Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/SynquacerMemoryInitPeiLib.c | 10 ++++++ > Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/SynquacerMemoryInitPeiLib.inf | 2 ++ > 4 files changed, 49 insertions(+), 4 deletions(-) > > diff --git a/Platform/Socionext/SynquacerEvalBoard/SynquacerEvalBoard.dsc b/Platform/Socionext/SynquacerEvalBoard/SynquacerEvalBoard.dsc > index 92c1d3eb8283..11b2e63453cd 100644 > --- a/Platform/Socionext/SynquacerEvalBoard/SynquacerEvalBoard.dsc > +++ b/Platform/Socionext/SynquacerEvalBoard/SynquacerEvalBoard.dsc > @@ -319,6 +319,19 @@ > # > gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE > > + # > + # Variable store > + # > + gFip006DxeTokenSpaceGuid.PcdFip006DxeRegBaseAddress|0x54800000 > + gFip006DxeTokenSpaceGuid.PcdFip006DxeMemBaseAddress|0x08000000 > + > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x08400000 > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00010000 > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x08410000 > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00010000 > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x08420000 > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00010000 > + > [PcdsDynamicHii] > gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|5 > > @@ -360,7 +373,6 @@ > MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf > MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf > ArmPkg/Drivers/TimerDxe/TimerDxe.inf > - MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf > ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf > MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf > > @@ -378,6 +390,22 @@ > } > > # > + # Variable services > + # > + Silicon/Socionext/Synquacer/Drivers/Fip006Dxe/Fip006Dxe.inf { > + > + NorFlashPlatformLib|Silicon/Socionext/Synquacer/Library/NorFlashSynquacerLib/NorFlashSynquacerLib.inf > + } > + MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf > + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { > + > + AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf > + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf > + TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf > + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf > + } > + > + # > # UEFI application (Shell Embedded Boot Loader) > # > ShellPkg/Application/Shell/Shell.inf { > @@ -481,7 +509,7 @@ > # > MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf { > > - #NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf > + NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf > > > # support ACPI v5.0 or later > diff --git a/Platform/Socionext/SynquacerEvalBoard/SynquacerEvalBoard.fdf b/Platform/Socionext/SynquacerEvalBoard/SynquacerEvalBoard.fdf > index de97d3e56ded..86685a22208b 100644 > --- a/Platform/Socionext/SynquacerEvalBoard/SynquacerEvalBoard.fdf > +++ b/Platform/Socionext/SynquacerEvalBoard/SynquacerEvalBoard.fdf > @@ -1,4 +1,3 @@ > - > # > # Copyright (c) 2013-2014, ARM Limited. All rights reserved. > # Copyright (c) 2017, Linaro Limited. All rights reserved. > @@ -102,7 +101,6 @@ READ_LOCK_STATUS = TRUE > INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf > INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf > INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf > - INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf > INF ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf > INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf > > @@ -116,6 +114,13 @@ READ_LOCK_STATUS = TRUE > INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf > > # > + # Variable services > + # > + INF Silicon/Socionext/Synquacer/Drivers/Fip006Dxe/Fip006Dxe.inf > + INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf > + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > + > + # > # UEFI applications > # > INF ShellPkg/Application/Shell/Shell.inf > diff --git a/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/SynquacerMemoryInitPeiLib.c b/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/SynquacerMemoryInitPeiLib.c > index 1d25d63f1b6c..1af30a2bbe60 100644 > --- a/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/SynquacerMemoryInitPeiLib.c > +++ b/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/SynquacerMemoryInitPeiLib.c > @@ -87,6 +87,16 @@ STATIC ARM_MEMORY_REGION_DESCRIPTOR mVirtualMemoryTable[] = { > ARM_DEVICE_REGION (SYNQUACER_PCI_SEG1_PORTIO_MEMBASE, > SYNQUACER_PCI_SEG1_PORTIO_MEMSIZE), > > + // variable store > + ARM_DEVICE_REGION (FixedPcdGet32 (PcdFip006DxeRegBaseAddress), > + EFI_PAGE_SIZE), > + ARM_DEVICE_REGION (FixedPcdGet32 (PcdFlashNvStorageVariableBase), > + FixedPcdGet32 (PcdFlashNvStorageVariableSize)), > + ARM_DEVICE_REGION (FixedPcdGet32 (PcdFlashNvStorageFtwWorkingBase), > + FixedPcdGet32 (PcdFlashNvStorageFtwWorkingSize)), > + ARM_DEVICE_REGION (FixedPcdGet32 (PcdFlashNvStorageFtwSpareBase), > + FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize)), > + > { } > }; > > diff --git a/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/SynquacerMemoryInitPeiLib.inf b/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/SynquacerMemoryInitPeiLib.inf > index 5f45c30a5e92..044c19ff9600 100644 > --- a/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/SynquacerMemoryInitPeiLib.inf > +++ b/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/SynquacerMemoryInitPeiLib.inf > @@ -30,6 +30,7 @@ > MdePkg/MdePkg.dec > MdeModulePkg/MdeModulePkg.dec > Silicon/Socionext/Synquacer/Synquacer.dec > + Silicon/Socionext/Synquacer/Drivers/Fip006Dxe/Fip006Dxe.dec > > [LibraryClasses] > ArmLib > @@ -48,3 +49,4 @@ > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize > + gFip006DxeTokenSpaceGuid.PcdFip006DxeRegBaseAddress > -- > 2.11.0 >