From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EE30B8036F for ; Wed, 8 Mar 2017 11:11:31 -0800 (PST) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8801581245; Wed, 8 Mar 2017 19:11:32 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-47.phx2.redhat.com [10.3.117.47]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v28JBV6q000740; Wed, 8 Mar 2017 14:11:31 -0500 To: edk2-devel-01 References: <20170308190511.31195-1-lersek@redhat.com> <20170308190511.31195-5-lersek@redhat.com> Cc: Ard Biesheuvel From: Laszlo Ersek Message-ID: <2c6a1b37-7b80-2dbc-fa3d-86b9f6f5fa0f@redhat.com> Date: Wed, 8 Mar 2017 20:11:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170308190511.31195-5-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 08 Mar 2017 19:11:32 +0000 (UTC) Subject: Re: [PATCH 4/6] ArmVirtPkg/QemuFwCfgLib: add explicitly initialized instance X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2017 19:11:32 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 03/08/17 20:05, Laszlo Ersek wrote: > The QemuFwCfgLibExplicitInit instance differs from the normally used one > in that the client module has to call the QemuFwCfgInitialize() function > explicitly -- there is no library constructor --, and the client shall > also ensure that the dependency on FDT_CLIENT_PROTOCOL is satisfied -- > there is no DepEx. > > In particular this enables the module that produces FDT_CLIENT_PROTOCOL to > use the library, after the protocol is installed. > > Note that neither QemuFwCfgLib instance calls > FDT_CLIENT_PROTOCOL.GetOsExposure(). In fact, the QemuFwCfgLibExplicitInit > instance will be utilized to implement > FDT_CLIENT_PROTOCOL.GetOsExposure(). > > Cc: Ard Biesheuvel > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek > --- > ArmVirtPkg/Library/QemuFwCfgLib/{QemuFwCfgLib.inf => QemuFwCfgLibExplicitInit.inf} | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) > > diff --git a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf b/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLibExplicitInit.inf > similarity index 72% > copy from ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf > copy to ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLibExplicitInit.inf > index eff4a2165062..007e5f1b2d54 100644 > --- a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf > +++ b/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLibExplicitInit.inf > @@ -1,8 +1,8 @@ > ## @file > # > -# Stateful, implicitly initialized fw_cfg library. > +# Stateful, explicitly initialized fw_cfg library. > # > -# Copyright (C) 2013 - 2014, Red Hat, Inc. > +# Copyright (C) 2013 - 2017, Red Hat, Inc. > # Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.
> # > # This program and the accompanying materials are licensed and made available > @@ -18,13 +18,11 @@ > > [Defines] > INF_VERSION = 0x00010005 > - BASE_NAME = QemuFwCfgLib > - FILE_GUID = B271F41F-B841-48A9-BA8D-545B4BC2E2BF > + BASE_NAME = QemuFwCfgLibExplicitInit > + FILE_GUID = 7DF98175-3819-4966-A48C-E56056EA8F42 > MODULE_TYPE = BASE > VERSION_STRING = 1.0 > - LIBRARY_CLASS = QemuFwCfgLib|DXE_DRIVER > - > - CONSTRUCTOR = QemuFwCfgInitialize > + LIBRARY_CLASS = QemuFwCfgLib|DXE_DRIVER UEFI_DRIVER The LIBRARY_CLASS change was unintentional (rebase oversight); if no other issue is found, I'll fix it up before I push the series. Thanks & sorry Laszlo > > # > # The following information is for reference only and not required by the build > @@ -50,6 +48,3 @@ [LibraryClasses] > > [Protocols] > gFdtClientProtocolGuid ## CONSUMES > - > -[Depex] > - gFdtClientProtocolGuid >