diff options
author | Laszlo Ersek <lersek@redhat.com> | 2017-02-08 21:53:02 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2017-02-21 13:10:39 +0100 |
commit | 9965cbd424f22b35e7743c2f59ab3ee1db15142a (patch) | |
tree | e80df06c697ecfeddc5c77e5720cf748394a059f /OvmfPkg/VarStore.fdf.inc | |
parent | ab63766baf3d46ed0d61af58b74d044936129e8b (diff) | |
download | edk2-platforms-9965cbd424f22b35e7743c2f59ab3ee1db15142a.tar.xz |
OvmfPkg/AcpiPlatformDxe: implement the QEMU_LOADER_WRITE_POINTER command
The QEMU_LOADER_WRITE_POINTER command instructs the firmware to write the
address of a field within a previously allocated/downloaded fw_cfg blob
into another (writeable) fw_cfg file at a specific offset.
Put differently, QEMU_LOADER_WRITE_POINTER propagates, to QEMU, the
address that QEMU_LOADER_ALLOCATE placed the designated fw_cfg blob at, as
adjusted for the given field inside the allocated blob.
The implementation is similar to that of QEMU_LOADER_ADD_POINTER. Since
here we "patch" a pointer object in "fw_cfg file space", not guest memory
space, we utilize the QemuFwCfgSkipBytes() and QemuFwCfgWriteBytes() APIs
completed in commit range 465663e9f128..7fcb73541299.
An interesting aspect is that QEMU_LOADER_WRITE_POINTER creates a
host-level reference to a guest memory location. Therefore, if we fail to
process the linker/loader script for any reason, we have to clear out
those references first, before we release the guest memory allocations in
response to the error.
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=359
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'OvmfPkg/VarStore.fdf.inc')
0 files changed, 0 insertions, 0 deletions