From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:4010:c07::243; helo=mail-lf0-x243.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lf0-x243.google.com (mail-lf0-x243.google.com [IPv6:2a00:1450:4010:c07::243]) (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 3E5AF226EAC8C for ; Sun, 15 Apr 2018 22:09:48 -0700 (PDT) Received: by mail-lf0-x243.google.com with SMTP id n14-v6so2529051lfe.5 for ; Sun, 15 Apr 2018 22:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=q9ZLkvPltkGZ1tyEHvueriI1DBnp+lBYbN84pKyp3sA=; b=opXSz1lNuB8QQJ9NW3ZjgC9WwaYHSevnRzqf+OiL7DkLGDymlRPRScUpnwltXLedxu m+YASwJR2QuBqi+hqL/8IzLDOaKbvE7nO5DRp/v9Dgxkwqj2/1Z//PDEvNbQ5yvrPXlK QI4KRILh7iuc3f2RfIGwyr8evHYiCpk5B1oWPBdMVv/F53B9gzrF3xRb2UWyCzvCKS3K l4HSb4yhz8j4lhiGSDxfq8lZFTstG3juJerH9TJhhrqdXNFDp5Lsw5B3NZmd7TqhbV13 HgG7fkr5hEG3gaXLaxDxrIgO7OJXEkhDOQ+3VMELOn57V+hcLKOCiO+qiOwncQKRBB9C OWUg== 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=q9ZLkvPltkGZ1tyEHvueriI1DBnp+lBYbN84pKyp3sA=; b=Ba3htN5HJVYxMVaV3r3kxar01aZHRPMY0unqYpDVAjHSPj6pxG9GE7oK6w/KgODdBm dpDkE7XRcG3MYW9+64qP9tYb0IvAcPhw8B69sd+mBsjv1R0KffFQa5s7AmsbW31dp0sy N7rrjX/0WV1bT28DxCmRDmYbf5BF3Gj5unayMu4pepMeKL5wbLT3LETAuhYsAa2N8RX8 Sem/zPZjrk8GUjQqmjxzLL+OA3f7Olu98/BrZdKAP+9JBzqFemLdGXppDcX9kJH5gatI AitG4ARoNRJW76iWl8xQpXB++8ilzqQAuh8+CBsUaxakrHhLS8gFiv0sBukpvWeRA3ZZ uJWA== X-Gm-Message-State: ALQs6tASJj9+QyI2QZzW659yuQRmPsojl0lIkBAgfLRcwxBMgEe36NHA FuilW24ftJV0EkzgSxZXieBEHz0AD9A= X-Google-Smtp-Source: AIpwx4+CdEZu0POYAmMbWRflebwJnR9UVzQXkOnK63dDDD8XrbQDG/DLZotmB7AF7Hgrjizasr9Aiw== X-Received: by 10.46.158.199 with SMTP id h7mr8654768ljk.103.1523855386047; Sun, 15 Apr 2018 22:09:46 -0700 (PDT) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id d27-v6sm2683717lfb.6.2018.04.15.22.09.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 15 Apr 2018 22:09:45 -0700 (PDT) From: Marcin Wojtas To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, nadavh@marvell.com, neta@marvell.com, jinghua@marvell.com, mw@semihalf.com, jsd@semihalf.com, jaz@semihalf.com Date: Mon, 16 Apr 2018 07:09:12 +0200 Message-Id: <1523855353-9262-2-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523855353-9262-1-git-send-email-mw@semihalf.com> References: <1523855353-9262-1-git-send-email-mw@semihalf.com> Subject: [platforms PATCH 1/2] Marvell/Drivers: MvFvbDxe: Adjust to new dependencies X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Apr 2018 05:09:48 -0000 Recent changes in the EDK2 mainline resulted in breaking of compilation and booting of Armada platforms. This patch adjust the MvFvbDxe driver by: * installation of gEdkiiNvVarStoreFormattedGuid in order to signal NvVarStoreFormattedLib to the generic variable runtime driver * making explicit dependency to ArmPkg/Drivers/CpuDxe drivers in order to enable successful calling of gDS->SetMemorySpaceAttributes Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c | 21 ++++++++++++++++++++ Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.inf | 7 ++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c index 252ef67..6e583a3 100644 --- a/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c +++ b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -1076,6 +1077,21 @@ MvFvbEntryPoint ( } // + // The driver implementing the variable read service can now be dispatched; + // the varstore headers are in place. + // + Status = gBS->InstallProtocolInterface (&gImageHandle, + &gEdkiiNvVarStoreFormattedGuid, + EFI_NATIVE_INTERFACE, + NULL); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, + "%a: Failed to install gEdkiiNvVarStoreFormattedGuid\n", + __FUNCTION__)); + goto ErrorInstallNvVarStoreFormatted; + } + + // // Declare the Non-Volatile storage as EFI_MEMORY_RUNTIME // RuntimeMmioRegionSize = mFvbDevice->FvbSize; @@ -1126,6 +1142,11 @@ ErrorSetMemAttr: gDS->RemoveMemorySpace (RegionBaseAddress, RuntimeMmioRegionSize); ErrorAddSpace: + gBS->UninstallProtocolInterface (&gImageHandle, + &gEdkiiNvVarStoreFormattedGuid, + NULL); + +ErrorInstallNvVarStoreFormatted: gBS->UninstallMultipleProtocolInterfaces (&mFvbDevice->Handle, &gEfiDevicePathProtocolGuid, &gEfiFirmwareVolumeBlockProtocolGuid, diff --git a/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.inf b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.inf index 117fe8b..fd3f2f7 100644 --- a/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.inf +++ b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.inf @@ -63,6 +63,7 @@ UefiRuntimeServicesTableLib [Guids] + gEdkiiNvVarStoreFormattedGuid gEfiAuthenticatedVariableGuid gEfiEventVirtualAddressChangeGuid gEfiSystemNvDataFvGuid @@ -84,8 +85,4 @@ gMarvellTokenSpaceGuid.PcdSpiMemoryBase [Depex] - # - # MvFvbDxe must be loaded before VariableRuntimeDxe in case empty - # flash needs populating with default values. - # - BEFORE gVariableRuntimeDxeFileGuid + gEfiCpuArchProtocolGuid -- 2.7.4