]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/PrintDxe/Print.c
Move OEMBadging protocol from MdeModulePkg to IntelFrameworkModulePkg
[mirror_edk2.git] / MdeModulePkg / Universal / PrintDxe / Print.c
CommitLineData
610b2cbf 1/** @file\r
2 This driver produces Print2 protocol layered on top of the PrintLib from the MdePkg.\r
3\r
4Copyright (c) 2009, Intel Corporation. <BR>\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT 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
23EFI_HANDLE mPrintThunkHandle = NULL;\r
24\r
25CONST EFI_PRINT2_PROTOCOL mPrint2Protocol = {\r
26 UnicodeVSPrint,\r
27 UnicodeSPrint,\r
28 UnicodeVSPrintAsciiFormat,\r
29 UnicodeSPrintAsciiFormat,\r
30 UnicodeValueToString,\r
31 AsciiVSPrint,\r
32 AsciiSPrint,\r
33 AsciiVSPrintUnicodeFormat,\r
34 AsciiSPrintUnicodeFormat,\r
35 AsciiValueToString\r
36};\r
37\r
38\r
39/**\r
40 The user Entry Point for Print module.\r
41\r
42 This is the entry point for Print DXE Driver. It installs the Print2 Protocol.\r
43\r
44 @param[in] ImageHandle The firmware allocated handle for the EFI image.\r
45 @param[in] SystemTable A pointer to the EFI System Table.\r
46\r
47 @retval EFI_SUCCESS The entry point is executed successfully.\r
48 @retval Others Some error occurs when executing this entry point.\r
49\r
50**/\r
51EFI_STATUS\r
52EFIAPI\r
53PrintEntryPoint (\r
54 IN EFI_HANDLE ImageHandle,\r
55 IN EFI_SYSTEM_TABLE *SystemTable\r
56 )\r
57{\r
58 EFI_STATUS Status;\r
59\r
60 Status = gBS->InstallMultipleProtocolInterfaces (\r
61 &mPrintThunkHandle,\r
62 &gEfiPrint2ProtocolGuid, &mPrint2Protocol,\r
63 NULL\r
64 );\r
65 ASSERT_EFI_ERROR (Status);\r
66\r
67 return Status;\r
68}\r