VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/TraceHubDebugSysTLib/InternalTraceHubApiCommon.h@ 105681

Last change on this file since 105681 was 101291, checked in by vboxsync, 19 months ago

EFI/FirmwareNew: Make edk2-stable202308 build on all supported platforms (using gcc at least, msvc not tested yet), bugref:4643

  • Property svn:eol-style set to native
File size: 3.2 KB
Line 
1/** @file
2This header file declares functions and type for common use.
3
4Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
5
6SPDX-License-Identifier: BSD-2-Clause-Patent
7
8**/
9
10#ifndef INTERNAL_TRACE_HUB_API_COMMON_H_
11#define INTERNAL_TRACE_HUB_API_COMMON_H_
12
13typedef enum {
14 TraceHubDebugType = 0,
15 TraceHubCatalogType
16} TRACEHUB_PRINTTYPE;
17
18typedef enum {
19 TraceHubRoutingDisable = 0,
20 TraceHubRoutingEnable,
21 TraceHubRoutingMax
22} TRACE_HUB_ROUTING;
23
24typedef enum {
25 TraceHubDebugLevelError = 0,
26 TraceHubDebugLevelErrorWarning,
27 TraceHubDebugLevelErrorWarningInfo,
28 TraceHubDebugLevelErrorWarningInfoVerbose,
29 TraceHubDebugLevelMax
30} TRACE_HUB_DEBUG_LEVEL;
31
32/**
33 Conditionally determine whether to enable Trace Hub message.
34
35 @param[in] Flag Flag to enable or disable Trace Hub message.
36 @param[in] DbgLevel Debug Level of Trace Hub.
37 @param[in] SeverityType Severity type of input message.
38
39 @retval TRUE Enable trace hub message.
40 @retval FALSE Disable trace hub message.
41**/
42BOOLEAN
43EFIAPI
44TraceHubDataEnabled (
45 IN BOOLEAN Flag,
46 IN UINT8 DbgLevel,
47 IN TRACE_HUB_SEVERITY_TYPE SeverityType
48 );
49
50/**
51 Convert GUID from LE to BE or BE to LE.
52
53 @param[in] Guid GUID that need to be converted.
54 @param[out] ConvertedGuid GUID that is converted.
55**/
56VOID
57EFIAPI
58SwapBytesGuid (
59 IN GUID *Guid,
60 OUT GUID *ConvertedGuid
61 );
62
63/**
64 Check whether to output Trace Hub message according to some conditions.
65 Trace Hub message will be disabled if TraceHubDataEnabled() return FALSE
66 or Trace Hub MMIO address is 0.
67
68 @param[in, out] MipiSystHandle A pointer to MIPI_SYST_HANDLE structure.
69 @param[in] DbgContext A pointer to Trace Hub debug instance.
70 @param[in] SeverityType Severity type of input message.
71 @param[in] PrintType Either catalog print or debug print.
72
73 @retval RETURN_SUCCESS Current Trace Hub message need to be output.
74 @retval Other Current Trace Hub message will be disabled.
75**/
76RETURN_STATUS
77EFIAPI
78CheckWhetherToOutputMsg (
79 IN OUT MIPI_SYST_HANDLE *MipiSystHandle,
80 IN UINT8 *DbgContext,
81 IN TRACE_HUB_SEVERITY_TYPE SeverityType,
82 IN TRACEHUB_PRINTTYPE PrintType
83 );
84
85/**
86 Get Trace Hub MMIO Address.
87
88 @param[in] DbgContext A pointer to Trace Hub debug instance.
89 @param[in, out] TraceAddress Trace Hub MMIO Address.
90
91 @retval RETURN_SUCCESS Operation is successfully.
92 @retval Other Operation is failed.
93**/
94RETURN_STATUS
95EFIAPI
96GetTraceHubMmioAddress (
97 IN UINT8 *DbgContext,
98 IN OUT UINT64 *TraceAddress
99 );
100
101/**
102 Get visibility of Trace Hub Msg.
103
104 @param[in] DbgContext A pointer to Trace Hub debug instance.
105 @param[in, out] Flag Flag to enable or disable Trace Hub message.
106 @param[in, out] DbgLevel Debug Level of Trace Hub.
107
108 @retval RETURN_SUCCESS Operation is successfully.
109 @retval Other Operation is failed.
110**/
111RETURN_STATUS
112EFIAPI
113GetTraceHubMsgVisibility (
114 IN UINT8 *DbgContext,
115 IN OUT BOOLEAN *Flag,
116 IN OUT UINT8 *DbgLevel
117 );
118
119#endif // INTERNAL_TRACE_HUB_API_COMMON_H_
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette