From nobody Thu Dec 26 13:56:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1504895071704551.0660165179432; Fri, 8 Sep 2017 11:24:31 -0700 (PDT) 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) 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) 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) X-Original-To: edk2-devel@lists.01.org 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) 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 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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/SynquacerMem= oryInitPeiLib.c | 10 ++++++ Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/SynquacerMem= oryInitPeiLib.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 =20 + # + # 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"|gEfiGlobalVar= iableGuid|0x0|5 =20 @@ -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 =20 @@ -378,6 +390,22 @@ } =20 # + # Variable services + # + Silicon/Socionext/Synquacer/Drivers/Fip006Dxe/Fip006Dxe.inf { + + NorFlashPlatformLib|Silicon/Socionext/Synquacer/Library/NorFlashSynq= uacerLib/NorFlashSynquacerLib.inf + } + MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { + + AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariabl= eLibNull.inf + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf + TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeas= urementLibNull.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 =20 # 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 =3D 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 =20 @@ -116,6 +114,13 @@ READ_LOCK_STATUS =3D TRUE INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf =20 # + # Variable services + # + INF Silicon/Socionext/Synquacer/Drivers/Fip006Dxe/Fip006Dxe.inf + INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.i= nf + 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/Synquacer= MemoryInitPeiLib/SynquacerMemoryInitPeiLib.c index 1d25d63f1b6c..1af30a2bbe60 100644 --- a/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/Synquac= erMemoryInitPeiLib.c +++ b/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/Synquac= erMemoryInitPeiLib.c @@ -87,6 +87,16 @@ STATIC ARM_MEMORY_REGION_DESCRIPTOR mVirtualMemoryTable[= ] =3D { ARM_DEVICE_REGION (SYNQUACER_PCI_SEG1_PORTIO_MEMBASE, SYNQUACER_PCI_SEG1_PORTIO_MEMSIZE), =20 + // 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)), + { } }; =20 diff --git a/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/= SynquacerMemoryInitPeiLib.inf b/Silicon/Socionext/Synquacer/Library/Synquac= erMemoryInitPeiLib/SynquacerMemoryInitPeiLib.inf index 5f45c30a5e92..044c19ff9600 100644 --- a/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/Synquac= erMemoryInitPeiLib.inf +++ b/Silicon/Socionext/Synquacer/Library/SynquacerMemoryInitPeiLib/Synquac= erMemoryInitPeiLib.inf @@ -30,6 +30,7 @@ MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec Silicon/Socionext/Synquacer/Synquacer.dec + Silicon/Socionext/Synquacer/Drivers/Fip006Dxe/Fip006Dxe.dec =20 [LibraryClasses] ArmLib @@ -48,3 +49,4 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize + gFip006DxeTokenSpaceGuid.PcdFip006DxeRegBaseAddress --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel