]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/AcpiPlatformDxe: update PointerValue comments in "BootScript.c"
authorLaszlo Ersek <lersek@redhat.com>
Tue, 21 Feb 2017 12:56:48 +0000 (13:56 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 22 Feb 2017 02:35:37 +0000 (03:35 +0100)
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>
OvmfPkg/AcpiPlatformDxe/BootScript.c

index b7a7f270f22398f9d697dcad259a4ca8e295c6ae..1ad468e2f834c199ac79504b9c616f2df671f64d 100644 (file)
@@ -29,6 +29,7 @@ typedef struct {
   UINT8  PointerSize;   // copied as-is from QEMU_LOADER_WRITE_POINTER\r
   UINT32 PointerOffset; // copied as-is from QEMU_LOADER_WRITE_POINTER\r
   UINT64 PointerValue;  // resolved from QEMU_LOADER_WRITE_POINTER.PointeeFile\r
+                        //   and QEMU_LOADER_WRITE_POINTER.PointeeOffset\r
 } CONDENSED_WRITE_POINTER;\r
 \r
 \r
@@ -159,7 +160,8 @@ ReleaseS3Context (
 \r
   @param[in] PointerValue   The base address of the allocated / downloaded\r
                             fw_cfg blob that is identified by\r
-                            QEMU_LOADER_WRITE_POINTER.PointeeFile.\r
+                            QEMU_LOADER_WRITE_POINTER.PointeeFile, plus\r
+                            QEMU_LOADER_WRITE_POINTER.PointeeOffset.\r
 \r
   @retval EFI_SUCCESS           The information derived from\r
                                 QEMU_LOADER_WRITE_POINTER has been successfully\r
@@ -271,9 +273,9 @@ TransferS3ContextToBootScript (
   // (2) call QEMU with the FW_CFG_DMA_ACCESS object,\r
   // (3) wait for the select+skip to finish,\r
   // (4) restore a SCRATCH_BUFFER object in reserved memory that writes\r
-  //     PointerValue (base address of the allocated / downloaded PointeeFile),\r
-  //     of size PointerSize, into the fw_cfg file selected in (1), at the\r
-  //     offset sought to in (1),\r
+  //     PointerValue (base address of the allocated / downloaded PointeeFile,\r
+  //     plus PointeeOffset), of size PointerSize, into the fw_cfg file\r
+  //     selected in (1), at the offset sought to in (1),\r
   // (5) call QEMU with the FW_CFG_DMA_ACCESS object,\r
   // (6) wait for the write to finish.\r
   //\r
@@ -346,8 +348,8 @@ TransferS3ContextToBootScript (
     //\r
     // (4) restore a SCRATCH_BUFFER object in reserved memory that writes\r
     //     PointerValue (base address of the allocated / downloaded\r
-    //     PointeeFile), of size PointerSize, into the fw_cfg file selected in\r
-    //     (1), at the offset sought to in (1),\r
+    //     PointeeFile, plus PointeeOffset), of size PointerSize, into the\r
+    //     fw_cfg file selected in (1), at the offset sought to in (1),\r
     //\r
     Access->Control = SwapBytes32 (FW_CFG_DMA_CTL_WRITE);\r
     Access->Length = SwapBytes32 (Condensed->PointerSize);\r