public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Phil Dennis-Jordan <lists@philjordan.eu>
To: edk2-devel@lists.01.org
Subject: [PATCH v2 0/1] OvmfPkg/AcpiPlatformDxe: Fix bug 368, multiply pointed-to tables
Date: Thu, 30 Mar 2017 23:40:56 +1300	[thread overview]
Message-ID: <1490870457-27859-1-git-send-email-lists@philjordan.eu> (raw)

This fixes the bug in OVMF's Qemu ACPI table linker which caused it to
fail or misbehave when multiple fields point to the same table.
Previously, each pointer caused the pointed-to table to be installed
via the EFI_ACPI_TABLE_PROTOCOL. However, each table must only be
installed once via this mechanism.

The patch fixes this (as previously suggested by Laszlo) via memoisation
of the pointers. If it encounters the same pointer twice, it will no
longer try to process it again.

I've tested it successfully with Windows 10, a recent Ubuntu
version, and OS X as guest OSes. (further OVMF patches required for
booting the latter)

I found this bug while trying to patch Qemu to generate a Rev3 FADT (as
per ACPI 2.0) instead of a Rev1 FADT (ACPI 1.0). Said patch has missed
the Qemu 2.9 merge window, but has been provisionally accepted for 2.10
(save for some minor tweaks) and will break the ACPI table linker
on unpatched OVMF. (When this bug is triggered, OVMF reverts to its
built-in ACPI tables, ignoring those provided by Qemu.)

v1 -> v2
- The only functional change is that the memoisation happens earlier
  in the processing of QEMU_LOADER_ADD_POINTER commands; right at the
  start, not immediately before installing the table. [Laszlo]
- Other changes are documentation/naming/style. (see patch 1/1) [Laszlo]

Previous discussion: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg06679.html

Qemu patch: https://lists.gnu.org/archive/html/qemu-devel/2017-03/msg02837.html

Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=368

Github feature branch: https://github.com/pmj/edk2/tree/bug_368_v2

Phil Dennis-Jordan (1):
  OvmfPkg: Allow multiple add-pointer linker commands to same ACPI table

 OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 109 ++++++++++++++++++--
 1 file changed, 98 insertions(+), 11 deletions(-)

-- 
2.3.2 (Apple Git-55)



             reply	other threads:[~2017-03-30 10:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30 10:40 Phil Dennis-Jordan [this message]
2017-03-30 10:40 ` [PATCH v2 1/1] OvmfPkg: Allow multiple add-pointer linker commands to same ACPI table Phil Dennis-Jordan
2017-03-30 20:20   ` Laszlo Ersek
2017-04-02 22:47     ` Phil Dennis-Jordan

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=1490870457-27859-1-git-send-email-lists@philjordan.eu \
    --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