TianoCore EDK2 master
Loading...
Searching...
No Matches
Print.c
Go to the documentation of this file.
1
9#include <PiDxe.h>
10
11#include <Protocol/Print2.h>
12#include <Library/PrintLib.h>
14#include <Library/DebugLib.h>
16
34EFIAPI
36 IN OUT CHAR16 *Buffer,
37 IN UINTN Flags,
38 IN INT64 Value,
39 IN UINTN Width
40 )
41{
42 DEBUG ((DEBUG_ERROR, "PrintDxe: The UnicodeValueToString service in EFI_PRINT2_PROTOCOL is no longer supported for security reason.\n"));
43 DEBUG ((DEBUG_ERROR, "PrintDxe: Please consider using the UnicodeValueToStringS service in EFI_PRINT2S_PROTOCOL.\n"));
44 ASSERT (FALSE);
45 return 0;
46}
47
63EFIAPI
65 OUT CHAR8 *Buffer,
66 IN UINTN Flags,
67 IN INT64 Value,
68 IN UINTN Width
69 )
70{
71 DEBUG ((DEBUG_ERROR, "PrintDxe: The AsciiValueToString service in EFI_PRINT2_PROTOCOL is no longer supported for security reason.\n"));
72 DEBUG ((DEBUG_ERROR, "PrintDxe: Please consider using the AsciiValueToStringS service in EFI_PRINT2S_PROTOCOL.\n"));
73 ASSERT (FALSE);
74 return 0;
75}
76
77EFI_HANDLE mPrintThunkHandle = NULL;
78
79CONST EFI_PRINT2_PROTOCOL mPrint2Protocol = {
90};
91
92CONST EFI_PRINT2S_PROTOCOL mPrint2SProtocol = {
103};
104
118EFIAPI
120 IN EFI_HANDLE ImageHandle,
121 IN EFI_SYSTEM_TABLE *SystemTable
122 )
123{
124 EFI_STATUS Status;
125
126 Status = gBS->InstallMultipleProtocolInterfaces (
127 &mPrintThunkHandle,
128 &gEfiPrint2ProtocolGuid,
129 &mPrint2Protocol,
130 &gEfiPrint2SProtocolGuid,
131 &mPrint2SProtocol,
132 NULL
133 );
134 ASSERT_EFI_ERROR (Status);
135
136 return Status;
137}
UINT64 UINTN
RETURN_STATUS EFIAPI UnicodeValueToStringS(IN OUT CHAR16 *Buffer, IN UINTN BufferSize, IN UINTN Flags, IN INT64 Value, IN UINTN Width)
Definition: PrintLib.c:652
UINTN EFIAPI UnicodeBSPrintAsciiFormat(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString, IN BASE_LIST Marker)
Definition: PrintLib.c:530
UINTN EFIAPI AsciiBSPrintUnicodeFormat(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString, IN BASE_LIST Marker)
Definition: PrintLib.c:935
UINTN EFIAPI AsciiSPrintUnicodeFormat(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
Definition: PrintLib.c:988
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
Definition: PrintLib.c:408
UINTN EFIAPI UnicodeSPrintAsciiFormat(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
Definition: PrintLib.c:583
UINTN EFIAPI UnicodeBSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString, IN BASE_LIST Marker)
Definition: PrintLib.c:354
UINTN EFIAPI AsciiBSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString, IN BASE_LIST Marker)
Definition: PrintLib.c:763
RETURN_STATUS EFIAPI AsciiValueToStringS(IN OUT CHAR8 *Buffer, IN UINTN BufferSize, IN UINTN Flags, IN INT64 Value, IN UINTN Width)
Definition: PrintLib.c:1055
UINTN EFIAPI AsciiSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
Definition: PrintLib.c:813
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
#define DEBUG(Expression)
Definition: DebugLib.h:434
UINTN EFIAPI PrintDxeAsciiValueToString(OUT CHAR8 *Buffer, IN UINTN Flags, IN INT64 Value, IN UINTN Width)
Definition: Print.c:64
UINTN EFIAPI PrintDxeUnicodeValueToString(IN OUT CHAR16 *Buffer, IN UINTN Flags, IN INT64 Value, IN UINTN Width)
Definition: Print.c:35
EFI_STATUS EFIAPI PrintEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: Print.c:119
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_BOOT_SERVICES * gBS