From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=TxRrwlmZ; spf=none, err=SPF record not found (domain: semihalf.com, ip: 209.85.222.193, mailfrom: mw@semihalf.com) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by groups.io with SMTP; Sat, 27 Apr 2019 02:17:36 -0700 Received: by mail-qk1-f193.google.com with SMTP id m137so3356690qke.3 for ; Sat, 27 Apr 2019 02:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=bIygf835qKq0eOPCxnP/c/01evLN4vMAnUirSFQEbVg=; b=TxRrwlmZEing9DJPNxcXoOoaxCZkUhXMwo9QxKqdxL261mXGfxURc895HPQdQEkoNn 4luZ48NfjCk3HQGM0doJV0aaNGybm9+/AiXbuoOMy4t/nL7Vd0vVzhr6VVQmZm+YR211 VjZxPDoN6SGClrVC5BP5g0TWllwdUd8/PuPu/sxquw4UJbvN0WFdjEkaqnNSRgaGPUVA qsxNsFgDP0/iWKPQsCJIGCw1XuBv30cz7EYwKttN5mIB2AUTZF7lTcIdTgu1AEUiBYlA KFtWImvxcThyusfbZ8+ooTNsoSygjoDRhWrirqvpgxtqYY65gTxP/Ddm+HafbTvq5scn YBQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=bIygf835qKq0eOPCxnP/c/01evLN4vMAnUirSFQEbVg=; b=JDTNb9y+65+3Lk7tQhfJQVJOVHVXK03GJLCO9grO+UavF11X9EnE/6RXEb7WrdnNfK 9cap3d/V9h2fQ5uoSH0Mw3fMVIC89YsRKm56QKpmaKoSIohTf7Bj4OmDz3o31UT0mNBd tnq66WgR/RLU/Ylj65Ucy2uUjXXacATYBmzTMnTFxFY3+Twwf1J7Lee1saK2xbj3zhtK reeG3qS2TpnGDhZbPcnbBms7aXcOV+TcFLKzPdoZwRlzRPuZXx5/xtiFVcbvAzUzaWfE ot+9eRIBcze2Y+erMqAEK5Fu8BG+4OIhAtuwW0hLnZpTdIR1gx8ZjwCdAzT8HBLzMQhk +VCw== X-Gm-Message-State: APjAAAUcETk8E62BGJ4Bfij6EHK+VOnMwnEY0lb/hvLpxNcRJS8VmyQt PDLI9s0n2pdaD2Tskqey1YzkHGIJR7veQ/w2p60f7A== X-Google-Smtp-Source: APXvYqwbIjjbwtqWcJp84zA4NVMEP401HawFhVvePqIJj3zGDjiVgDKsk68GJK+ywEHX37Cr3ft5L4WKP70fSx3fL0w= X-Received: by 2002:ae9:ea15:: with SMTP id f21mr35364319qkg.57.1556356655771; Sat, 27 Apr 2019 02:17:35 -0700 (PDT) MIME-Version: 1.0 References: <1556183880-5889-1-git-send-email-mw@semihalf.com> <3de18a85-8c33-ad9b-27a2-3c81ab2bd38d@redhat.com> In-Reply-To: <3de18a85-8c33-ad9b-27a2-3c81ab2bd38d@redhat.com> From: "Marcin Wojtas" Date: Sat, 27 Apr 2019 11:17:23 +0200 Message-ID: Subject: Re: [PATCH] EmbeddedPkg: Allow DXE_DRIVER to depend on NvVarStoreFormattedLib To: Laszlo Ersek Cc: Ard Biesheuvel , edk2-devel-groups-io , Leif Lindholm , =?UTF-8?B?SmFuIETEhWJyb8Wb?= , Grzegorz Jaszczyk , Kostya Porotchkin , Jici Gao , "Tian, Feng" , "Kinney, Michael D" , "Gao, Liming" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Laszlo, sob., 27 kwi 2019 o 01:38 Laszlo Ersek napisa=C5=82(a): > > On 04/26/19 19:02, Laszlo Ersek wrote: > > On 04/25/19 13:04, Ard Biesheuvel wrote: > >> On Thu, 25 Apr 2019 at 11:18, Marcin Wojtas wrote: > >>> > >>> Some modules (such as FaultTolerantWriteDxe) use the FlashNvStorage > >>> PCDs (PcdFlashNvStorageFtw*). In case the flash contents are not > >>> mapped in memory, the module loading order of the FVB driver > >>> may become important. > >>> > >>> To handle above, this patch allows to hook the dependency of > >>> desired DXE_DRIVER type module in the .DSC file via > >>> NvVarStoreFormattedLib NULL resolution. > >>> > >>> Contributed-under: TianoCore Contribution Agreement 1.1 > >> > >> This line is no longer required, so you can drop it in the future. > >> > >> Note that the licensing terms have changed accordingly: by > >> contributing patches under the new license terms, you are basically > >> granting the same IP rights you were granting before by adhering to > >> the TianoCore Contribution Agreement, so nothing has really changed. > >> However, it is your *own* responsibility to confirm that I am not > >> misrepresenting anything here, so please check the repository for the > >> license changes. > >> > >>> Signed-off-by: Marcin Wojtas > >> > >> Reviewed-by: Ard Biesheuvel > >> > >> Pushed as b9d4847ec258..20029ca22baa > > > > patch looks good to me as well, thanks > > Hmm, don't know how I missed it, but the INF file still has: > > LIBRARY_CLASS =3D NvVarStoreFormattedLib|PEIM DXE_RUNT= IME_DRIVER DXE_SMM_DRIVER > > I don't understand why BaseTools don't catch that, when the lib instance = is hooked into a DXE_DRIVER. > > ... Perhaps because the "hooking" uses the "NULL class", and the above re= striction list only applies to the NvVarStoreFormattedLib class (which is u= ltimately nev > > I'm not sure; still for consistency's sake, I think we should add DXE_DRI= VER to LIBRARY_CLASS too. > I've just submitted a patch extending the LIBRARY_CLASS. Best regards. Marcin > >> > >> Thanks, > >>> --- > >>> EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.in= f | 4 ++-- > >>> 1 file changed, 2 insertions(+), 2 deletions(-) > >>> > >>> diff --git a/EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFor= mattedLib.inf b/EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormat= tedLib.inf > >>> index fefc311..98a0049 100644 > >>> --- a/EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedL= ib.inf > >>> +++ b/EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedL= ib.inf > >>> @@ -39,8 +39,8 @@ > >>> # > >>> # The matching DEPEX section below will generate the EFI_SECTION_PEI= _DEPEX, > >>> # EFI_SECTION_DXE_DEPEX or EFI_SECTION_MM_DEPEX leaf section for the= PEIM > >>> -# (EFI_FV_FILETYPE_PEIM), DXE_RUNTIME_DRIVER (EFI_FV_FILETYPE_DRIVER= ), or > >>> +# (EFI_FV_FILETYPE_PEIM), DXE_RUNTIME_DRIVER/DXE_DRIVER (EFI_FV_FILE= TYPE_DRIVER), or > >>> # DXE_SMM_DRIVER (EFI_FV_FILETYPE_MM) module, respectively. > >>> # > >>> -[Depex.common.PEIM, Depex.common.DXE_RUNTIME_DRIVER, Depex.common.DX= E_SMM_DRIVER] > >>> +[Depex.common.PEIM, Depex.common.DXE_RUNTIME_DRIVER, Depex.common.DX= E_DRIVER, Depex.common.DXE_SMM_DRIVER] > >>> gEdkiiNvVarStoreFormattedGuid > >>> -- > >>> 2.7.4 > >>> > > >