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::244; helo=mail-wr0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) (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 71CBB2035D0F0 for ; Tue, 31 Oct 2017 03:49:20 -0700 (PDT) Received: by mail-wr0-x244.google.com with SMTP id j15so15509462wre.8 for ; Tue, 31 Oct 2017 03:53:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9+XpRt2wzhrrI3bR//NkfW9Bog2DoDl3zRsw8u4kcdI=; b=CIidTDQ0Llm+RTT9undbacWiPHzMvoWC+3hsYtr406Oe7/rAMej68DwvQgwNHuYTBQ ajBiCIv2ZNrI/Ro2B2dUomoZB58cfPb7kSCrj5MpGoa/MnkhWAVYw1K64Knf9DMZo71a itfPxUaIySNLDjND1GIVgcjHxZFh5iC8K6z4M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9+XpRt2wzhrrI3bR//NkfW9Bog2DoDl3zRsw8u4kcdI=; b=n85gd3QSNTqbeohA41ci/2HEyrsXw8QfHrX/sB4CFwwhOXqvD2WWzPTfNXJZ2nyRx7 DZu79ZSpGwuV1NcYx1Rhl556muW3Mtc3JgJ951ep0DdNJbX344ehOWg390fvhmeTUKmO AOWr1fTp9gw1C9/gZJdSpZL04hPTtpgKEC/N2LBYZ5JfyoR9tiDFN1FGWgXkKfA419NK /frUcUbV3igV7p2cdxXmSyqvl3SD4cFko6/trfeds+v5bt3E05IGJygjnShMEpY2rs6W ivb1GtFpbX7up5ECJ8zJgtHxDiA8dqP+kiLk90lb/pA5UeBJlDokh8RHQGTzc2vIvsHT I9FA== X-Gm-Message-State: AMCzsaXaQcyrVLNME/VPAYV+qpa4QmpgiwRpul+rErg3xOQnppNP1JHv rAfdJ2Y/tM3IsDNir423p7EuEw0QTtk= X-Google-Smtp-Source: ABhQp+TW2nS1UEjG3H0U04/uIsz+6lgQOJ6Zpll+s/XKn+CiNAvm2qnZCEjuydDFN8BXC3fB71i5ow== X-Received: by 10.223.157.40 with SMTP id k40mr1293149wre.153.1509447190398; Tue, 31 Oct 2017 03:53:10 -0700 (PDT) Received: from localhost.localdomain ([105.129.222.2]) by smtp.gmail.com with ESMTPSA id o14sm460985wra.54.2017.10.31.03.53.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Oct 2017 03:53:09 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Cc: graeme.gregory@linaro.org, daniel.thompson@linaro.org, masami.hiramatsu@linaro.org, methavanitpong.pipat@socionext.com, Ard Biesheuvel Date: Tue, 31 Oct 2017 10:52:07 +0000 Message-Id: <20171031105218.30208-17-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171031105218.30208-1-ard.biesheuvel@linaro.org> References: <20171031105218.30208-1-ard.biesheuvel@linaro.org> Subject: [PATCH edk2-platforms v3 16/27] 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: Tue, 31 Oct 2017 10:49:20 -0000 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 | 12 ++++++++ Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.inf | 3 ++ 4 files changed, 52 insertions(+), 4 deletions(-) diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc index ac90c718d003..ea9d0bbcbf7b 100644 --- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc +++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc @@ -337,6 +337,19 @@ [PcdsFixedAtBuild.common] # 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 + [PcdsPatchableInModule] gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0 @@ -403,7 +416,6 @@ [Components.common] 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 @@ -422,6 +434,22 @@ [Components.common] } # + # 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 { @@ -535,7 +563,7 @@ [Components.common] # 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 961482b12e62..5ff6bcacf838 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. @@ -105,7 +104,6 @@ [FV.FvMain] 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 @@ -120,6 +118,13 @@ [FV.FvMain] 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 e9a266f0997a..ed616c3bedee 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c @@ -97,6 +97,18 @@ STATIC CONST ARM_MEMORY_REGION_DESCRIPTOR mVirtualMemoryTable[] = { SYNQUACER_PCI_SEG0_PORTIO_MEMSIZE), 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 (PcdFip006DxeMemBaseAddress), + EFI_PAGE_SIZE), + ARM_DEVICE_REGION (FixedPcdGet32 (PcdFlashNvStorageVariableBase), + FixedPcdGet32 (PcdFlashNvStorageVariableSize)), + ARM_DEVICE_REGION (FixedPcdGet32 (PcdFlashNvStorageFtwWorkingBase), + FixedPcdGet32 (PcdFlashNvStorageFtwWorkingSize)), + ARM_DEVICE_REGION (FixedPcdGet32 (PcdFlashNvStorageFtwSpareBase), + FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize)), }; STATIC diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.inf b/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.inf index 06cad772a1c0..f433d9a57079 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.inf +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.inf @@ -29,6 +29,7 @@ [Packages] EmbeddedPkg/EmbeddedPkg.dec MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec + Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/Fip006Dxe.dec Silicon/Socionext/SynQuacer/SynQuacer.dec [LibraryClasses] @@ -55,6 +56,8 @@ [FixedPcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize + gFip006DxeTokenSpaceGuid.PcdFip006DxeRegBaseAddress + gFip006DxeTokenSpaceGuid.PcdFip006DxeMemBaseAddress gSynQuacerTokenSpaceGuid.PcdNetsecEepromBase [Pcd] -- 2.11.0