From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::243; helo=mail-io0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::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 769722244E3EE for ; Sun, 15 Apr 2018 22:40:12 -0700 (PDT) Received: by mail-io0-x243.google.com with SMTP id t123so9463898iof.7 for ; Sun, 15 Apr 2018 22:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zxU7+egg/T0HP1MH0JmrZv9KNHfuSECEPbOWZ2ATplI=; b=SRGS+v+dISu2cvioshrD/rWlqgqmWjfV8c4+eqMKkrMFNmuN91oSCMXfJNJ6+9huLk S3obQUodSouxDnjXoFULSD4PZynNg8X6fU++p19JryrvTF7sXY6OxllDJN8yYzXZcgEi XVsCuhMaCC5xpSnOmSs0gk3KjojisvJ5o/WgQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zxU7+egg/T0HP1MH0JmrZv9KNHfuSECEPbOWZ2ATplI=; b=TqXHnFFhHyQowBfcNEKomEIlxumUSea2eI9VVNBB1xidVIcYYoqFAMpdwMusrkRKNr 95//DH4k/3tVfkpZnHP9W4DQApP3V2UoOb1v0BMaP5krfJ7vbEJhghpOTYsmYm8askYE RFgjTqKtSYWOyw0ME7lWnwW0Dfwym+Pjh+F6m5kgl0tbXC8BKyKkM+km5vs0PlWiZFEV hkmgNkk2SA0ARu/mCGS4IJXb3bRMDyr/9hmO+itiP7xTel/Dqta69mVDJRyiQ7tvOTwz XhlqOEQsb59XyyCPI46p2lbxhoXpdVylLQGWjwmFAnoCVgB9My2B8s5GUBSPtScueMBA j8Pw== X-Gm-Message-State: ALQs6tBFYN+7lawtplIp7nqBhjOWFoAiRy+V5pPpOirxUE66uJqErQFI T/yjLSCT5Z3BYGioRloZjbehYCD9SVzTeqZSH1EbXg== X-Google-Smtp-Source: AIpwx4+nKJJ0Tt5tY02ci6yeke18OGp/hbQuk9/1aHQL9L8OK4/mfNsFWrA45QNQCIrey4k5zVAf6v6WPYhlYSviWqY= X-Received: by 10.107.161.199 with SMTP id k190mr16795651ioe.60.1523857211060; Sun, 15 Apr 2018 22:40:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.187.67 with HTTP; Sun, 15 Apr 2018 22:40:10 -0700 (PDT) In-Reply-To: <1523855353-9262-2-git-send-email-mw@semihalf.com> References: <1523855353-9262-1-git-send-email-mw@semihalf.com> <1523855353-9262-2-git-send-email-mw@semihalf.com> From: Ard Biesheuvel Date: Mon, 16 Apr 2018 07:40:10 +0200 Message-ID: To: Marcin Wojtas , Laszlo Ersek Cc: "edk2-devel@lists.01.org" , Leif Lindholm , Nadav Haklai , Neta Zur Hershkovits , Hua Jing , =?UTF-8?B?SmFuIETEhWJyb8Wb?= , Grzegorz Jaszczyk Subject: Re: [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:40:13 -0000 Content-Type: text/plain; charset="UTF-8" (+ Laszlo) On 16 April 2018 at 07:09, Marcin Wojtas wrote: > 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 > Hello Marcin, Installing this GUID is only necessary if you update your platform .DSC to make the generic variable runtime driver depend on it by adding a NULL library class resolution using NvVarStoreFormattedLib. So I think this patch is correct, but you'll need an additional change to make it work as expected. (Otherwise, the variable runtime driver could still be dispatched early and invoked for read access before the variable store is reformatted) > * 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 >