audk/OvmfPkg/AcpiPlatformDxe
Phil Dennis-Jordan 072060a6f8 OvmfPkg: Allow multiple add-pointer linker commands to same ACPI table
ACPI tables may contain multiple fields which point to the same
destination table. For example, in some revisions, the FADT contains
both DSDT and X_DSDT fields, and they may both point to the DSDT.

Previously, if Qemu created QEMU_LOADER_ADD_POINTER linker commands for
such instances, the linking process would attempt to install the same
pointed-to table repeatedly. For tables of which there must only be one
instance, the call to AcpiProtocol->InstallAcpiTable() would fail during
the second linker command pointing to the same table, thus entirely
aborting the ACPI table linking process. In the case of tables of which
there may be multiple instances, the table would end up duplicated.

This change adds a memoisation data structure which tracks the table
pointers that have already been processed; even if the same pointer is
encountered multiple times, it is only processed once.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: DSDT<->XSDT typo, debug msg, and coding style fixups]
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=368
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2017-03-30 21:53:13 +02:00
..
AcpiPlatform.c OvmfPkg: AcpiPlatformDxe: extract common entry point 2015-02-19 23:45:57 +00:00
AcpiPlatform.h OvmfPkg/AcpiPlatformDxe: save fw_cfg boot script with QemuFwCfgS3Lib 2017-03-14 21:49:38 +01:00
AcpiPlatformDxe.inf OvmfPkg/AcpiPlatformDxe: save fw_cfg boot script with QemuFwCfgS3Lib 2017-03-14 21:49:38 +01:00
BootScript.c OvmfPkg/AcpiPlatformDxe: save fw_cfg boot script with QemuFwCfgS3Lib 2017-03-14 21:49:38 +01:00
EntryPoint.c OvmfPkg: AcpiPlatformDxe: when PCI is enabled, wait for Platform BDS's cue 2016-03-23 17:39:35 +01:00
PciDecoding.c OvmfPkg: AcpiPlatformDxe: Don't enable unsupported PCI attributes 2016-04-19 13:18:34 +02:00
Qemu.c OvmfPkg/AcpiPlatformDxe: Split QEMU fw-cfg into a new file 2015-02-02 19:08:57 +00:00
QemuFwCfgAcpi.c OvmfPkg: Allow multiple add-pointer linker commands to same ACPI table 2017-03-30 21:53:13 +02:00
QemuFwCfgAcpiPlatform.c OvmfPkg: AcpiPlatformDxe: extract common entry point 2015-02-19 23:45:57 +00:00
QemuFwCfgAcpiPlatformDxe.inf OvmfPkg/AcpiPlatformDxe: save fw_cfg boot script with QemuFwCfgS3Lib 2017-03-14 21:49:38 +01:00
QemuLoader.h OvmfPkg/AcpiPlatformDxe: add QEMU_LOADER_WRITE_POINTER definitions 2017-02-21 13:10:33 +01:00
Xen.c OvmfPkg/AcpiPlatformDxe: Fix Visual Studio build issues 2012-08-09 23:27:05 +00:00