From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id D77137803D0 for ; Fri, 29 Sep 2023 22:12:32 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=bYl9gWNIxd8DIQpqXazjK6JRnU8jb8x+fCNtyjomy3A=; 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=GyEp47aGX+VqGjBHkxuxQe0o0CXat3DhDU/RaoVFzkO3GmJuqyisd3fBics1J/oiBTaST+tg xQurQ25wwnvH+eBbTJYAHEFxCA5mro9Z2pgEJ1p8yAKMQpsTaZtc8soOyGfnt/j6+7JE0f94Tvh mBrUBC8kZowkaMy1h+XzXtXU= X-Received: by 127.0.0.2 with SMTP id QCUZYY7687511xJGBRU5leJ9; 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: EZel8IERy3R5w5hOZKiv4r22x7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=GyEp47aG; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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/WinThunk.c index 008e5755db..adca20fee1 100644 --- a/EmulatorPkg/Win/Host/WinThunk.c +++ b/EmulatorPkg/Win/Host/WinThunk.c @@ -1,6 +1,6 @@ /**@file -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 Module Name: @@ -10,21 +10,14 @@ Module Name: Abstract: 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. - 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 being - 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 crash. **/ -- 2.39.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-