public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: edk2-devel-01 <edk2-devel@ml01.01.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH 4/6] ArmVirtPkg/QemuFwCfgLib: add explicitly initialized instance
Date: Wed,  8 Mar 2017 20:05:09 +0100	[thread overview]
Message-ID: <20170308190511.31195-5-lersek@redhat.com> (raw)
In-Reply-To: <20170308190511.31195-1-lersek@redhat.com>

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 <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 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.<BR>
 #
 #  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 following information is for reference only and not required by the build
@@ -50,6 +48,3 @@ [LibraryClasses]
 
 [Protocols]
   gFdtClientProtocolGuid                                ## CONSUMES
-
-[Depex]
-  gFdtClientProtocolGuid
-- 
2.9.3




  parent reply	other threads:[~2017-03-08 19:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08 19:05 [PATCH 0/6] ArmVirtPkg: don't forward the DT to the OS if QEMU provides ACPI Laszlo Ersek
2017-03-08 19:05 ` [PATCH 1/6] ArmVirtPkg/FdtClientDxe: supplement missing EFIAPI calling conv specifiers Laszlo Ersek
2017-03-08 19:05 ` [PATCH 2/6] ArmVirtPkg: introduce FDT_CLIENT_PROTOCOL.GetOsExposure() member function Laszlo Ersek
2017-03-08 19:05 ` [PATCH 3/6] ArmVirtPkg/ArmVirtPL031FdtClientLib: get rid of PcdPureAcpiBoot dependency Laszlo Ersek
2017-03-08 19:05 ` Laszlo Ersek [this message]
2017-03-08 19:11   ` [PATCH 4/6] ArmVirtPkg/QemuFwCfgLib: add explicitly initialized instance Laszlo Ersek
2017-03-08 19:05 ` [PATCH 5/6] ArmVirtPkg/FdtClientDxe: don't forward DT to OS if QEMU provides ACPI Laszlo Ersek
2017-03-08 19:05 ` [PATCH 6/6] ArmVirtPkg: remove PURE_ACPI_BOOT_ENABLE and PcdPureAcpiBoot Laszlo Ersek
2017-03-09  8:16 ` [PATCH 0/6] ArmVirtPkg: don't forward the DT to the OS if QEMU provides ACPI Ard Biesheuvel
2017-03-09 11:01   ` Laszlo Ersek
2017-03-09 12:26     ` Ard Biesheuvel
2017-03-09 15:30       ` Laszlo Ersek
2017-03-09 17:00         ` Leif Lindholm
2017-03-09 17:19           ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170308190511.31195-5-lersek@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox