From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::235]) (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 D073121DFA7B1 for ; Fri, 24 Mar 2017 15:42:08 -0700 (PDT) Received: by mail-it0-x235.google.com with SMTP id y18so4271107itc.1 for ; Fri, 24 Mar 2017 15:42:08 -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=jO36VLACAEYbYrRgXBVdCvLkbawNEnmMMDbtz8u90fE=; b=HNPeoQbS50IAoL3mIXTWp9RqWqMHaZAbsIDD+Tu9xLmEo4hrYATB2gPEYixo8WFZaH u8Fj1sSbTUSe4ko15vXxrn2tHizznnFG+a+R3mLM7r7nNjtD6x9N0FLCw3VfLyt2dkJW Ppq40lvLyBN0d+6eutYX7kCUbWd273ovBmVvE= 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=jO36VLACAEYbYrRgXBVdCvLkbawNEnmMMDbtz8u90fE=; b=NEwuiaQYVUEPq3zD1gmXGG+yoVVH6G29O/6xRLdbXfGJoSuYFrxjQyGAO50pFjl42F sqbAs73AZAj7vU1gLK+gQo7WJ2foQtBSgy0Epxlo9KIDlR3zCUutKgts1HToPA9d4qf2 LbEGyJjoWOsNmxnCTUDEX8w+TM1LATOIfSNEiY2uk4xn27AKIMtXA7fwUJTVHrix2vmf GkXFeAKSnzDqSzBEn8Ts85N2TuT//f2oUHUL9P+WR3YecC69ZQQF2W/LkJWBmH9FEUFf /HwfXuEmQ81vDPkFp5IVWTmLIqy+Aqai9fP/DmKJonkzgw+phLBG95GZy0e9cnFMSkMM XGyA== X-Gm-Message-State: AFeK/H3nddi8kvc8Woq8MvX1/f8ma/Hz6+z4QQDD/yFBgks30moCV5V9x82Vwd9+TbhE9pqZPpuZIeWssnRu9T3D X-Received: by 10.107.141.134 with SMTP id p128mr9865164iod.83.1490395328087; Fri, 24 Mar 2017 15:42:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.10.27 with HTTP; Fri, 24 Mar 2017 15:42:07 -0700 (PDT) In-Reply-To: <20170324223819.11377-6-lersek@redhat.com> References: <20170324223819.11377-1-lersek@redhat.com> <20170324223819.11377-6-lersek@redhat.com> From: Ard Biesheuvel Date: Fri, 24 Mar 2017 22:42:07 +0000 Message-ID: To: Laszlo Ersek Cc: edk2-devel-01 , Leif Lindholm Subject: Re: [PATCH v3 05/12] ArmPkg: introduce PlatformHasAcpiLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2017 22:42:09 -0000 Content-Type: text/plain; charset=UTF-8 On 24 March 2017 at 22:38, Laszlo Ersek wrote: > Add the shorter-term library instance outlined in the previous > (MdeModulePkg) patch to ArmPkg, so that we can imbue AcpiTableDxe with a > protocol dependency on EDKII_PLATFORM_HAS_ACPI_GUID. > > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel > --- > > Notes: > v3: > - move GUID to MdeModulePkg (see previous patch) [Leif, Ard] > - replace ArmPkg.dec package dependency with MdeModulePkg.dec in INF > file > - rename gEdkiiPlatformHasAcpiProtocolGuid to gEdkiiPlatformHasAcpiGuid > [Star] > - update comment in empty constructor function accordingly > > ArmPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf | 40 ++++++++++++++++++++ > ArmPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.c | 36 ++++++++++++++++++ > 2 files changed, 76 insertions(+) > > diff --git a/ArmPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf b/ArmPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf > new file mode 100644 > index 000000000000..0613b0e999d2 > --- /dev/null > +++ b/ArmPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf > @@ -0,0 +1,40 @@ > +## @file > +# A hook-in library for MdeModulePkg/Universal/Acpi/AcpiTableDxe. > +# > +# Plugging this library instance into AcpiTableDxe makes > +# EFI_ACPI_TABLE_PROTOCOL and (if enabled) EFI_ACPI_SDT_PROTOCOL depend on the > +# platform's dynamic decision whether to expose an ACPI-based hardware > +# description to the operating system. > +# > +# Universal and platform specific DXE drivers that produce ACPI tables depend > +# on EFI_ACPI_TABLE_PROTOCOL / EFI_ACPI_SDT_PROTOCOL in turn. > +# > +# Copyright (C) 2017, Red Hat, Inc. > +# > +# This program and the accompanying materials are licensed and made available > +# under the terms and conditions of the BSD License which accompanies this > +# distribution. The full text of the license may be found at > +# http://opensource.org/licenses/bsd-license.php > +# > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT > +# WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +## > + > +[Defines] > + INF_VERSION = 1.25 > + BASE_NAME = PlatformHasAcpiLib > + FILE_GUID = 29beb028-0958-447b-be0a-12229235d77d > + MODULE_TYPE = BASE > + VERSION_STRING = 1.0 > + LIBRARY_CLASS = PlatformHasAcpiLib|DXE_DRIVER > + CONSTRUCTOR = PlatformHasAcpiInitialize > + > +[Sources] > + PlatformHasAcpiLib.c > + > +[Packages] > + MdeModulePkg/MdeModulePkg.dec > + MdePkg/MdePkg.dec > + > +[Depex] > + gEdkiiPlatformHasAcpiGuid > diff --git a/ArmPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.c b/ArmPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.c > new file mode 100644 > index 000000000000..2c73e71769eb > --- /dev/null > +++ b/ArmPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.c > @@ -0,0 +1,36 @@ > +/** @file > + A hook-in library for MdeModulePkg/Universal/Acpi/AcpiTableDxe. > + > + Plugging this library instance into AcpiTableDxe makes > + EFI_ACPI_TABLE_PROTOCOL and (if enabled) EFI_ACPI_SDT_PROTOCOL depend on the > + platform's dynamic decision whether to expose an ACPI-based hardware > + description to the operating system. > + > + Universal and platform specific DXE drivers that produce ACPI tables depend > + on EFI_ACPI_TABLE_PROTOCOL / EFI_ACPI_SDT_PROTOCOL in turn. > + > + Copyright (C) 2017, Red Hat, Inc. > + > + This program and the accompanying materials are licensed and made available > + under the terms and conditions of the BSD License which accompanies this > + distribution. The full text of the license may be found at > + http://opensource.org/licenses/bsd-license.php > + > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT > + WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +**/ > + > +#include > + > +RETURN_STATUS > +EFIAPI > +PlatformHasAcpiInitialize ( > + VOID > + ) > +{ > + // > + // Do nothing, just imbue AcpiTableDxe with a protocol dependency on > + // EDKII_PLATFORM_HAS_ACPI_GUID. > + // > + return RETURN_SUCCESS; > +} > -- > 2.9.3 > >