From nobody Tue Feb 10 03:37:48 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+112793+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+112793+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1703125296; cv=none; d=zohomail.com; s=zohoarc; b=jf+VvDVkjE+EDUW94796YbgYuiZE0pyvELnDYZrTcJdsKkmCJFnkMz2yRAJJIm83knC+vP0Jkid+Co0fyb29ZbsHae07tQqMgDELoD7G7DcQp+gBWAiY+VjIgjh/Cy/J3dKlWJxk5Vxlf1DvHAYyNN41H+PVSOFtProQMvVjrqM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703125296; 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=uP3i8XBYMitatLyG0wLdao0/7OtI0idQVVFzCv58E8c=; b=ZR/FZ9z0MB7wxUZXuM3pOF428HyGGCFV9Jt5gwKXHmrlSLq5Si9GDryXumFUzLeR36kXsfmIH5ENI/jv5XESNjAReeTlFiBmFJoQxClUXbTd0K9VQYgoNivAECE+OziHu3Em31F8a8vM93rWLZ1KFX5WrEivOppUpvK8ZagnuXs= 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+112793+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 1703125296526953.5814255018795; Wed, 20 Dec 2023 18:21:36 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=iYR8/2yz6ce2z7vAQlw7OcMbNEDs+fe+AlYNQ6Fe+3A=; 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=1703125296; v=1; b=dx4kyic1yYt1o9HWHINYH6P2ob7qDDlvB8g3c/g6B3Hl63mSrqKzDW8TeHpcH6v71Sxhv0M2 /rJTS5yby8n/Iyq8tzVtjZGG7STDWntUPtqbDv/hFSvT3U+I9JVP+uKedkmfYjByq/7CFLH+OBI 9e4oEyk1MTuwGYO2gl6PAam0= X-Received: by 127.0.0.2 with SMTP id wpC4YY1788612xHma5Ktnl3h; Wed, 20 Dec 2023 18:21:36 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mx.groups.io with SMTP id smtpd.web11.43008.1703125294459311440 for ; Wed, 20 Dec 2023 18:21:35 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="14591365" X-IronPort-AV: E=Sophos;i="6.04,292,1695711600"; d="scan'208";a="14591365" X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 18:21:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="920172805" X-IronPort-AV: E=Sophos;i="6.04,292,1695711600"; d="scan'208";a="920172805" X-Received: from sh1gapp1009.ccr.corp.intel.com ([10.239.189.219]) by fmsmga001.fm.intel.com with ESMTP; 20 Dec 2023 18:21:26 -0800 From: "Wu, Jiaxin" To: devel@edk2.groups.io Cc: Ray Ni , Liming Gao Subject: [edk2-devel] [PATCH v1 2/6] MdeModulePkg/DebugAgentLibNull: Indicate SMM Debug Agent support or not Date: Thu, 21 Dec 2023 10:21:17 +0800 Message-Id: <20231221022121.12224-3-jiaxin.wu@intel.com> In-Reply-To: <20231221022121.12224-1-jiaxin.wu@intel.com> References: <20231221022121.12224-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: fpVbgmBhZpycXkNjQWXXZJqOx1787277AA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703125297740100007 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This patch use the Context to indicate SMM Debug Agent support or not if InitFlag is DEBUG_AGENT_INIT_SMM. Context must be the pointer to the BOOLEAN value if it's not NULL. Cc: Ray Ni Cc: Liming Gao Signed-off-by: Jiaxin Wu --- MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c b/M= deModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c index 8e70705eb6..a7f4945c03 100644 --- a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c +++ b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c @@ -22,10 +22,13 @@ passing in the Context to be its parameter. =20 If Function() is NULL, Debug Agent Library instance will return after se= tup debug environment. =20 + If InitFlag is DEBUG_AGENT_INIT_SMM, Context must be the pointer to the = BOOLEAN + value if it's not NULL, which indicates SMM Debug Agent supported or not. + @param[in] InitFlag Init flag is used to decide the initialize proce= ss. @param[in] Context Context needed according to InitFlag; it was opt= ional. @param[in] Function Continue function called by debug agent library;= it was optional. =20 @@ -36,10 +39,16 @@ InitializeDebugAgent ( IN UINT32 InitFlag, IN VOID *Context OPTIONAL, IN DEBUG_AGENT_CONTINUE Function OPTIONAL ) { + switch (InitFlag) { + case DEBUG_AGENT_INIT_SMM: + *(BOOLEAN *)Context =3D FALSE; + return; + } + if (Function !=3D NULL) { Function (Context); } } =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 (#112793): https://edk2.groups.io/g/devel/message/112793 Mute This Topic: https://groups.io/mt/103293799/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-