From nobody Tue Feb 10 04:29:49 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+104532+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+104532+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1683710447; cv=none; d=zohomail.com; s=zohoarc; b=WewGEclksYtqs98SQhNnLHHMahlVKhW7XF6t8tdsAnKv+1RhyiE5opUqQ9n8Gqi/fVrPnMs8w4w6qCaiWHmHvP/xSl7rOOOxZ0odZ7HZ9Mq4IhSNuvpifDdoiGG8Mf5dHXN4AnMSXYrrsyOj5bWzADgYCqv7NMgGeEuNGGdrjh4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683710447; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=SbFJFzIFZxtVTi+wfLlTkZ4b3Ldf8PGhWs+ia8DzaMM=; b=DxJuNi7yi9vhEPyYEG9NtpgNDmQ/c0V9UJIVrlqPbsMh9ceJuuHbrgYcBO2ZJnKyHe8tywc+XfIHRakorqCLbBtkVI+0OyN3zS9YwP8KvXA8qcozeBmJ4E+lUHTXaK9qQWDMz8+u0uK3xYSy8ITBoKMLg9C/JT56ZSwHUFZvElk= 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+104532+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 1683710447126716.6724960446747; Wed, 10 May 2023 02:20:47 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id m4miYY1788612x33Z6X0EOWt; Wed, 10 May 2023 02:20:46 -0700 X-Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.12110.1683710445396115698 for ; Wed, 10 May 2023 02:20:46 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10705"; a="347629650" X-IronPort-AV: E=Sophos;i="5.99,264,1677571200"; d="scan'208";a="347629650" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2023 02:20:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10705"; a="729878585" X-IronPort-AV: E=Sophos;i="5.99,264,1677571200"; d="scan'208";a="729878585" X-Received: from gguo-desk.gar.corp.intel.com ([10.5.215.23]) by orsmga008.jf.intel.com with ESMTP; 10 May 2023 02:20:42 -0700 From: "Guo, Gua" To: devel@edk2.groups.io Cc: michael.d.kinney@intel.com, Gua Guo , Chan Laura , Prakashan Krishnadas Veliyathuparambil , K N Karthik , VictorX Hsu Subject: [edk2-devel] [PATCH v5 2/4] MdePkg: Add NULL library of TraceHubDebugSysTLib Date: Wed, 10 May 2023 17:20:31 +0800 Message-Id: <20230510092033.993-3-gua.guo@intel.com> In-Reply-To: <20230510092033.993-1-gua.guo@intel.com> References: <20230510092033.993-1-gua.guo@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,gua.guo@intel.com X-Gm-Message-State: Sv7baqXKgStAEIWbMPZYLDk0x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1683710446; bh=rMD9XL7QDCOYjxEBtBsA+QAVlFrPnwliQSrTOuy2uFM=; h=Cc:Date:From:Reply-To:Subject:To; b=H/qOf66zDulcPeit6i3j4jYC8SSh4o7PbY53ndCBkApA/NpmRlog6ZEd6NHBXfTh4iw VjI9orLz8l7M8F6U0TmwhUFt8qlq4zQ50HlHlYgUNlkPt6Ib3xyWEbUxt8mAawEyd75GZ YGw+2EPGuhWDEQ2paMR6Pl7K102hZy2CGN8= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1683710447677100005 Content-Type: text/plain; charset="utf-8" From: Gua Guo REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4144 This Library is NULL library of TraceHubDebugSysTLib. Cc: Michael D Kinney Cc: Guo Gua Cc: Chan Laura Cc: Prakashan Krishnadas Veliyathuparambil Cc: K N Karthik Signed-off-by: VictorX Hsu --- MdePkg/Include/Library/TraceHubDebugSysTLib.h | 81 +++++++++++++++++++ .../TraceHubDebugSysTLibNull.c | 76 +++++++++++++++++ .../TraceHubDebugSysTLibNull.inf | 29 +++++++ MdePkg/MdePkg.dsc | 1 + 4 files changed, 187 insertions(+) create mode 100644 MdePkg/Include/Library/TraceHubDebugSysTLib.h create mode 100644 MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSy= sTLibNull.c create mode 100644 MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSy= sTLibNull.inf diff --git a/MdePkg/Include/Library/TraceHubDebugSysTLib.h b/MdePkg/Include= /Library/TraceHubDebugSysTLib.h new file mode 100644 index 0000000000..7df20e67d6 --- /dev/null +++ b/MdePkg/Include/Library/TraceHubDebugSysTLib.h @@ -0,0 +1,81 @@ +/** @file +This header file declares Trace Hub related top level APIs. + +Copyright (c) 2023, Intel Corporation. All rights reserved.
+ +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef TRACE_HUB_DEBUG_SYST_LIB_H_ +#define TRACE_HUB_DEBUG_SYST_LIB_H_ + +typedef enum { + SeverityNone =3D 0, + SeverityFatal =3D 1, + SeverityError =3D 2, + SeverityWarning =3D 3, + SeverityNormal =3D 4, + SeverityUser1 =3D 5, + SeverityUser2 =3D 6, + SeverityUser3 =3D 7, + SeverityMax +} TRACE_HUB_SEVERITY_TYPE; + +/** + Write debug string to specified Trace Hub MMIO address. + + @param[in] SeverityType Severity type of input message. + @param[in] Buffer A pointer to the data buffer. + @param[in] NumberOfBytes The size of data buffer. + + @retval RETURN_SUCCESS Data was written to Trace Hub. + @retval Other Failed to output Trace Hub message. +**/ +RETURN_STATUS +EFIAPI +TraceHubSysTDebugWrite ( + IN TRACE_HUB_SEVERITY_TYPE SeverityType, + IN UINT8 *Buffer, + IN UINTN NumberOfBytes + ); + +/** + Write catalog status code message to specified Trace Hub MMIO address. + + @param[in] SeverityType Severity type of input message. + @param[in] Id Catalog ID. + @param[in] Guid Driver Guid. + + @retval RETURN_SUCCESS Data was written to Trace Hub. + @retval Other Failed to output Trace Hub message. +**/ +RETURN_STATUS +EFIAPI +TraceHubSysTWriteCataLog64StatusCode ( + IN TRACE_HUB_SEVERITY_TYPE SeverityType, + IN UINT64 Id, + IN GUID *Guid + ); + +/** + Write catalog message to specified Trace Hub MMIO address. + + @param[in] SeverityType Severity type of input message. + @param[in] Id Catalog ID. + @param[in] NumberOfParams Number of entries in argument list. + @param[in] ... Catalog message parameters. + + @retval RETURN_SUCCESS Data was written to Trace Hub. + @retval Other Failed to output Trace Hub message. +**/ +RETURN_STATUS +EFIAPI +TraceHubSysTWriteCataLog64 ( + IN TRACE_HUB_SEVERITY_TYPE SeverityType, + IN UINT64 Id, + IN UINTN NumberOfParams, + ... + ); + +#endif // TRACE_HUB_DEBUG_SYST_LIB_H_ diff --git a/MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNu= ll.c b/MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNull.c new file mode 100644 index 0000000000..0bd14d4e24 --- /dev/null +++ b/MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNull.c @@ -0,0 +1,76 @@ +/** @file +Null library of TraceHubDebugSysTLib. + +Copyright (c) 2023, Intel Corporation. All rights reserved.
+ +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include + +/** + Write debug string to specified Trace Hub MMIO address. + + @param[in] SeverityType Severity type of input message. + @param[in] Buffer A pointer to the data buffer. + @param[in] NumberOfBytes The size of data buffer. + + @retval RETURN_SUCCESS Data was written to Trace Hub. + @retval Other Failed to output Trace Hub message. +**/ +RETURN_STATUS +EFIAPI +TraceHubSysTDebugWrite ( + IN TRACE_HUB_SEVERITY_TYPE SeverityType, + IN UINT8 *Buffer, + IN UINTN NumberOfBytes + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + Write catalog status code message to specified Trace Hub MMIO address. + + @param[in] SeverityType Severity type of input message. + @param[in] Id Catalog ID. + @param[in] Guid Driver Guid. + + @retval RETURN_SUCCESS Data was written to Trace Hub. + @retval Other Failed to output Trace Hub message. +**/ +RETURN_STATUS +EFIAPI +TraceHubSysTWriteCataLog64StatusCode ( + IN TRACE_HUB_SEVERITY_TYPE SeverityType, + IN UINT64 Id, + IN GUID *Guid + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + Write catalog message to specified Trace Hub MMIO address. + + @param[in] SeverityType Severity type of input message. + @param[in] Id Catalog ID. + @param[in] NumberOfParams Number of entries in argument list. + @param[in] ... Catalog message parameters. + + @retval RETURN_SUCCESS Data was written to Trace Hub. + @retval Other Failed to output Trace Hub message. +**/ +RETURN_STATUS +EFIAPI +TraceHubSysTWriteCataLog64 ( + IN TRACE_HUB_SEVERITY_TYPE SeverityType, + IN UINT64 Id, + IN UINTN NumberOfParams, + ... + ) +{ + return RETURN_UNSUPPORTED; +} diff --git a/MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNu= ll.inf b/MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNull.i= nf new file mode 100644 index 0000000000..ba894fc250 --- /dev/null +++ b/MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNull.inf @@ -0,0 +1,29 @@ +## @file +# Null library of TraceHubDebugSysTLib. +# +# Copyright (c) 2023, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D TraceHubDebugSysTLibNull + FILE_GUID =3D 16196A4E-4196-4AF4-9A6B-F4D2ACC430A8 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D TraceHubDebugSysTLib + +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D IA32 X64 +# + +[Packages] + MdePkg/MdePkg.dec + +[Sources] + TraceHubDebugSysTLibNull.c diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc index 902a39cffc..c850970b23 100644 --- a/MdePkg/MdePkg.dsc +++ b/MdePkg/MdePkg.dsc @@ -185,6 +185,7 @@ MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf MdePkg/Library/TdxLib/TdxLib.inf MdePkg/Library/MipiSysTLib/MipiSysTLib.inf + MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNull.inf =20 [Components.EBC] MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf --=20 2.39.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 (#104532): https://edk2.groups.io/g/devel/message/104532 Mute This Topic: https://groups.io/mt/98802142/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-