1 | /** @file
|
---|
2 | Define the EDKII_DEBUG_PPI that PEIMs can use to dump info to debug port.
|
---|
3 |
|
---|
4 | Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
---|
5 |
|
---|
6 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
7 |
|
---|
8 | **/
|
---|
9 |
|
---|
10 | #ifndef __EDKII_DEBUG_PPI_H__
|
---|
11 | #define __EDKII_DEBUG_PPI_H__
|
---|
12 |
|
---|
13 | #include <Pi/PiPeiCis.h>
|
---|
14 |
|
---|
15 | //
|
---|
16 | // Global ID for the EDKII_DEBUG_PPI
|
---|
17 | //
|
---|
18 | #define EDKII_DEBUG_PPI_GUID \
|
---|
19 | { \
|
---|
20 | 0x999e699c, 0xb013, 0x475e, {0xb1, 0x7b, 0xf3, 0xa8, 0xae, 0x5c, 0x48, 0x75} \
|
---|
21 | }
|
---|
22 |
|
---|
23 | ///
|
---|
24 | /// Forward declaration for the PEI_DEBUG_LIB_DEBUG_PPI EDKII_DEBUG_PPI
|
---|
25 | ///
|
---|
26 | typedef struct _EDKII_DEBUG_PPI EDKII_DEBUG_PPI;
|
---|
27 |
|
---|
28 | /**
|
---|
29 | Print a debug message to debug output device if the specified error level
|
---|
30 | is enabled.
|
---|
31 |
|
---|
32 | @param[in] ErrorLevel The error level of the debug message.
|
---|
33 | @param[in] Format Format string for the debug message to print.
|
---|
34 | @param[in] Marker BASE_LIST marker for the variable argument list.
|
---|
35 |
|
---|
36 | **/
|
---|
37 | typedef
|
---|
38 | VOID
|
---|
39 | (EFIAPI *EDKII_DEBUG_BPRINT)(
|
---|
40 | IN UINTN ErrorLevel,
|
---|
41 | IN CONST CHAR8 *Format,
|
---|
42 | IN BASE_LIST Marker
|
---|
43 | );
|
---|
44 |
|
---|
45 | /**
|
---|
46 | Print an assert message containing a filename, line number, and description.
|
---|
47 | This may be followed by a breakpoint or a dead loop.
|
---|
48 |
|
---|
49 | @param[in] FileName The pointer to the name of the source file that
|
---|
50 | generated the assert condition.
|
---|
51 | @param[in] LineNumber The line number in the source file that generated
|
---|
52 | the assert condition
|
---|
53 | @param[in] Description The pointer to the description of the assert condition.
|
---|
54 |
|
---|
55 | **/
|
---|
56 | typedef
|
---|
57 | VOID
|
---|
58 | (EFIAPI *EDKII_DEBUG_ASSERT)(
|
---|
59 | IN CONST CHAR8 *FileName,
|
---|
60 | IN UINTN LineNumber,
|
---|
61 | IN CONST CHAR8 *Description
|
---|
62 | );
|
---|
63 |
|
---|
64 | ///
|
---|
65 | /// This PPI contains a set of services to print message to debug output device
|
---|
66 | ///
|
---|
67 | struct _EDKII_DEBUG_PPI {
|
---|
68 | EDKII_DEBUG_BPRINT DebugBPrint;
|
---|
69 | EDKII_DEBUG_ASSERT DebugAssert;
|
---|
70 | };
|
---|
71 |
|
---|
72 | extern EFI_GUID gEdkiiDebugPpiGuid;
|
---|
73 |
|
---|
74 | #endif
|
---|
75 |
|
---|