]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Compatibility/PrintThunk/PrintThunk.c
CorebootPayloadPkg: Switch to use StatusCode driver in MdeModulePkg
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / PrintThunk / PrintThunk.c
CommitLineData
46d95f32 1/** @file\r
2 Module produces EDK gEfiPrintProtocolGuid for backward compatibility support.\r
3\r
4 EDK II retires old EDK Print Protocol and this module produces\r
5 gEfiPrintProtocolGuid based on PrintLib:\r
6 1) If it links against BasePrintLib in MdePkg, it produces gEfiPrintProtocolGuid\r
7 without any prerequisites.\r
8 2) If it links against DxePrintLibPrint2Protocol in MdeModulePkg, it produces\r
9 gEfiPrintProtocolGuid on top of gEfiPrint2ProtocolGuid.\r
10\r
584d5652 11Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
46d95f32 12\r
584d5652 13This program and the accompanying materials\r
46d95f32 14are licensed and made available under the terms and conditions of the BSD License\r
15which accompanies this distribution. The full text of the license may be found at\r
16http://opensource.org/licenses/bsd-license.php\r
17\r
18THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
19WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
20Module Name:\r
21\r
22**/\r
23\r
24#include <PiDxe.h>\r
25\r
26#include <Protocol/Print.h>\r
27#include <Library/PrintLib.h>\r
28#include <Library/UefiBootServicesTableLib.h>\r
29#include <Library/DebugLib.h>\r
30\r
31EFI_HANDLE mPrintThunkHandle = NULL;\r
32\r
33CONST EFI_PRINT_PROTOCOL mPrintProtocol = {\r
34 UnicodeVSPrint,\r
35};\r
36\r
37\r
38/**\r
39 The user Entry Point for Print thunk module.\r
40\r
41 This is the entry point for Print thunk DXE Driver. It installs the Print Protocol on\r
42 top of PrintLib class in MdePkg.\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
53InitPrintThunk (\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 &gEfiPrintProtocolGuid, &mPrintProtocol,\r
63 NULL\r
64 );\r
65 ASSERT_EFI_ERROR (Status);\r
66\r
67 return Status;\r
68}\r