VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/DebugServicePei/DebugServicePei.c@ 101297

Last change on this file since 101297 was 99404, checked in by vboxsync, 22 months ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 2.4 KB
Line 
1/** @file
2 This driver installs gEdkiiDebugPpiGuid PPI to provide
3 debug services for PEIMs.
4
5 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
6
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9**/
10
11#include <Uefi/UefiBaseType.h>
12#include <Library/PeimEntryPoint.h>
13#include <Library/PeiServicesLib.h>
14#include <Library/DebugLib.h>
15
16#include <Ppi/Debug.h>
17
18#include "DebugService.h"
19
20EDKII_DEBUG_PPI mDebugPpi = {
21 PeiDebugBPrint,
22 PeiDebugAssert
23};
24
25EFI_PEI_PPI_DESCRIPTOR mDebugServicePpi = {
26 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
27 &gEdkiiDebugPpiGuid,
28 (VOID *)&mDebugPpi
29};
30
31/**
32 Print a debug message to debug output device if the specified error level
33 is enabled.
34
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.
38
39**/
40VOID
41EFIAPI
42PeiDebugBPrint (
43 IN UINTN ErrorLevel,
44 IN CONST CHAR8 *Format,
45 IN BASE_LIST Marker
46 )
47{
48 DebugBPrint (ErrorLevel, Format, Marker);
49}
50
51/**
52 Print an assert message containing a filename, line number, and description.
53 This may be followed by a breakpoint or a dead loop.
54
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
58 the assert condition
59 @param[in] Description The pointer to the description of the assert condition.
60
61**/
62VOID
63EFIAPI
64PeiDebugAssert (
65 IN CONST CHAR8 *FileName,
66 IN UINTN LineNumber,
67 IN CONST CHAR8 *Description
68 )
69{
70 DebugAssert (FileName, LineNumber, Description);
71}
72
73/**
74 Entry point of Debug Service PEIM
75
76 This funciton installs EDKII DEBUG PPI
77
78 @param FileHandle Handle of the file being invoked.
79 @param PeiServices Describes the list of possible PEI Services.
80
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.
83
84**/
85EFI_STATUS
86EFIAPI
87DebugSerivceInitialize (
88 IN EFI_PEI_FILE_HANDLE FileHandle,
89 IN CONST EFI_PEI_SERVICES **PeiServices
90 )
91{
92 return PeiServicesInstallPpi (&mDebugServicePpi);
93}
Note: See TracBrowser for help on using the repository browser.

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