]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Ppi/Debug.h
MdeModulePkg: Add definitions for EDKII DEBUG PPI
[mirror_edk2.git] / MdeModulePkg / Include / Ppi / Debug.h
CommitLineData
52e22c60
ZG
1/** @file\r
2 Define the EDKII_DEBUG_PPI that PEIMs can use to dump info to debug port.\r
3\r
4 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
5\r
6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions\r
8 of the BSD License which accompanies this distribution. The\r
9 full text of the license may be found at\r
10 http://opensource.org/licenses/bsd-license.php\r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
15**/\r
16\r
17#ifndef __EDKII_DEBUG_PPI_H__\r
18#define __EDKII_DEBUG_PPI_H__\r
19\r
20#include <Pi/PiPeiCis.h>\r
21\r
22//\r
23// Global ID for the EDKII_DEBUG_PPI\r
24//\r
25#define EDKII_DEBUG_PPI_GUID \\r
26 { \\r
27 0x999e699c, 0xb013, 0x475e, {0xb1, 0x7b, 0xf3, 0xa8, 0xae, 0x5c, 0x48, 0x75} \\r
28 }\r
29\r
30///\r
31/// Forward declaration for the PEI_DEBUG_LIB_DEBUG_PPI EDKII_DEBUG_PPI\r
32///\r
33typedef struct _EDKII_DEBUG_PPI EDKII_DEBUG_PPI;\r
34\r
35/**\r
36 Print a debug message to debug output device if the specified error level\r
37 is enabled.\r
38\r
39 @param[in] ErrorLevel The error level of the debug message.\r
40 @param[in] Format Format string for the debug message to print.\r
41 @param[in] Marker BASE_LIST marker for the variable argument list.\r
42\r
43**/\r
44typedef\r
45VOID\r
46(EFIAPI *EDKII_DEBUG_BPRINT)(\r
47 IN UINTN ErrorLevel,\r
48 IN CONST CHAR8 *Format,\r
49 IN BASE_LIST Marker\r
50 );\r
51\r
52/**\r
53 Print an assert message containing a filename, line number, and description.\r
54 This may be followed by a breakpoint or a dead loop.\r
55\r
56 @param[in] FileName The pointer to the name of the source file that\r
57 generated the assert condition.\r
58 @param[in] LineNumber The line number in the source file that generated\r
59 the assert condition\r
60 @param[in] Description The pointer to the description of the assert condition.\r
61\r
62**/\r
63typedef\r
64VOID\r
65(EFIAPI *EDKII_DEBUG_ASSERT)(\r
66 IN CONST CHAR8 *FileName,\r
67 IN UINTN LineNumber,\r
68 IN CONST CHAR8 *Description\r
69 );\r
70\r
71///\r
72/// This PPI contains a set of services to print message to debug output device\r
73///\r
74struct _EDKII_DEBUG_PPI {\r
75 EDKII_DEBUG_BPRINT DebugBPrint;\r
76 EDKII_DEBUG_ASSERT DebugAssert;\r
77};\r
78\r
79extern EFI_GUID gEdkiiDebugPpiGuid;\r
80\r
81#endif\r
82\r