public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Laszlo Ersek <lersek@redhat.com>
Cc: edk2-devel-01 <edk2-devel@lists.01.org>,
	Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: [PATCH v3 05/12] ArmPkg: introduce PlatformHasAcpiLib
Date: Fri, 24 Mar 2017 22:42:07 +0000	[thread overview]
Message-ID: <CAKv+Gu-tkfjLvqCdfPf_xybDTAn+z5h8Xu5-2H_o5y3T9E-4Cg@mail.gmail.com> (raw)
In-Reply-To: <20170324223819.11377-6-lersek@redhat.com>

On 24 March 2017 at 22:38, Laszlo Ersek <lersek@redhat.com> 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 <ard.biesheuvel@linaro.org>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>
> 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 <Base.h>
> +
> +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
>
>


  reply	other threads:[~2017-03-24 22:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 22:38 [PATCH v3 00/12] ArmVirtPkg: don't forward the DT to the OS if QEMU provides ACPI Laszlo Ersek
2017-03-24 22:38 ` [PATCH v3 01/12] Revert "ArmVirtPkg/FdtClientDxe: make DT table installation !ACPI dependent" Laszlo Ersek
2017-03-24 22:38 ` [PATCH v3 02/12] Revert "ArmVirtPkg/FdtClientDxe: install DT configuration table at ReadyToBoot" Laszlo Ersek
2017-03-24 22:38 ` [PATCH v3 03/12] ArmVirtPkg/XenAcpiPlatformDxe: don't cast UINT64 to pointer directly Laszlo Ersek
2017-03-24 22:38 ` [PATCH v3 04/12] MdeModulePkg: introduce EDKII Platform Has ACPI GUID Laszlo Ersek
2017-03-24 22:41   ` Ard Biesheuvel
2017-03-28  8:20   ` Laszlo Ersek
2017-03-24 22:38 ` [PATCH v3 05/12] ArmPkg: introduce PlatformHasAcpiLib Laszlo Ersek
2017-03-24 22:42   ` Ard Biesheuvel [this message]
2017-03-24 22:38 ` [PATCH v3 06/12] EmbeddedPkg: introduce EDKII Platform Has Device Tree GUID Laszlo Ersek
2017-03-24 22:42   ` Ard Biesheuvel
2017-03-24 22:38 ` [PATCH v3 07/12] ArmVirtPkg: add PlatformHasAcpiDtDxe Laszlo Ersek
2017-03-24 22:38 ` [PATCH v3 08/12] ArmVirtPkg: add XenPlatformHasAcpiDtDxe Laszlo Ersek
2017-03-24 22:38 ` [PATCH v3 09/12] ArmVirtPkg: enable AcpiTableDxe and EFI_ACPI_TABLE_PROTOCOL dynamically Laszlo Ersek
2017-03-24 22:43   ` Ard Biesheuvel
2017-03-24 22:38 ` [PATCH v3 10/12] ArmVirtPkg/FdtClientDxe: install DT as sysconfig table in protocol notify Laszlo Ersek
2017-03-24 22:38 ` [PATCH v3 11/12] ArmVirtPkg/PlatformHasAcpiDtDxe: don't expose DT if QEMU provides ACPI Laszlo Ersek
2017-03-24 22:38 ` [PATCH v3 12/12] ArmVirtPkg: remove PURE_ACPI_BOOT_ENABLE and PcdPureAcpiBoot 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=CAKv+Gu-tkfjLvqCdfPf_xybDTAn+z5h8Xu5-2H_o5y3T9E-4Cg@mail.gmail.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