From patchwork Fri Sep 8 18:23:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 112127 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp661156qgf; Fri, 8 Sep 2017 11:24:30 -0700 (PDT) X-Received: by 10.99.143.14 with SMTP id n14mr4013819pgd.339.1504895070687; Fri, 08 Sep 2017 11:24:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504895070; cv=none; d=google.com; s=arc-20160816; b=bdObezR+1/fJS1ZZeOBzsIT4Nr9OS16CxB5Zei6tNMpk07VP/QYOeATpdlNUMWQwak ZnzsiYo+EJPzEqqjSX0lRMCO+dREk/1hS9O3aCgVs0viFsrxx/nmshJfBZdtEROWid7l /o3mI5FT3hy6jj8K7kMZWvM6s+yI39AdJVqhXBXaplv0eW9wHp4bZcthOnRWro2XF5BC eLHeMZR5X0WDyWzUVk4rkFl2Ssg3HqwKGLR6abXFsyfzFYwlot9VEwPfHK4P9FUN71B9 VkrYPhL7NAJKzAW9OyycBVlXxQ3u8k1SXSUzIfBaIgxhf61KqbUJDVx5fB5gXtOYeq9T tlgQ== 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=fPY1pvw+/h0ZDLdHWVMDxuaakB10/zAR198ljN5PZVQ=; b=cTjfmxMf5+t/rfSjweQbTaFfVHA+KHo/R5lSBelT0pxSosiih+ItT49qHGaEX00tQC IX6mPHTxvUFJTVtunTmlfCe4Ru1O9I4Zy0PI+WLsYtKOwpS6EDiKD5wFyX+nXZuurtrO g/U6RUmfyI3noC6VwEG7yCySRQahd1qJHRGTJZexVtxx5lmUdQDqdbZJg0BKneIPqULI VLM+Yxo0DxJCM4cDpf6gP/cWIwIBvwH0wYdcIvut967usoGYp4VBxZyv4GvzYKuCHCYK QqlmEAsziCnFOWC52Z0Ts3Nr+EEfeWyLhBcTdCpPwO834OD77Y2MTjQJZQulR5K3rtd5 j85A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=C2Ibu/Z9; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id c8si1958488pfm.118.2017.09.08.11.24.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Sep 2017 11:24:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=C2Ibu/Z9; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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 7B7B520945C02; Fri, 8 Sep 2017 11:21:13 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::22d]) (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 5B7A220945BF8 for ; Fri, 8 Sep 2017 11:21:11 -0700 (PDT) Received: by mail-wr0-x22d.google.com with SMTP id k20so5981929wre.4 for ; Fri, 08 Sep 2017 11:24:03 -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=w6u/PVLf/Hj9SitMZmgRnLS9UCJTSpNQNIwRwlWdzC8=; b=C2Ibu/Z9u1+StXAM65btQCgorDCEAlkmxZrr0M++s/9H6updlpshIgJIs8B+yB2RUZ eqo7K1XZdFErNUSCdcTePz6tIjHgyMPlzu+XQppLsjD7Y549k6FZgZn2wyrenYAJdT1C sdqoGXm6wUA9N3tbCgqmR4TVw3+DsmzpxhhQM= 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=w6u/PVLf/Hj9SitMZmgRnLS9UCJTSpNQNIwRwlWdzC8=; b=C6I39tiVbPP/qqR9JgMAoGdbXs57m3WguJs+BnAcx3AHyrdXkale7Y1poKb2DSJF/Y fZKZ35R10UfrtSCwNi2lFsJE1OFzLqQta5w7orG4szoti+GNDn9Il79++Eyxu45bQ8x8 bxPB74YwxEJJm//Q4a2KDzLj6MVVOwNgJMEb8YwcOOyPg3Qp6IKVU40moV5FkTqSW8qr 601ytmTo0WCupFD4EICBA0dPIRFlkq//EpAKdZnKEKYCedjHtBgHthwizUqEaaSsygoG 6ov4EYHiGl5OH4Mts6dTZoGXQc3xE0iIkKgstIbTTFepPb8xLegN+dtOzmHaPkMhGr4e KYMA== X-Gm-Message-State: AHPjjUi8ARx855WRXprHqy9b64Ny2a1s3lEILs8Av5UGx2Pjmn4wb2JY arQ4skq5OIX9GcGYE0+uyA== X-Google-Smtp-Source: ADKCNb6WKu6KsSXKgLfV0v+2kWHy78PCZN4ggE+O69V1t/q+T2K8uVE5BpnXjxrUGH6a43E7p3qlGQ== X-Received: by 10.223.165.5 with SMTP id i5mr2723590wrb.87.1504895042246; Fri, 08 Sep 2017 11:24:02 -0700 (PDT) Received: from localhost.localdomain ([154.151.223.220]) by smtp.gmail.com with ESMTPSA id s196sm3254354wmb.6.2017.09.08.11.24.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Sep 2017 11:24:01 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 8 Sep 2017 19:23:15 +0100 Message-Id: <20170908182315.9591-15-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170908182315.9591-1-ard.biesheuvel@linaro.org> References: <20170908182315.9591-1-ard.biesheuvel@linaro.org> Subject: [edk2] [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: , Cc: masahisa.kojima@linaro.org, methavanitpong.pipat@socionext.com, masami.hiramatsu@linaro.org, leif.lindholm@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 --- 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(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm 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