From nobody Mon Feb 9 23:57:53 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+112887+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+112887+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1703521241; cv=none; d=zohomail.com; s=zohoarc; b=RPpa+IdVOiRtk/7K7W7RzPxsmddFJ9RecUY3V4qSpQ5SvqzRWKVHOJ0q6IEBqGAHyB50BK9iqfbbPO0MAq4wQPZPvmMRWXaSw44qDgmZcizxSBILKS7XX5HTzgaCsl7Ajl2puaSly29JMlq9k2ZiOaFGKIxXZLBZKg/O2EmGkYE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703521241; 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=2nlS6JyI4boXhsw3Cl1IRFgmTM78XwRhi2JgY6wH3ck=; b=Wvatjsp7jYMYQ1iFTf1bRhHXFI2gXTq+DBAIJGwXlhyEXOZ7SPufdXKlD1YiA0EqJL6Lezcoh6H7pvykC7w+58pkeDtcMC3saEeCcOnJ91Xmo8UDOzZ9bvAiJJQu1fINnwmudWbomJl2jd0Z6r2MuOMTjanrTJ1lftqcfiKjW6s= 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+112887+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 1703521241766609.5059412909889; Mon, 25 Dec 2023 08:20:41 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=CDTPMXcq1Y4wxwnM3VSdaznG22jL+cJE42Lno+QXYRY=; 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=1703521241; v=1; b=lInc3PoApzgVmcysJd9gUcOvjTLcN2HoeGibTjwroTYdhE6L6nU7BiVHSC/rVB40HpEmvyKW lpwTrG+RpPcTbydI4tsjPW+BamxBOTHvwit4mqrsb7QTAS62PgzuG9Sw7i6EW7kCFFeB9IEYdwf P9DRIrMSmsCrhcT0+Jp6rmEY= X-Received: by 127.0.0.2 with SMTP id gq98YY1788612xHs6SnLfuiK; Mon, 25 Dec 2023 08:20:41 -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:41 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="375789611" X-IronPort-AV: E=Sophos;i="6.04,303,1695711600"; d="scan'208";a="375789611" 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:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,303,1695711600"; d="scan'208";a="26085425" X-Received: from sh1gapp1009.ccr.corp.intel.com ([10.239.189.219]) by orviesa001.jf.intel.com with ESMTP; 25 Dec 2023 08:20:40 -0800 From: "Wu, Jiaxin" To: devel@edk2.groups.io Cc: Ray Ni , Liming Gao Subject: [edk2-devel] [PATCH v2 2/6] MdeModulePkg/DebugAgentLibNull: Indicate SMM Debug Agent support or not Date: Tue, 26 Dec 2023 00:20:30 +0800 Message-Id: <20231225162034.2052-3-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: dNktgTs7X9EP9d761ytYLya9x1787277AA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703521242535100005 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This patch is to use the Context to indicate SMM Debug Agent support or not if InitFlag is DEBUG_AGENT_INIT_SMM. Context must point to a BOOLEAN 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..5596ee3bf9 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 point to a BOOLEAN 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 (#112887): https://edk2.groups.io/g/devel/message/112887 Mute This Topic: https://groups.io/mt/103360803/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-