2 This driver installs gEdkiiDebugPpiGuid PPI to provide
3 debug services for PEIMs.
5 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
7 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #include <Uefi/UefiBaseType.h>
12 #include <Library/PeimEntryPoint.h>
13 #include <Library/PeiServicesLib.h>
14 #include <Library/DebugLib.h>
16 #include <Ppi/Debug.h>
18 #include "DebugService.h"
20 EDKII_DEBUG_PPI mDebugPpi
= {
25 EFI_PEI_PPI_DESCRIPTOR mDebugServicePpi
= {
26 (EFI_PEI_PPI_DESCRIPTOR_PPI
| EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST
),
32 Print a debug message to debug output device if the specified error level
35 @param[in] ErrorLevel The error level of the debug message.
36 @param[in] Format Format string for the debug message to print.
37 @param[in] Marker BASE_LIST marker for the variable argument list.
44 IN CONST CHAR8
*Format
,
48 DebugBPrint(ErrorLevel
, Format
, Marker
);
52 Print an assert message containing a filename, line number, and description.
53 This may be followed by a breakpoint or a dead loop.
55 @param[in] FileName The pointer to the name of the source file that
56 generated the assert condition.
57 @param[in] LineNumber The line number in the source file that generated
59 @param[in] Description The pointer to the description of the assert condition.
65 IN CONST CHAR8
*FileName
,
67 IN CONST CHAR8
*Description
70 DebugAssert(FileName
, LineNumber
, Description
);
74 Entry point of Debug Service PEIM
76 This funciton installs EDKII DEBUG PPI
78 @param FileHandle Handle of the file being invoked.
79 @param PeiServices Describes the list of possible PEI Services.
81 @retval EFI_SUCESS The entry point of Debug Service PEIM executes successfully.
82 @retval Others Some error occurs during the execution of this function.
87 DebugSerivceInitialize (
88 IN EFI_PEI_FILE_HANDLE FileHandle
,
89 IN CONST EFI_PEI_SERVICES
**PeiServices
92 return PeiServicesInstallPpi (&mDebugServicePpi
);