From patchwork Tue Oct 31 10:52:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 117550 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp3794404edm; Tue, 31 Oct 2017 03:53:55 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Tt/9T+MrydHXZt+fl9pwOfaZFv8UFVi9Pd+6JrcK/HOutCIPK4X9iTwjyETpcgmsBYe0bM X-Received: by 10.101.72.132 with SMTP id n4mr1440890pgs.245.1509447235377; Tue, 31 Oct 2017 03:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509447235; cv=none; d=google.com; s=arc-20160816; b=bNV0yNsMEvbeXRv1oeCoWcuqvfVYDiyae/OXHhPKLg6GbXgYlEQHMe+H9qHz/pAKBC loJobnjAvymGAG3IDJJkuBR6jMilLtG6Z3llYXkbEFyVmDbW4CqsCdwayZ5YOmt0fDep gXTdZn7lV0FRR0hJRgX49ZOTuDpzcJSeJoMAJfZubLl7j2/CIylsgUnKQsB7P24ZoS6e iWYV82mQGe1SDzm2PLxRjOYb6mhtve7c+uhaUFIR4gekaZIEbLdfXkYRwRuum/rawsIu sdbKWKJZtw1vzGObB5+nnsC+7CtDEzTlo16omIVDXKifvRIScyFdM+RsFh9KyDaU0Ad8 R1eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=B7auEmYfOR+1jaqK0gjAsS2GEmtrCjeq904nlFC7iG0=; b=TRTOeRWA/zRKT5nv7nbOmc/HUOykb7tO7xfGrdeFb/JfkVbnbRHiw1Z8a1MfjLKgJp 3jeM42WqYN8mpA98+SyzP3+MKnH/2nzL47IWm/MBcO/MDM0gSLaZz5XjhqB2cfs5aGgo IZZUwmCuQq2RGK8vkYybbytPiDgyCeS6AtCmEdsDCh75BU/XGx/D7x06FTwj+GXkz5co MJAMhLk/N6Ej2JnN9dvRYObQdCKnCXYCUeQYLa61O6E4srh79fbWO75NzLub713kZaMo cEx02oFas2MsTtOx0mi5Bs7Ku17ILWZiMQVkP8kXddwi28nFTjPcja5MwymVPNnfNDt2 AWVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CIidTDQ0; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id 202si1278597pgg.496.2017.10.31.03.53.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Oct 2017 03:53:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CIidTDQ0; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D2F422035D0F9; Tue, 31 Oct 2017 03:49:22 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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-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 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: [edk2] [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: , Cc: daniel.thompson@linaro.org, masami.hiramatsu@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel 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]