From nobody Sat Nov 2 16:27:32 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1487691508236225.76731000472068; Tue, 21 Feb 2017 07:38:28 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EEB248221C; Tue, 21 Feb 2017 07:38:22 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 451428221C for ; Tue, 21 Feb 2017 07:38:20 -0800 (PST) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D3BAA3D953; Tue, 21 Feb 2017 15:38:20 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-47.phx2.redhat.com [10.3.116.47]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1LFcGVC015879; Tue, 21 Feb 2017 10:38:19 -0500 X-Original-To: edk2-devel@ml01.01.org From: Laszlo Ersek To: edk2-devel-01 Date: Tue, 21 Feb 2017 16:38:08 +0100 Message-Id: <20170221153812.1420-3-lersek@redhat.com> In-Reply-To: <20170221153812.1420-1-lersek@redhat.com> References: <20170221153812.1420-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 21 Feb 2017 15:38:20 +0000 (UTC) Subject: [edk2] [PATCH 2/6] OvmfPkg/AcpiPlatformDxe: update PointerValue comments in "BootScript.c" X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Justen MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/AcpiPlatformDxe/BootScript.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/OvmfPkg/AcpiPlatformDxe/BootScript.c b/OvmfPkg/AcpiPlatformDxe= /BootScript.c index b7a7f270f223..1ad468e2f834 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.Pointee= File + // and QEMU_LOADER_WRITE_POINTER.PointeeOffset } CONDENSED_WRITE_POINTER; =20 =20 @@ -159,7 +160,8 @@ ReleaseS3Context ( =20 @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. =20 @retval EFI_SUCCESS The information derived from QEMU_LOADER_WRITE_POINTER has been success= fully @@ -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 PointeeF= ile), - // 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 PointeeF= ile, + // 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 selecte= d 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 =3D SwapBytes32 (FW_CFG_DMA_CTL_WRITE); Access->Length =3D SwapBytes32 (Condensed->PointerSize); --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel