2 This driver produces Print2 protocols layered on top of the PrintLib from the MdePkg.
4 Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Protocol/Print2.h>
18 #include <Library/PrintLib.h>
19 #include <Library/UefiBootServicesTableLib.h>
20 #include <Library/DebugLib.h>
21 #include <Library/UefiDriverEntryPoint.h>
23 EFI_HANDLE mPrintThunkHandle
= NULL
;
25 CONST EFI_PRINT2_PROTOCOL mPrint2Protocol
= {
28 UnicodeBSPrintAsciiFormat
,
29 UnicodeSPrintAsciiFormat
,
33 AsciiBSPrintUnicodeFormat
,
34 AsciiSPrintUnicodeFormat
,
38 CONST EFI_PRINT2S_PROTOCOL mPrint2SProtocol
= {
41 UnicodeBSPrintAsciiFormat
,
42 UnicodeSPrintAsciiFormat
,
43 UnicodeValueToStringS
,
46 AsciiBSPrintUnicodeFormat
,
47 AsciiSPrintUnicodeFormat
,
52 The user Entry Point for Print module.
54 This is the entry point for Print DXE Driver. It installs the Print2 Protocol.
56 @param[in] ImageHandle The firmware allocated handle for the EFI image.
57 @param[in] SystemTable A pointer to the EFI System Table.
59 @retval EFI_SUCCESS The entry point is executed successfully.
60 @retval Others Some error occurs when executing this entry point.
66 IN EFI_HANDLE ImageHandle
,
67 IN EFI_SYSTEM_TABLE
*SystemTable
72 Status
= gBS
->InstallMultipleProtocolInterfaces (
74 &gEfiPrint2ProtocolGuid
, &mPrint2Protocol
,
75 &gEfiPrint2SProtocolGuid
, &mPrint2SProtocol
,
78 ASSERT_EFI_ERROR (Status
);