public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: [PATCH] EmbeddedPkg/DtPlatformDxe: remove /chosen/stdout-path on GOP registration
Date: Fri, 20 Oct 2017 17:18:35 +0200	[thread overview]
Message-ID: <67538bc0-93b3-38d1-893d-cdfea242f18a@redhat.com> (raw)
In-Reply-To: <CAKv+Gu9VJ7MVCnNdxXpJDuYJEreodK3GO711-fSd+LjLmpj+ww@mail.gmail.com>

On 10/20/17 13:40, Ard Biesheuvel wrote:

> I think the best way forward is to implement a separate driver with
> its own HII form, that removes /chosen/stdout-path and uninstalls the
> SPCR table if either or both are present. I couldn't figure out how to
> uninstall a ACPI table though, so I may need to move the SPCR
> installation into that driver as well.

In general it's best to consider an ACPI table "owned" by the driver
that installs it in the first place. The

  EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable()

function (from the UEFI spec) outputs a TableKey parameter, and only
that parameter can be used as input to the

  EFI_ACPI_TABLE_PROTOCOL.UninstallAcpiTable()

function (also from the UEFI spec).


The PI spec defines

  EFI_ACPI_SDT_PROTOCOL

which has a member function called

  EFI_ACPI_SDT_PROTOCOL.GetAcpiTable()

Using this function, you can iterate over all the tables, investigate
each, and even get the TableKey for uninstallation. (See the function's
specification itself.)


So, if you are willing to "go PI", then independent uninstallation is
possible. But, IMO, the unclear ownership of any table can lead to a
mess down the road.

In edk2, EFI_ACPI_SDT_PROTOCOL is available from

  MdeModulePkg/Universal/Acpi/AcpiTableDxe

if

  gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol

is TRUE.

For one example, OVMF set the PCD in commit 259d87146b07 ("OvmfPkg:
Modify FDF/DSC files for RamDiskDxe's adding NFIT report feature",
2016-04-19).

Thanks!
Laszlo


      reply	other threads:[~2017-10-20 15:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19 19:21 [PATCH] EmbeddedPkg/DtPlatformDxe: remove /chosen/stdout-path on GOP registration Ard Biesheuvel
2017-10-19 20:55 ` Leif Lindholm
2017-10-19 21:19   ` Ard Biesheuvel
2017-10-19 21:36     ` Leif Lindholm
2017-10-20 10:44 ` Laszlo Ersek
2017-10-20 11:40   ` Ard Biesheuvel
2017-10-20 15:18     ` Laszlo Ersek [this message]

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=67538bc0-93b3-38d1-893d-cdfea242f18a@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