From nobody Fri May 17 09:18:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+109229+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+109229+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1696025551; cv=none; d=zohomail.com; s=zohoarc; b=hKWXOY04hJ6NbSooFU1Xc0Tdvw6pjfm6uhXwaBD0Fl5n/HY25HeAKC/Fj0nF8nHEGtOKX318JG9AMr4hftaM2W1PlWqwJuEs26+dCRBMGX9B37WosnjTKPJc/HNhQNcGNJqIH1vp5O59HT0TPVdT8JsuAYYMGZDAWGQWP5nEM8E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696025551; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=MX0ef5poRZ7bZRV5FkiudQgIs+2Ar0DjieVgToWj7zY=; b=mvIz+k+MSX5uZDLf+jQi6r7HbTVNJUS/1iUm36AvN9h8QH6IDoC5azNswNMVT+mLS16ghixU2i9kH/VlkQcReO4sRab5nnwru6bu30gt1Nsx8bxTWqWXAo8DYZ5H/DsCLddMekDhzRkoggE8tKAnojYrAIgI/UpGDVKqae6IaKA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+109229+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1696025551794126.51414463470815; Fri, 29 Sep 2023 15:12:31 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=lpFQFAH2yDEOGGRFyIsXGnJROnjQBkcu7yGRZhWGll8=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1696025551; v=1; b=jYxJyOs3NGjjvR6L0JjwpiuqcoTl+FdzGgpj82TqrXE6BWCtYvEZBiwv+8EhLJtWMEDyn0rC IYCn21/818+fP3FtWD6A7CzoOlSXQ6lsXV+noqGI/tsfEaDVd9BH2QlQP9UCauxd+Zx1RAyytWH /inLsaUtfUtPqjJHi04VlxrU= X-Received: by 127.0.0.2 with SMTP id 7JgBYY1788612xhwVy1BoPRW; Fri, 29 Sep 2023 15:12:31 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mx.groups.io with SMTP id smtpd.web11.30514.1696025551001456859 for ; Fri, 29 Sep 2023 15:12:31 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10848"; a="3960092" X-IronPort-AV: E=Sophos;i="6.03,188,1694761200"; d="scan'208";a="3960092" X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2023 15:12:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10848"; a="726718890" X-IronPort-AV: E=Sophos;i="6.03,188,1694761200"; d="scan'208";a="726718890" X-Received: from nldesimo-desk.amr.corp.intel.com ([10.241.240.72]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2023 15:12:29 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Andrew Fish , Ray Ni , Michael D Kinney , Chasel Chiu Subject: [edk2-devel] [PATCH v1] EmulatorPkg: Improve comments in WinThunk.c Date: Fri, 29 Sep 2023 15:12:10 -0700 Message-Id: <20230929221210.1751-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,nathaniel.l.desimone@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: R1n6M7OmfrgIaEOGRJPJ5G3Fx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1696025552474100001 Content-Type: text/plain; charset="utf-8" File description has not been updated since Nt32Pkg was merged with EmulatorPkg, and several details were no longer technically accurate. Cc: Andrew Fish Cc: Ray Ni Cc: Michael D Kinney Cc: Chasel Chiu Signed-off-by: Nate DeSimone --- EmulatorPkg/Win/Host/WinThunk.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/EmulatorPkg/Win/Host/WinThunk.c b/EmulatorPkg/Win/Host/WinThun= k.c index 008e5755db..adca20fee1 100644 --- a/EmulatorPkg/Win/Host/WinThunk.c +++ b/EmulatorPkg/Win/Host/WinThunk.c @@ -1,6 +1,6 @@ /**@file =20 -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 Module Name: @@ -10,21 +10,14 @@ Module Name: Abstract: =20 Since the SEC is the only windows program in our emulation we - must use a Tiano mechanism to export Win32 APIs to other modules. - This is the role of the EFI_WIN_NT_THUNK_PROTOCOL. + must use a Tiano mechanism to export operating system services + to other modules. This is the role of the EMU_THUNK_PROTOCOL. =20 - The mWinNtThunkTable exists so that a change to EFI_WIN_NT_THUNK_PROTOCOL + The gEmuThunkProtocol exists so that a change to EMU_THUNK_PROTOCOL will cause an error in initializing the array if all the member functions are not added. It looks like adding a element to end and not initializing - it may cause the table to be initaliized with the members at the end bei= ng - set to zero. This is bad as jumping to zero will case the NT32 to crash. - - All the member functions in mWinNtThunkTable are Win32 - API calls, so please reference Microsoft documentation. - - - gWinNt is a a public exported global that contains the initialized - data. + it may cause the table to be initalized with the members at the end being + set to zero. This is bad as jumping to zero will case EmulatorPkg to cra= sh. =20 **/ =20 --=20 2.39.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109229): https://edk2.groups.io/g/devel/message/109229 Mute This Topic: https://groups.io/mt/101667705/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-