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 BA751AC0D7F for ; Wed, 3 Apr 2024 07:50:44 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=GclOz4nmrBo60EcwRDl5+mwJ4lq3RtlE0Blh6XOCTXE=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1712130643; v=1; b=U9bVZs3n8ubsgfiqnaLtikHUVz0cDR6G0n6+wwpKss053XoKNl5YC05+0W+JCg0+9mjUN6uj E7ZkdQi47TlLIW2DgDRwkQjXVKhpk1f66qyHK0pgANoKAzCUnXopIrCt6fuBl10NQJklWMuQShv 8v62iC4/D4RAwN71/SANdSzC2aMllCFkIbuvKu4RCBkxu/dKxa4CqJCPf4MukzWnIJzo6yJCnF+ mNGa4o92Bzx9R1YtmQpcZlrceUNmMKpY+f6Bvd4nUHio8980tEz2lBVuJZqNgT0bGpVPk4zFzkg bSYwHQmUCXRLaezw/+PdZujVbvgFtECRVBow9rMvFSr/w== X-Received: by 127.0.0.2 with SMTP id EYvOYY7687511xn3ko9poJ0C; Wed, 03 Apr 2024 00:50:43 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by mx.groups.io with SMTP id smtpd.web11.5859.1712130636141857502 for ; Wed, 03 Apr 2024 00:50:42 -0700 X-CSE-ConnectionGUID: c4oJSGH9SMeS1NufhaTFaA== X-CSE-MsgGUID: sTX6Eop1Q2Ojgs376shY8Q== X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="10311953" X-IronPort-AV: E=Sophos;i="6.07,176,1708416000"; d="scan'208";a="10311953" X-Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 00:50:42 -0700 X-CSE-ConnectionGUID: 1oGndu/0RAuhVe4lkH2emw== X-CSE-MsgGUID: A1uLwRHMSfaEjAWLk1g4ng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,176,1708416000"; d="scan'208";a="18399077" X-Received: from shwdesfp01.ccr.corp.intel.com ([10.239.158.151]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 00:50:41 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Zhiguang Liu , Liming Gao , Jiaxin Wu , Ray Ni , Laszlo Ersek , Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [PATCH v2 3/6] Revert 17b28722008eab745ce186b72cd325944cbe6bf0 Date: Wed, 3 Apr 2024 15:50:14 +0800 Message-Id: <20240403075017.1997-4-zhiguang.liu@intel.com> In-Reply-To: <20240403075017.1997-1-zhiguang.liu@intel.com> References: <20240403075017.1997-1-zhiguang.liu@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 Resent-Date: Wed, 03 Apr 2024 00:50:42 -0700 Resent-From: zhiguang.liu@intel.com Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 31uFmQSIKBVX3hTQkEegZUcpx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=U9bVZs3n; 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 This reverts commit "MdeModulePkg/SMM: Disallow unregister SMI handler in other SMI handler" for better design later. Cc: Liming Gao Cc: Jiaxin Wu Cc: Ray Ni Cc: Laszlo Ersek Cc: Ray Ni Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Sami Mujawar Signed-off-by: Zhiguang Liu --- MdeModulePkg/Core/PiSmmCore/Smi.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/MdeModulePkg/Core/PiSmmCore/Smi.c b/MdeModulePkg/Core/PiSmmCore/Smi.c index b3a81ac877..3489c130fd 100644 --- a/MdeModulePkg/Core/PiSmmCore/Smi.c +++ b/MdeModulePkg/Core/PiSmmCore/Smi.c @@ -8,8 +8,7 @@ #include "PiSmmCore.h" -SMI_HANDLER *mCurrentSmiHandler = NULL; -LIST_ENTRY mSmiEntryList = INITIALIZE_LIST_HEAD_VARIABLE (mSmiEntryList); +LIST_ENTRY mSmiEntryList = INITIALIZE_LIST_HEAD_VARIABLE (mSmiEntryList); SMI_ENTRY mRootSmiEntry = { SMI_ENTRY_SIGNATURE, @@ -143,18 +142,13 @@ SmiManage ( // Link points to may be freed if unregister SMI handler. // Link = Link->ForwardLink; - // - // Assign gCurrentSmiHandle before calling the SMI handler and - // set to NULL when it returns. - // - mCurrentSmiHandler = SmiHandler; - Status = SmiHandler->Handler ( - (EFI_HANDLE)SmiHandler, - Context, - CommBuffer, - CommBufferSize - ); - mCurrentSmiHandler = NULL; + + Status = SmiHandler->Handler ( + (EFI_HANDLE)SmiHandler, + Context, + CommBuffer, + CommBufferSize + ); switch (Status) { case EFI_INTERRUPT_PENDING: @@ -334,13 +328,6 @@ SmiHandlerUnRegister ( return EFI_INVALID_PARAMETER; } - // - // Do not allow to unregister SMI Handler inside other SMI Handler - // - if ((mCurrentSmiHandler != NULL) && (mCurrentSmiHandler != SmiHandler)) { - return EFI_INVALID_PARAMETER; - } - SmiEntry = SmiHandler->SmiEntry; RemoveEntryList (&SmiHandler->Link); -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117351): https://edk2.groups.io/g/devel/message/117351 Mute This Topic: https://groups.io/mt/105304507/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-