REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2054
CC: Jordan Justen <jordan.l.jus...@intel.com> CC: Laszlo Ersek <ler...@redhat.com> CC: Ard Biesheuvel <ard.biesheu...@arm.com> Signed-off-by: Vitaly Cheptsov <vit9...@protonmail.com> --- OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c | 98 -------------------- OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf | 3 +- OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf | 3 +- OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf | 3 +- OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + OvmfPkg/OvmfXen.dsc | 1 + 8 files changed, 7 insertions(+), 104 deletions(-) diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c index dffb20822d..a4e0861d00 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c @@ -261,101 +261,3 @@ DebugClearMemory ( // return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue)); } - - -/** - Returns TRUE if ASSERT() macros are enabled. - - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of - PcdDebugProperyMask is set. Otherwise FALSE is returned. - - @retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set. - @retval FALSE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear. - -**/ -BOOLEAN -EFIAPI -DebugAssertEnabled ( - VOID - ) -{ - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); -} - - -/** - Returns TRUE if DEBUG() macros are enabled. - - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of - PcdDebugProperyMask is set. Otherwise FALSE is returned. - - @retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set. - @retval FALSE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is clear. - -**/ -BOOLEAN -EFIAPI -DebugPrintEnabled ( - VOID - ) -{ - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); -} - - -/** - Returns TRUE if DEBUG_CODE() macros are enabled. - - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of - PcdDebugProperyMask is set. Otherwise FALSE is returned. - - @retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set. - @retval FALSE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is clear. - -**/ -BOOLEAN -EFIAPI -DebugCodeEnabled ( - VOID - ) -{ - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); -} - - -/** - Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled. - - This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of - PcdDebugProperyMask is set. Otherwise FALSE is returned. - - @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. - @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is clear. - -**/ -BOOLEAN -EFIAPI -DebugClearMemoryEnabled ( - VOID - ) -{ - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); -} - -/** - Returns TRUE if any one of the bit is set both in ErrorLevel and PcdFixedDebugPrintErrorLevel. - - This function compares the bit mask of ErrorLevel and PcdFixedDebugPrintErrorLevel. - - @retval TRUE Current ErrorLevel is supported. - @retval FALSE Current ErrorLevel is not supported. - -**/ -BOOLEAN -EFIAPI -DebugPrintLevelEnabled ( - IN CONST UINTN ErrorLevel - ) -{ - return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) != 0); -} diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf index 94ab910507..6cc62e3acf 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf @@ -39,11 +39,10 @@ [LibraryClasses] PcdLib PrintLib BaseLib + DebugCommonLib DebugPrintErrorLevelLib [Pcd] gUefiOvmfPkgTokenSpaceGuid.PcdDebugIoPort ## CONSUMES gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## CONSUMES gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES - gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel ## CONSUMES - diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf index 8f721d249d..9f5b20b314 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf @@ -39,11 +39,10 @@ [LibraryClasses] PcdLib PrintLib BaseLib + DebugCommonLib DebugPrintErrorLevelLib [Pcd] gUefiOvmfPkgTokenSpaceGuid.PcdDebugIoPort ## CONSUMES gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## CONSUMES gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES - gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel ## CONSUMES - diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf index 6a85b333ee..1708fae44c 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNocheck.inf @@ -38,11 +38,10 @@ [LibraryClasses] PcdLib PrintLib BaseLib + DebugCommonLib DebugPrintErrorLevelLib [Pcd] gUefiOvmfPkgTokenSpaceGuid.PcdDebugIoPort ## CONSUMES gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## CONSUMES gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES - gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel ## CONSUMES - diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 7c8b51f43b..c8adf75730 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -180,6 +180,7 @@ [LibraryClasses] !endif LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf + DebugCommonLib|MdePkg/Library/BaseDebugCommonLib/BaseDebugCommonLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index a0596c4416..4df757ae68 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -184,6 +184,7 @@ [LibraryClasses] !endif LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf + DebugCommonLib|MdePkg/Library/BaseDebugCommonLib/BaseDebugCommonLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 2e764b6b72..f0f6226f67 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -184,6 +184,7 @@ [LibraryClasses] !endif LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf + DebugCommonLib|MdePkg/Library/BaseDebugCommonLib/BaseDebugCommonLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc index 8b3615e0b0..257e2c1740 100644 --- a/OvmfPkg/OvmfXen.dsc +++ b/OvmfPkg/OvmfXen.dsc @@ -171,6 +171,7 @@ [LibraryClasses] !endif LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf + DebugCommonLib|MdePkg/Library/BaseDebugCommonLib/BaseDebugCommonLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf -- 2.24.2 (Apple Git-127) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59325): https://edk2.groups.io/g/devel/message/59325 Mute This Topic: https://groups.io/mt/74163302/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-