From nobody Mon Feb 9 18:19:03 2026 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+112890+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+112890+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1703521248; cv=none; d=zohomail.com; s=zohoarc; b=hniLT0ycxpimsvdms7N2plQZZgUhI7i2FZEiyuDyCpRM5PURh+tVzgQ8ilTwXm0ne0Q4VQKRj0KChlXF2biKJdGpWXMbjlvTSWPTd4CJP8vJQt0E3j2ddzs74sKI9E2++14fSQ2HredrhPV4zjTfsN5O5jfZZdK67q5J4RTqoKI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703521248; h=Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=IIc+d4c10JlRX/KAnP3tnF070XqLsXrZVtoZOzPaRhc=; b=fAHpktM7IAspoog0r2I1fJIcnCsoHHggYxEBryheNOoiNxR+vZVccXUNSAgo2JG/Y2vLqd0hJ/eaoI6BDBM0qs+A9RiKGovYk89e8Dsw/lypVF/Od1vISYBQN8fK+CO8I4pvUbBj4VuLY61BMF//J15BLcOWYoDhARamVIPyajk= 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+112890+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 1703521248586914.3961237524204; Mon, 25 Dec 2023 08:20:48 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=n1pUjZj/dG9fnau6dFkXNAQrlE8lpgFJpcBMlTzLGvQ=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe; s=20140610; t=1703521248; v=1; b=Xi6tIWCLqMfDSL/g7GIwsogr7K/IugafEFFkOHhYaipFq2xJGZJwbkJl9kkzEDJ6c7+8XODy wHBIgY3UZBPIldMIuHrCz8yjdU94hCbqcZlugsXEnARH0Vc5cfUA244qCfYWrcnt+5ILYQbW0bM Ed++Q0zNxH4FTT5/dD8qfMTE= X-Received: by 127.0.0.2 with SMTP id yLtTYY1788612xzPfHt6jk9s; Mon, 25 Dec 2023 08:20:48 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.61867.1703521238683254667 for ; Mon, 25 Dec 2023 08:20:47 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="375789618" X-IronPort-AV: E=Sophos;i="6.04,303,1695711600"; d="scan'208";a="375789618" X-Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Dec 2023 08:20:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,303,1695711600"; d="scan'208";a="26085438" X-Received: from sh1gapp1009.ccr.corp.intel.com ([10.239.189.219]) by orviesa001.jf.intel.com with ESMTP; 25 Dec 2023 08:20:46 -0800 From: "Wu, Jiaxin" To: devel@edk2.groups.io Cc: Laszlo Ersek , Eric Dong , Ray Ni , Zeng Star , Gerd Hoffmann , Rahul Kumar Subject: [edk2-devel] [PATCH v2 5/6] UefiCpuPkg/PiSmmCpuDxeSmm: Invert ReleaseAllAPs & InitializeDebugAgent Date: Tue, 26 Dec 2023 00:20:33 +0800 Message-Id: <20231225162034.2052-6-jiaxin.wu@intel.com> In-Reply-To: <20231225162034.2052-1-jiaxin.wu@intel.com> References: <20231225162034.2052-1-jiaxin.wu@intel.com> 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,jiaxin.wu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 8IAz8GHzVpwGJp8ts7omyxqqx1787277AA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703521250723100023 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Existing BSP handler stops source level debug, then call ReleaseAllAPs to tell all APs can reset the Present flag to FALSE: InitializeDebugAgent (); /// Stop source level debug ReleaseAllAPs (); /// Tell APs can reset "Present" flag. This patch is to invert ReleaseAllAPs & InitializeDebugAgent: ReleaseAllAPs (); /// Tell APs can reset "Present" flag. InitializeDebugAgent (); /// Stop source level debug After this change, there is no negative impact since SMM source level debug feature doesn't depend on AP's "Present" flag, no impact to the SMM source level debug capability. Instead, the change will benefit the AP source level debug capability to trace its "Present" flag change for SMI exit since the source level debug feature will be stopped after each AP has the chance to reset the state. Cc: Laszlo Ersek Cc: Eric Dong Cc: Ray Ni Cc: Zeng Star Cc: Gerd Hoffmann Cc: Rahul Kumar Signed-off-by: Jiaxin Wu Reviewed-by: Ray Ni --- UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuDxe= Smm/MpService.c index bd2c9f841b..9aa9908863 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c @@ -648,23 +648,23 @@ BSPHandler ( // // Wait for all APs to complete their pending tasks including MTRR progr= amming if needed. // SmmCpuSyncWaitForAPs (mSmmMpSyncData->SyncContext, ApCount, CpuIndex); =20 + // + // Signal APs to Reset states/semaphore for this processor + // + ReleaseAllAPs (); + if (mSmmDebugAgentSupport) { // // Stop source level debug in BSP handler, the code below will not be // debugged. // InitializeDebugAgent (DEBUG_AGENT_INIT_EXIT_SMI, NULL, NULL); } =20 - // - // Signal APs to Reset states/semaphore for this processor - // - ReleaseAllAPs (); - // // Perform pending operations for hot-plug // SmmCpuUpdate (); =20 --=20 2.16.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 (#112890): https://edk2.groups.io/g/devel/message/112890 Mute This Topic: https://groups.io/mt/103360806/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-