]>
Commit | Line | Data |
---|---|---|
610b2cbf | 1 | /** @file\r |
e43adbaf | 2 | This driver produces Print2 protocols layered on top of the PrintLib from the MdePkg.\r |
610b2cbf | 3 | \r |
e43adbaf | 4 | Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r |
e5eed7d3 | 5 | This program and the accompanying materials\r |
610b2cbf | 6 | are licensed and made available under the terms and conditions of the BSD License\r |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #include <PiDxe.h>\r | |
16 | \r | |
17 | #include <Protocol/Print2.h>\r | |
18 | #include <Library/PrintLib.h>\r | |
19 | #include <Library/UefiBootServicesTableLib.h>\r | |
20 | #include <Library/DebugLib.h>\r | |
4f22e23b | 21 | #include <Library/UefiDriverEntryPoint.h>\r |
610b2cbf | 22 | \r |
23 | EFI_HANDLE mPrintThunkHandle = NULL;\r | |
24 | \r | |
25 | CONST EFI_PRINT2_PROTOCOL mPrint2Protocol = {\r | |
504dcb0a | 26 | UnicodeBSPrint,\r |
610b2cbf | 27 | UnicodeSPrint,\r |
504dcb0a | 28 | UnicodeBSPrintAsciiFormat,\r |
610b2cbf | 29 | UnicodeSPrintAsciiFormat,\r |
30 | UnicodeValueToString,\r | |
504dcb0a | 31 | AsciiBSPrint,\r |
610b2cbf | 32 | AsciiSPrint,\r |
504dcb0a | 33 | AsciiBSPrintUnicodeFormat,\r |
610b2cbf | 34 | AsciiSPrintUnicodeFormat,\r |
35 | AsciiValueToString\r | |
36 | };\r | |
37 | \r | |
e43adbaf HW |
38 | CONST EFI_PRINT2S_PROTOCOL mPrint2SProtocol = {\r |
39 | UnicodeBSPrint,\r | |
40 | UnicodeSPrint,\r | |
41 | UnicodeBSPrintAsciiFormat,\r | |
42 | UnicodeSPrintAsciiFormat,\r | |
43 | UnicodeValueToStringS,\r | |
44 | AsciiBSPrint,\r | |
45 | AsciiSPrint,\r | |
46 | AsciiBSPrintUnicodeFormat,\r | |
47 | AsciiSPrintUnicodeFormat,\r | |
48 | AsciiValueToStringS\r | |
49 | };\r | |
50 | \r | |
610b2cbf | 51 | /**\r |
52 | The user Entry Point for Print module.\r | |
53 | \r | |
54 | This is the entry point for Print DXE Driver. It installs the Print2 Protocol.\r | |
55 | \r | |
56 | @param[in] ImageHandle The firmware allocated handle for the EFI image.\r | |
57 | @param[in] SystemTable A pointer to the EFI System Table.\r | |
58 | \r | |
59 | @retval EFI_SUCCESS The entry point is executed successfully.\r | |
60 | @retval Others Some error occurs when executing this entry point.\r | |
61 | \r | |
62 | **/\r | |
63 | EFI_STATUS\r | |
64 | EFIAPI\r | |
65 | PrintEntryPoint (\r | |
66 | IN EFI_HANDLE ImageHandle,\r | |
67 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
68 | )\r | |
69 | {\r | |
70 | EFI_STATUS Status;\r | |
71 | \r | |
72 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
73 | &mPrintThunkHandle,\r | |
74 | &gEfiPrint2ProtocolGuid, &mPrint2Protocol,\r | |
e43adbaf | 75 | &gEfiPrint2SProtocolGuid, &mPrint2SProtocol,\r |
610b2cbf | 76 | NULL\r |
77 | );\r | |
78 | ASSERT_EFI_ERROR (Status);\r | |
79 | \r | |
80 | return Status;\r | |
81 | }\r |