From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.30660.1683755742998507231 for ; Wed, 10 May 2023 14:55:48 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=KyMFWj5h; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: gua.guo@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683755748; x=1715291748; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Zxyu6YkRWsGOz6Q4u48dqmyofCIS8H8CMWdHFZhDHvI=; b=KyMFWj5h8YnjiJa/90heqZmOsg7C1WtTmv3Bdh461lAiqRx1/yBghquG ocYZscwxRRJcBjdUSKGao4Ohn2lFcCTuehNztowcAh9Jxf5Yk1a44eO9e hrkBJVs2VsneVFFrnXWSEaXW3g1LiVai1qaExmvWilnWf4AMXTAQHPrxZ DUS04YrAVuFfc/jxhOx0SYyjee9TUytGpGIIb0s9PakghapNuqSN6Dn2J A7DUTCzKAAkoG0i1DnsFjsNALMSw9TH7Xw/sElK8ADcSXbGRP+RIU7GH5 L3g3VJ4+IzLhVOCMq7HKYPPuQUFBnPX6eWIcbNfnBGiMMmzE1ivFSZYWW w==; X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="330693158" X-IronPort-AV: E=Sophos;i="5.99,265,1677571200"; d="scan'208";a="330693158" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2023 14:55:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="945870216" X-IronPort-AV: E=Sophos;i="5.99,265,1677571200"; d="scan'208";a="945870216" Received: from gguo-desk.gar.corp.intel.com ([10.5.215.23]) by fmsmga006.fm.intel.com with ESMTP; 10 May 2023 14:55:46 -0700 From: "Guo, Gua" To: devel@edk2.groups.io Cc: gua.guo@intel.com, Michael D Kinney , Chan Laura , Prakashan Krishnadas Veliyathuparambil , K N Karthik Subject: [PATCH v8 3/5] MdePkg: Add NULL library of TraceHubDebugSysTLib Date: Thu, 11 May 2023 05:55:35 +0800 Message-Id: <20230510215537.915-4-gua.guo@intel.com> X-Mailer: git-send-email 2.39.2.windows.1 In-Reply-To: <20230510215537.915-1-gua.guo@intel.com> References: <20230510215537.915-1-gua.guo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: Guo Gua Reviewed-by: Michael D Kinney Reviewed-by: K N Karthik Reviewed-by: Chan Laura --- 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=0D +This header file declares Trace Hub related top level APIs.=0D +=0D +Copyright (c) 2023, Intel Corporation. All rights reserved.
=0D +=0D +SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#ifndef TRACE_HUB_DEBUG_SYST_LIB_H_=0D +#define TRACE_HUB_DEBUG_SYST_LIB_H_=0D +=0D +typedef enum {=0D + SeverityNone =3D 0,=0D + SeverityFatal =3D 1,=0D + SeverityError =3D 2,=0D + SeverityWarning =3D 3,=0D + SeverityNormal =3D 4,=0D + SeverityUser1 =3D 5,=0D + SeverityUser2 =3D 6,=0D + SeverityUser3 =3D 7,=0D + SeverityMax=0D +} TRACE_HUB_SEVERITY_TYPE;=0D +=0D +/**=0D + Write debug string to specified Trace Hub MMIO address.=0D +=0D + @param[in] SeverityType Severity type of input message.=0D + @param[in] Buffer A pointer to the data buffer.=0D + @param[in] NumberOfBytes The size of data buffer.=0D +=0D + @retval RETURN_SUCCESS Data was written to Trace Hub.=0D + @retval Other Failed to output Trace Hub message.=0D +**/=0D +RETURN_STATUS=0D +EFIAPI=0D +TraceHubSysTDebugWrite (=0D + IN TRACE_HUB_SEVERITY_TYPE SeverityType,=0D + IN UINT8 *Buffer,=0D + IN UINTN NumberOfBytes=0D + );=0D +=0D +/**=0D + Write catalog status code message to specified Trace Hub MMIO address.=0D +=0D + @param[in] SeverityType Severity type of input message.=0D + @param[in] Id Catalog ID.=0D + @param[in] Guid Driver Guid.=0D +=0D + @retval RETURN_SUCCESS Data was written to Trace Hub.=0D + @retval Other Failed to output Trace Hub message.=0D +**/=0D +RETURN_STATUS=0D +EFIAPI=0D +TraceHubSysTWriteCataLog64StatusCode (=0D + IN TRACE_HUB_SEVERITY_TYPE SeverityType,=0D + IN UINT64 Id,=0D + IN GUID *Guid=0D + );=0D +=0D +/**=0D + Write catalog message to specified Trace Hub MMIO address.=0D +=0D + @param[in] SeverityType Severity type of input message.=0D + @param[in] Id Catalog ID.=0D + @param[in] NumberOfParams Number of entries in argument list.=0D + @param[in] ... Catalog message parameters.=0D +=0D + @retval RETURN_SUCCESS Data was written to Trace Hub.=0D + @retval Other Failed to output Trace Hub message.=0D +**/=0D +RETURN_STATUS=0D +EFIAPI=0D +TraceHubSysTWriteCataLog64 (=0D + IN TRACE_HUB_SEVERITY_TYPE SeverityType,=0D + IN UINT64 Id,=0D + IN UINTN NumberOfParams,=0D + ...=0D + );=0D +=0D +#endif // TRACE_HUB_DEBUG_SYST_LIB_H_=0D 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=0D +Null library of TraceHubDebugSysTLib.=0D +=0D +Copyright (c) 2023, Intel Corporation. All rights reserved.
=0D +=0D +SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#include =0D +#include =0D +=0D +/**=0D + Write debug string to specified Trace Hub MMIO address.=0D +=0D + @param[in] SeverityType Severity type of input message.=0D + @param[in] Buffer A pointer to the data buffer.=0D + @param[in] NumberOfBytes The size of data buffer.=0D +=0D + @retval RETURN_SUCCESS Data was written to Trace Hub.=0D + @retval Other Failed to output Trace Hub message.=0D +**/=0D +RETURN_STATUS=0D +EFIAPI=0D +TraceHubSysTDebugWrite (=0D + IN TRACE_HUB_SEVERITY_TYPE SeverityType,=0D + IN UINT8 *Buffer,=0D + IN UINTN NumberOfBytes=0D + )=0D +{=0D + return RETURN_UNSUPPORTED;=0D +}=0D +=0D +/**=0D + Write catalog status code message to specified Trace Hub MMIO address.=0D +=0D + @param[in] SeverityType Severity type of input message.=0D + @param[in] Id Catalog ID.=0D + @param[in] Guid Driver Guid.=0D +=0D + @retval RETURN_SUCCESS Data was written to Trace Hub.=0D + @retval Other Failed to output Trace Hub message.=0D +**/=0D +RETURN_STATUS=0D +EFIAPI=0D +TraceHubSysTWriteCataLog64StatusCode (=0D + IN TRACE_HUB_SEVERITY_TYPE SeverityType,=0D + IN UINT64 Id,=0D + IN GUID *Guid=0D + )=0D +{=0D + return RETURN_UNSUPPORTED;=0D +}=0D +=0D +/**=0D + Write catalog message to specified Trace Hub MMIO address.=0D +=0D + @param[in] SeverityType Severity type of input message.=0D + @param[in] Id Catalog ID.=0D + @param[in] NumberOfParams Number of entries in argument list.=0D + @param[in] ... Catalog message parameters.=0D +=0D + @retval RETURN_SUCCESS Data was written to Trace Hub.=0D + @retval Other Failed to output Trace Hub message.=0D +**/=0D +RETURN_STATUS=0D +EFIAPI=0D +TraceHubSysTWriteCataLog64 (=0D + IN TRACE_HUB_SEVERITY_TYPE SeverityType,=0D + IN UINT64 Id,=0D + IN UINTN NumberOfParams,=0D + ...=0D + )=0D +{=0D + return RETURN_UNSUPPORTED;=0D +}=0D 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=0D +# Null library of TraceHubDebugSysTLib.=0D +#=0D +# Copyright (c) 2023, Intel Corporation. All rights reserved.
=0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D +=0D +[Defines]=0D + INF_VERSION =3D 0x00010005=0D + BASE_NAME =3D TraceHubDebugSysTLibNull=0D + FILE_GUID =3D 16196A4E-4196-4AF4-9A6B-F4D2ACC430A8= =0D + MODULE_TYPE =3D BASE=0D + VERSION_STRING =3D 1.0=0D + LIBRARY_CLASS =3D TraceHubDebugSysTLib=0D +=0D +#=0D +# The following information is for reference only and not required by the = build tools.=0D +#=0D +# VALID_ARCHITECTURES =3D IA32 X64=0D +#=0D +=0D +[Packages]=0D + MdePkg/MdePkg.dec=0D +=0D +[Sources]=0D + TraceHubDebugSysTLibNull.c=0D 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=0D MdePkg/Library/TdxLib/TdxLib.inf=0D MdePkg/Library/MipiSysTLib/MipiSysTLib.inf=0D + MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNull.inf=0D =0D [Components.EBC]=0D MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf=0D --=20 2.39.2.windows.1