diff options
author | Laszlo Ersek <lersek@redhat.com> | 2017-02-21 13:56:48 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2017-02-22 03:35:37 +0100 |
commit | 6025488da39314d21e2a075b6ecc8d26d36b37e7 (patch) | |
tree | 129eb372321dfaad754e917a80a14a414bb3f60e /OvmfPkg | |
parent | a3be3b65977eec894cebddf7100429aa0e84b669 (diff) | |
download | edk2-6025488da39314d21e2a075b6ecc8d26d36b37e7.zip edk2-6025488da39314d21e2a075b6ecc8d26d36b37e7.tar.gz edk2-6025488da39314d21e2a075b6ecc8d26d36b37e7.tar.bz2 |
OvmfPkg/AcpiPlatformDxe: update PointerValue comments in "BootScript.c"
Commit df73df138d9d ("OvmfPkg/AcpiPlatformDxe: replay
QEMU_LOADER_WRITE_POINTER commands at S3", 2017-02-09) added
"BootScript.c" with such comments on the PointerValue field of
CONDENSED_WRITE_POINTER, and on the corresponding PointerValue parameter
of SaveCondensedWritePointerToS3Context(), that did not consider the
then-latest update of the QEMU_LOADER_WRITE_POINTER structure. (Namely,
the introduction of the PointeeOffset field.)
The code is fine as-is -- ProcessCmdWritePointer() already calls
SaveCondensedWritePointerToS3Context() correctly, and "BootScript.c"
itself is indifferent to the exact values --, but the comments in
"BootScript.c" should match reality too. Update them.
Cc: Jordan Justen <jordan.l.justen@intel.com>
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')
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/BootScript.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/BootScript.c b/OvmfPkg/AcpiPlatformDxe/BootScript.c index b7a7f27..1ad468e 100644 --- a/OvmfPkg/AcpiPlatformDxe/BootScript.c +++ b/OvmfPkg/AcpiPlatformDxe/BootScript.c @@ -29,6 +29,7 @@ typedef struct { UINT8 PointerSize; // copied as-is from QEMU_LOADER_WRITE_POINTER
UINT32 PointerOffset; // copied as-is from QEMU_LOADER_WRITE_POINTER
UINT64 PointerValue; // resolved from QEMU_LOADER_WRITE_POINTER.PointeeFile
+ // and QEMU_LOADER_WRITE_POINTER.PointeeOffset
} CONDENSED_WRITE_POINTER;
@@ -159,7 +160,8 @@ ReleaseS3Context ( @param[in] PointerValue The base address of the allocated / downloaded
fw_cfg blob that is identified by
- QEMU_LOADER_WRITE_POINTER.PointeeFile.
+ QEMU_LOADER_WRITE_POINTER.PointeeFile, plus
+ QEMU_LOADER_WRITE_POINTER.PointeeOffset.
@retval EFI_SUCCESS The information derived from
QEMU_LOADER_WRITE_POINTER has been successfully
@@ -271,9 +273,9 @@ TransferS3ContextToBootScript ( // (2) call QEMU with the FW_CFG_DMA_ACCESS object,
// (3) wait for the select+skip to finish,
// (4) restore a SCRATCH_BUFFER object in reserved memory that writes
- // PointerValue (base address of the allocated / downloaded PointeeFile),
- // of size PointerSize, into the fw_cfg file selected in (1), at the
- // offset sought to in (1),
+ // PointerValue (base address of the allocated / downloaded PointeeFile,
+ // plus PointeeOffset), of size PointerSize, into the fw_cfg file
+ // selected in (1), at the offset sought to in (1),
// (5) call QEMU with the FW_CFG_DMA_ACCESS object,
// (6) wait for the write to finish.
//
@@ -346,8 +348,8 @@ TransferS3ContextToBootScript ( //
// (4) restore a SCRATCH_BUFFER object in reserved memory that writes
// PointerValue (base address of the allocated / downloaded
- // PointeeFile), of size PointerSize, into the fw_cfg file selected in
- // (1), at the offset sought to in (1),
+ // PointeeFile, plus PointeeOffset), of size PointerSize, into the
+ // fw_cfg file selected in (1), at the offset sought to in (1),
//
Access->Control = SwapBytes32 (FW_CFG_DMA_CTL_WRITE);
Access->Length = SwapBytes32 (Condensed->PointerSize);
|