public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: victorx.hsu@intel.com
To: devel@edk2.groups.io
Cc: VictorX Hsu <victorx.hsu@intel.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Guo Gua <gua.guo@intel.com>, Chan Laura <laura.chan@intel.com>,
	Prakashan Krishnadas Veliyathuparambil
	<krishnadas.veliyathuparambil.prakashan@intel.com>,
	K N Karthik <karthik.k.n@intel.com>
Subject: [PATCH 3/4] MdePkg: Add NULL library of TraceHubDebugSysTLib
Date: Tue, 18 Apr 2023 19:05:00 +0800	[thread overview]
Message-ID: <f2ea7895f40be166f31acb4ee96ed358c5dbbb7d.1681815523.git.victorx.hsu@intel.com> (raw)
In-Reply-To: <cover.1681815523.git.victorx.hsu@intel.com>

From: VictorX Hsu <victorx.hsu@intel.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4144

This Library is NULL library of TraceHubDebugSysTLib.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Guo Gua <gua.guo@intel.com>
Cc: Chan Laura <laura.chan@intel.com>
Cc: Prakashan Krishnadas Veliyathuparambil <krishnadas.veliyathuparambil.prakashan@intel.com>
Cc: K N Karthik <karthik.k.n@intel.com>
Signed-off-by: VictorX Hsu <victorx.hsu@intel.com>
---
 .../TraceHubDebugSysTLibNull.c                | 76 +++++++++++++++++++
 .../TraceHubDebugSysTLibNull.inf              | 29 +++++++
 MdePkg/MdePkg.dsc                             |  1 +
 3 files changed, 106 insertions(+)
 create mode 100644 MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNull.c
 create mode 100644 MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNull.inf

diff --git a/MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNull.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.<BR>
+
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Base.h>
+#include <Library/TraceHubDebugSysTLib.h>
+
+/**
+  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/TraceHubDebugSysTLibNull.inf b/MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNull.inf
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.<BR>
+#
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+
+[Defines]
+  INF_VERSION                    = 0x00010005
+  BASE_NAME                      = TraceHubDebugSysTLibNull
+  FILE_GUID                      = 16196A4E-4196-4AF4-9A6B-F4D2ACC430A8
+  MODULE_TYPE                    = BASE
+  VERSION_STRING                 = 1.0
+  LIBRARY_CLASS                  = TraceHubDebugSysTLib
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64
+#
+
+[Packages]
+  MdePkg/MdePkg.dec
+
+[Sources]
+  TraceHubDebugSysTLibNull.c
diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc
index ae9d871c52..82a4309ab2 100644
--- a/MdePkg/MdePkg.dsc
+++ b/MdePkg/MdePkg.dsc
@@ -183,6 +183,7 @@
   MdePkg/Library/MmServicesTableLib/MmServicesTableLib.inf
   MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
   MdePkg/Library/TdxLib/TdxLib.inf
+  MdePkg/Library/TraceHubDebugSysTLibNull/TraceHubDebugSysTLibNull.inf
   MdePkg/Library/MipiSysTLib/MipiSysTLib.inf
 
 [Components.EBC]
-- 
2.40.0.windows.1


  parent reply	other threads:[~2023-04-18 11:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 11:04 [PATCH 0/4] Trace Hub debug library support victorx.hsu
2023-04-18 11:04 ` [PATCH 1/4] MdePkg: Add MipiSysTLib library victorx.hsu
2023-04-18 11:04 ` [PATCH 2/4] MdeModulePkg: Add TraceHubDebugSysTLib library victorx.hsu
2023-04-18 11:05 ` victorx.hsu [this message]
2023-04-18 11:05 ` [PATCH 4/4] Maintainers.txt: Update reviewers and maintainers for Trace Hub dbg lib victorx.hsu
2023-04-21  2:33 ` [edk2-devel] [PATCH 0/4] Trace Hub debug library support Guo, Gua
2023-05-08  0:45   ` Michael D Kinney
2023-05-08  5:18     ` Hsu, VictorX
2023-05-08  5:21       ` Michael D Kinney
     [not found] ` <1757D27BA79AB0E1.26256@groups.io>
2023-04-24  1:37   ` Guo, Gua
     [not found]   ` <1758BB2DE6DD05C7.10313@groups.io>
2023-05-03 20:48     ` Guo, Gua
2023-05-03 23:54       ` Prakashan, Krishnadas Veliyathuparambil
  -- strict thread matches above, loose matches on Subject: below --
2023-05-08  5:31 victorx.hsu
2023-05-08  5:31 ` [PATCH 3/4] MdePkg: Add NULL library of TraceHubDebugSysTLib victorx.hsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f2ea7895f40be166f31acb4ee96ed358c5dbbb7d.1681815523.git.victorx.hsu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox