TianoCore EDK2 master
Loading...
Searching...
No Matches
InternalTraceHubApiCommon.h File Reference

Go to the source code of this file.

Enumerations

enum  TRACEHUB_PRINTTYPE { TraceHubDebugType = 0 , TraceHubCatalogType }
 
enum  TRACE_HUB_ROUTING { TraceHubRoutingDisable = 0 , TraceHubRoutingEnable , TraceHubRoutingMax }
 
enum  TRACE_HUB_DEBUG_LEVEL {
  TraceHubDebugLevelError = 0 , TraceHubDebugLevelErrorWarning , TraceHubDebugLevelErrorWarningInfo , TraceHubDebugLevelErrorWarningInfoVerbose ,
  TraceHubDebugLevelMax
}
 

Functions

BOOLEAN EFIAPI TraceHubDataEnabled (IN BOOLEAN Flag, IN UINT8 DbgLevel, IN TRACE_HUB_SEVERITY_TYPE SeverityType)
 
VOID EFIAPI SwapBytesGuid (IN GUID *Guid, OUT GUID *ConvertedGuid)
 
RETURN_STATUS EFIAPI CheckWhetherToOutputMsg (IN OUT MIPI_SYST_HANDLE *MipiSystHandle, IN UINT8 *DbgContext, IN TRACE_HUB_SEVERITY_TYPE SeverityType, IN TRACEHUB_PRINTTYPE PrintType)
 
RETURN_STATUS EFIAPI GetTraceHubMmioAddress (IN UINT8 *DbgContext, IN OUT UINT64 *TraceAddress)
 
RETURN_STATUS EFIAPI GetTraceHubMsgVisibility (IN UINT8 *DbgContext, IN OUT BOOLEAN *Flag, IN OUT UINT8 *DbgLevel)
 

Detailed Description

This header file declares functions and type for common use.

Copyright (c) 2023, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file InternalTraceHubApiCommon.h.

Enumeration Type Documentation

◆ TRACE_HUB_DEBUG_LEVEL

enum TRACE_HUB_DEBUG_LEVEL

Definition at line 24 of file InternalTraceHubApiCommon.h.

◆ TRACE_HUB_ROUTING

enum TRACE_HUB_ROUTING

Definition at line 18 of file InternalTraceHubApiCommon.h.

◆ TRACEHUB_PRINTTYPE

enum TRACEHUB_PRINTTYPE

Definition at line 13 of file InternalTraceHubApiCommon.h.

Function Documentation

◆ CheckWhetherToOutputMsg()

RETURN_STATUS EFIAPI CheckWhetherToOutputMsg ( IN OUT MIPI_SYST_HANDLE MipiSystHandle,
IN UINT8 *  DbgContext,
IN TRACE_HUB_SEVERITY_TYPE  SeverityType,
IN TRACEHUB_PRINTTYPE  PrintType 
)

Check whether to output Trace Hub message according to some conditions. Trace Hub message will be disabled if TraceHubDataEnabled() return FALSE or Trace Hub MMIO address is 0.

Parameters
[in,out]MipiSystHandleA pointer to MIPI_SYST_HANDLE structure.
[in]DbgContextA pointer to Trace Hub debug instance.
[in]SeverityTypeSeverity type of input message.
[in]PrintTypeEither catalog print or debug print.
Return values
RETURN_SUCCESSCurrent Trace Hub message need to be output.
OtherCurrent Trace Hub message will be disabled.

Definition at line 94 of file InternalTraceHubApiCommon.c.

◆ GetTraceHubMmioAddress()

RETURN_STATUS EFIAPI GetTraceHubMmioAddress ( IN UINT8 *  DbgContext,
IN OUT UINT64 *  TraceAddress 
)

Get Trace Hub MMIO Address.

Parameters
[in]DbgContextA pointer to Trace Hub debug instance.
[in,out]TraceAddressTrace Hub MMIO Address.
Return values
RETURN_SUCCESSOperation is successfully.
OtherOperation is failed.

Definition at line 145 of file InternalTraceHubApiCommon.c.

◆ GetTraceHubMsgVisibility()

RETURN_STATUS EFIAPI GetTraceHubMsgVisibility ( IN UINT8 *  DbgContext,
IN OUT BOOLEAN *  Flag,
IN OUT UINT8 *  DbgLevel 
)

Get visibility of Trace Hub Msg.

Parameters
[in]DbgContextA pointer to Trace Hub debug instance.
[in,out]FlagFlag to enable or disable Trace Hub message.
[in,out]DbgLevelDebug Level of Trace Hub.
Return values
RETURN_SUCCESSOperation is successfully.
OtherOperation is failed.

Definition at line 178 of file InternalTraceHubApiCommon.c.

◆ SwapBytesGuid()

VOID EFIAPI SwapBytesGuid ( IN GUID Guid,
OUT GUID ConvertedGuid 
)

Convert GUID from LE to BE or BE to LE.

Parameters
[in]GuidGUID that need to be converted.
[out]ConvertedGuidGUID that is converted.

Definition at line 68 of file InternalTraceHubApiCommon.c.

◆ TraceHubDataEnabled()

BOOLEAN EFIAPI TraceHubDataEnabled ( IN BOOLEAN  Flag,
IN UINT8  DbgLevel,
IN TRACE_HUB_SEVERITY_TYPE  SeverityType 
)

Conditionally determine whether to enable Trace Hub message.

Parameters
[in]FlagFlag to enable or disable Trace Hub message.
[in]DbgLevelDebug Level of Trace Hub.
[in]SeverityTypeSeverity type of input message.
Return values
TRUEEnable trace hub message.
FALSEDisable trace hub message.

Definition at line 31 of file InternalTraceHubApiCommon.c.