]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | This driver produces Print2 protocol layered on top of the PrintLib from the MdePkg.\r | |
3 | \r | |
4 | Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
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 | |
21 | #include <Library/UefiDriverEntryPoint.h>\r | |
22 | \r | |
23 | EFI_HANDLE mPrintThunkHandle = NULL;\r | |
24 | \r | |
25 | CONST EFI_PRINT2_PROTOCOL mPrint2Protocol = {\r | |
26 | UnicodeBSPrint,\r | |
27 | UnicodeSPrint,\r | |
28 | UnicodeBSPrintAsciiFormat,\r | |
29 | UnicodeSPrintAsciiFormat,\r | |
30 | UnicodeValueToString,\r | |
31 | AsciiBSPrint,\r | |
32 | AsciiSPrint,\r | |
33 | AsciiBSPrintUnicodeFormat,\r | |
34 | AsciiSPrintUnicodeFormat,\r | |
35 | AsciiValueToString\r | |
36 | };\r | |
37 | \r | |
38 | /**\r | |
39 | The user Entry Point for Print module.\r | |
40 | \r | |
41 | This is the entry point for Print DXE Driver. It installs the Print2 Protocol.\r | |
42 | \r | |
43 | @param[in] ImageHandle The firmware allocated handle for the EFI image.\r | |
44 | @param[in] SystemTable A pointer to the EFI System Table.\r | |
45 | \r | |
46 | @retval EFI_SUCCESS The entry point is executed successfully.\r | |
47 | @retval Others Some error occurs when executing this entry point.\r | |
48 | \r | |
49 | **/\r | |
50 | EFI_STATUS\r | |
51 | EFIAPI\r | |
52 | PrintEntryPoint (\r | |
53 | IN EFI_HANDLE ImageHandle,\r | |
54 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
55 | )\r | |
56 | {\r | |
57 | EFI_STATUS Status;\r | |
58 | \r | |
59 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
60 | &mPrintThunkHandle,\r | |
61 | &gEfiPrint2ProtocolGuid, &mPrint2Protocol,\r | |
62 | NULL\r | |
63 | );\r | |
64 | ASSERT_EFI_ERROR (Status);\r | |
65 | \r | |
66 | return Status;\r | |
67 | }\r |