public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 0/1] OvmfPkg/AcpiPlatformDxe: Fix bug 368, multiply pointed-to tables
@ 2017-03-29  7:50 Phil Dennis-Jordan
  2017-03-29  7:50 ` [PATCH v1 1/1] OvmfPkg: Allow multiple add-pointer linker commands to same ACPI table Phil Dennis-Jordan
  0 siblings, 1 reply; 5+ messages in thread
From: Phil Dennis-Jordan @ 2017-03-29  7:50 UTC (permalink / raw)
  To: edk2-devel; +Cc: Phil Dennis-Jordan

From: Phil Dennis-Jordan <phil@philjordan.eu>

This fixes the bug in OVMF's Qemu ACPI table linker which caused it to
fail 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 re-install it. I hope I got the implementation details
right. 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.)

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_v1

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

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

-- 
2.3.2 (Apple Git-55)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-30 15:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-29  7:50 [PATCH v1 0/1] OvmfPkg/AcpiPlatformDxe: Fix bug 368, multiply pointed-to tables Phil Dennis-Jordan
2017-03-29  7:50 ` [PATCH v1 1/1] OvmfPkg: Allow multiple add-pointer linker commands to same ACPI table Phil Dennis-Jordan
2017-03-30  1:06   ` Laszlo Ersek
2017-03-30 10:41     ` Phil Dennis-Jordan
2017-03-30 15:58       ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox