2 This driver installs gEdkiiDebugPpiGuid PPI to provide
3 debug services for PEIMs.
5 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Uefi/UefiBaseType.h>
18 #include <Library/PeimEntryPoint.h>
19 #include <Library/PeiServicesLib.h>
20 #include <Library/DebugLib.h>
22 #include <Ppi/Debug.h>
24 #include "DebugService.h"
26 EDKII_DEBUG_PPI mDebugPpi
= {
31 EFI_PEI_PPI_DESCRIPTOR mDebugServicePpi
= {
32 (EFI_PEI_PPI_DESCRIPTOR_PPI
| EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST
),
38 Print a debug message to debug output device if the specified error level
41 @param[in] ErrorLevel The error level of the debug message.
42 @param[in] Format Format string for the debug message to print.
43 @param[in] Marker BASE_LIST marker for the variable argument list.
50 IN CONST CHAR8
*Format
,
54 DebugBPrint(ErrorLevel
, Format
, Marker
);
58 Print an assert message containing a filename, line number, and description.
59 This may be followed by a breakpoint or a dead loop.
61 @param[in] FileName The pointer to the name of the source file that
62 generated the assert condition.
63 @param[in] LineNumber The line number in the source file that generated
65 @param[in] Description The pointer to the description of the assert condition.
71 IN CONST CHAR8
*FileName
,
73 IN CONST CHAR8
*Description
76 DebugAssert(FileName
, LineNumber
, Description
);
80 Entry point of Debug Service PEIM
82 This funciton installs EDKII DEBUG PPI
84 @param FileHandle Handle of the file being invoked.
85 @param PeiServices Describes the list of possible PEI Services.
87 @retval EFI_SUCESS The entry point of Debug Service PEIM executes successfully.
88 @retval Others Some error occurs during the execution of this function.
93 DebugSerivceInitialize (
94 IN EFI_PEI_FILE_HANDLE FileHandle
,
95 IN CONST EFI_PEI_SERVICES
**PeiServices
98 return PeiServicesInstallPpi (&mDebugServicePpi
);