mirror of https://github.com/acidanthera/audk.git
MdeModulePkg: Remove UefiBootServicesTableLib dependency from DxePrintLibPrint2Protocol.
The use of the BootServicesTableLib inside the DxePrintLibPrint2Protocol allows for potential circular library dependency. Signed-off-by: jcarsey Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12273 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
0cdda8d6f0
commit
352892190a
|
@ -21,27 +21,17 @@
|
||||||
MODULE_TYPE = DXE_DRIVER
|
MODULE_TYPE = DXE_DRIVER
|
||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
LIBRARY_CLASS = PrintLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
LIBRARY_CLASS = PrintLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
||||||
|
|
||||||
CONSTRUCTOR = PrintLibConstructor
|
CONSTRUCTOR = PrintLibConstructor
|
||||||
|
|
||||||
#
|
|
||||||
# The following information is for reference only and not required by the build tools.
|
|
||||||
#
|
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
|
||||||
#
|
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
PrintLib.c
|
PrintLib.c
|
||||||
|
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
|
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
BaseLib
|
BaseLib
|
||||||
UefiBootServicesTableLib
|
|
||||||
DebugLib
|
DebugLib
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
|
|
|
@ -24,7 +24,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Library/PrintLib.h>
|
#include <Library/PrintLib.h>
|
||||||
|
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
|
|
||||||
EFI_PRINT2_PROTOCOL *mPrint2Protocol = NULL;
|
EFI_PRINT2_PROTOCOL *mPrint2Protocol = NULL;
|
||||||
|
@ -50,7 +49,7 @@ PrintLibConstructor (
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
Status = gBS->LocateProtocol (
|
Status = SystemTable->BootServices->LocateProtocol (
|
||||||
&gEfiPrint2ProtocolGuid,
|
&gEfiPrint2ProtocolGuid,
|
||||||
NULL,
|
NULL,
|
||||||
(VOID**) &mPrint2Protocol
|
(VOID**) &mPrint2Protocol
|
||||||
|
|
Loading…
Reference in New Issue