Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Laszlo Ersek 387536e472 OvmfPkg: AcpiPlatformDxe: implement QEMU's full ACPI table loader interface
Recent changes in the QEMU ACPI table generator have shown that our
limited client for that interface is insufficient and/or brittle.

Implement the full interface utilizing OrderedCollectionLib for addressing
fw_cfg blobs by name.

In order to stay compatible with EFI_ACPI_TABLE_PROTOCOL, we don't try to
identify QEMU's RSD PTR and link it into the UEFI system configuration
table. Instead, once all linker/loader commands have been processed, we
process the AddPointer commands for a second time.

In the second pass, we look at the targets of these pointer commands. The
key idea (by Michael Tsirkin) is that any ACPI interpreter will only be
able to locate ACPI tables by following absolute pointers, hence QEMU's
set of AddPointer commands will cover all of the ACPI tables (and more,
see below).

Some of QEMU's AddPointer commands (ie. some fields in ACPI tables) may
point to areas in fw_cfg blobs that are not ACPI tables themselves.
Examples are the BGRT.ImageAddress field, and the TCPA.LASA field. We tell
these apart from ACPI tables by performing the following checks on pointer
target "candidates":
- length check against minimum ACPI table size, and remaining blob size
- checksum verification.

If a target area looks like an ACPI table, and is different from RSDT and
DSDT (which EFI_ACPI_TABLE_PROTOCOL handles internally), we install the
table (at which point EFI_ACPI_TABLE_PROTOCOL creates a deep copy of the
relevant segment of the pointed-to fw_cfg blob).

Simultaneously, we keep account if each fw_cfg blob has ever been
referenced as the target of an AddPointer command without that AddPointer
command actually identifying an ACPI table. In this case the containing
fw_cfg file (of AcpiNVS memory type) must remain around forever, because
we never install that area with EFI_ACPI_TABLE_PROTOCOL, but some field in
some ACPI table that we *do* install still references it, by the absolute
address that we've established during the first pass.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16158 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-22 21:11:22 +00:00
AppPkg StdLib: Produce DevMedia as a library class alternative to DevShell. 2014-09-18 19:13:22 +00:00
ArmPkg ArmPkg/TimerDxe: add workaround for KVM timer interrupt handling 2014-09-18 21:16:47 +00:00
ArmPlatformPkg ArmPlatformPkg: Introduced ArmPlatformSysConfigLib NULL library 2014-09-18 21:15:29 +00:00
BaseTools BaseTools/ECC: Ignore duplicate check for 'NULL' library 2014-09-22 07:37:28 +00:00
BeagleBoardPkg ARM Packages: Replace tabs by spaces for indentation 2014-08-26 10:14:17 +00:00
Conf Adding top-level Conf directory for next generation of EDK II build infrastructure tools. 2007-06-20 19:33:23 +00:00
CryptoPkg CryptoPkg: Convert non DOS format files to DOS format 2014-09-03 08:56:12 +00:00
DuetPkg Fix VS2013 build failure. 2014-09-01 08:48:01 +00:00
EdkCompatibilityPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
EdkShellBinPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
EdkShellPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
EmbeddedPkg EmbeddedPkg: Introduced NULL library for SerialPortExtLib 2014-09-18 21:18:22 +00:00
EmulatorPkg EmulatorPkg: Unix: Use XCODE5 and lldb if Xcode 5 is detected 2014-08-29 18:58:36 +00:00
FatBinPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
IntelFrameworkModulePkg Correct the convert hex string to decimal value logic. 2014-09-22 05:37:16 +00:00
IntelFrameworkPkg IntelFrameworkPkg: Convert non DOS format files to DOS format 2014-09-03 08:37:09 +00:00
IntelFspPkg IntelFspPkg/IntelFspWrapperPkg: Fix some typos. 2014-09-03 06:48:38 +00:00
IntelFspWrapperPkg IntelFspPkg/IntelFspWrapperPkg: Fix some typos. 2014-09-03 06:48:38 +00:00
MdeModulePkg Fix X64 native function call prolog. Prepare space for at least 4 arguments, 2014-09-22 05:54:41 +00:00
MdePkg MdePkg NASM Thunk16: Add missing ASM_PFX for InternalAsmThunk16 2014-09-04 15:17:57 +00:00
NetworkPkg 1. Update PXE driver to support PXEv6 boot cross subnet. 2014-09-18 11:44:36 +00:00
Nt32Pkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
Omap35xxPkg ARM Packages: Replace tabs by spaces for indentation 2014-08-26 10:14:17 +00:00
OptionRomPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
OvmfPkg OvmfPkg: AcpiPlatformDxe: implement QEMU's full ACPI table loader interface 2014-09-22 21:11:22 +00:00
PcAtChipsetPkg PcAtChipsetPkg: Convert non DOS format files to DOS format and rename the same module name. 2014-09-03 08:48:29 +00:00
PerformancePkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
SecurityPkg SecurityPkg VariableRuntimeDxe: Bug fix and and refine debug message. 2014-09-03 09:19:30 +00:00
ShellBinPkg The binaries of ShellBinPkg are generated with ShellPkg project 15999. The binaries are built with no debug information by building with "RELEASE" target. 2014-08-29 21:15:05 +00:00
ShellPkg ShellPkg: ShellPkg: Fix the cp fail while coping directory. 2014-09-19 01:39:45 +00:00
SourceLevelDebugPkg SourceLevelDebugPkg: DebugAgentLib: Fix clang/Xcode 5 compile/link errors 2014-09-09 06:27:45 +00:00
StdLib StdLib: Produce DevMedia as a library class alternative to DevShell. 2014-09-18 19:13:22 +00:00
StdLibPrivateInternalFiles EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
UefiCpuPkg UefiCpuPkg: error: invalid instruction mnemonic 'retf' 2014-09-12 08:38:23 +00:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
BuildNotes2.txt Update to new SVN URL in readme.txt 2013-06-08 05:26:39 +00:00
Edk2Setup.bat Updated version, missed the last two commits and to add the SVN Revision property (last part of the version value). 2014-08-22 16:08:47 +00:00
edksetup.bat Contributed-under: TianoCore Contribution Agreement 1.0 2014-06-18 09:01:33 +00:00
edksetup.sh edksetup.sh: Ensure that WORKSPACE points to the top of an edk2 checkout 2014-07-28 17:37:40 +00:00