From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.45]) by mx.groups.io with SMTP id smtpd.web11.14649.1589211686869658968 for ; Mon, 11 May 2020 08:41:27 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: ispras.ru, ip: 83.149.199.45, mailfrom: cheptsov@ispras.ru) Received: from localhost.localdomain (unknown [77.232.9.83]) by mail.ispras.ru (Postfix) with ESMTPSA id 53A72CD473 for ; Mon, 11 May 2020 18:41:25 +0300 (MSK) From: "Vitaly Cheptsov" To: devel@edk2.groups.io Subject: [PATCH V4 16/27] OvmfPkg: Add support for DebugCommonLib Date: Mon, 11 May 2020 18:41:10 +0300 Message-Id: <20200511154121.3878-17-cheptsov@ispras.ru> X-Mailer: git-send-email 2.24.2 (Apple Git-127) In-Reply-To: <20200511154121.3878-1-cheptsov@ispras.ru> References: <20200511154121.3878-1-cheptsov@ispras.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2054 Signed-off-by: Vitaly Cheptsov --- OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c | 98 = -------------------- OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf | 1 + OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + OvmfPkg/OvmfXen.dsc | 1 + 6 files changed, 5 insertions(+), 98 deletions(-) diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c b/OvmfPkg/Li= brary/PlatformDebugLibIoPort/DebugLib.c index dffb20822d..a4e0861d00 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c @@ -261,101 +261,3 @@ DebugClearMemory ( //=0D return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));=0D }=0D -=0D -=0D -/**=0D - Returns TRUE if ASSERT() macros are enabled.=0D -=0D - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bi= t of=0D - PcdDebugProperyMask is set. Otherwise FALSE is returned.=0D -=0D - @retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebug= ProperyMask is set.=0D - @retval FALSE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebug= ProperyMask is clear.=0D -=0D -**/=0D -BOOLEAN=0D -EFIAPI=0D -DebugAssertEnabled (=0D - VOID=0D - )=0D -{=0D - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_= ASSERT_ENABLED) !=3D 0);=0D -}=0D -=0D -=0D -/**=0D - Returns TRUE if DEBUG() macros are enabled.=0D -=0D - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit= of=0D - PcdDebugProperyMask is set. Otherwise FALSE is returned.=0D -=0D - @retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugP= roperyMask is set.=0D - @retval FALSE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugP= roperyMask is clear.=0D -=0D -**/=0D -BOOLEAN=0D -EFIAPI=0D -DebugPrintEnabled (=0D - VOID=0D - )=0D -{=0D - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_= PRINT_ENABLED) !=3D 0);=0D -}=0D -=0D -=0D -/**=0D - Returns TRUE if DEBUG_CODE() macros are enabled.=0D -=0D - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit = of=0D - PcdDebugProperyMask is set. Otherwise FALSE is returned.=0D -=0D - @retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugPr= operyMask is set.=0D - @retval FALSE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugPr= operyMask is clear.=0D -=0D -**/=0D -BOOLEAN=0D -EFIAPI=0D -DebugCodeEnabled (=0D - VOID=0D - )=0D -{=0D - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_= CODE_ENABLED) !=3D 0);=0D -}=0D -=0D -=0D -/**=0D - Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.=0D -=0D - This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bi= t of=0D - PcdDebugProperyMask is set. Otherwise FALSE is returned.=0D -=0D - @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebug= ProperyMask is set.=0D - @retval FALSE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebug= ProperyMask is clear.=0D -=0D -**/=0D -BOOLEAN=0D -EFIAPI=0D -DebugClearMemoryEnabled (=0D - VOID=0D - )=0D -{=0D - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_= MEMORY_ENABLED) !=3D 0);=0D -}=0D -=0D -/**=0D - Returns TRUE if any one of the bit is set both in ErrorLevel and PcdFixe= dDebugPrintErrorLevel.=0D -=0D - This function compares the bit mask of ErrorLevel and PcdFixedDebugPrint= ErrorLevel.=0D -=0D - @retval TRUE Current ErrorLevel is supported.=0D - @retval FALSE Current ErrorLevel is not supported.=0D -=0D -**/=0D -BOOLEAN=0D -EFIAPI=0D -DebugPrintLevelEnabled (=0D - IN CONST UINTN ErrorLevel=0D - )=0D -{=0D - return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) = !=3D 0);=0D -}=0D diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPo= rt.inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.i= nf index 8f721d249d..4078f0e361 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf @@ -39,6 +39,7 @@ [LibraryClasses] PcdLib=0D PrintLib=0D BaseLib=0D + DebugCommonLib=0D DebugPrintErrorLevelLib=0D =0D [Pcd]=0D 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=0D =0D LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.in= f=0D + DebugCommonLib|MdePkg/Library/BaseDebugCommonLib/BaseDebugCommonLib.inf= =0D DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf=0D =0D IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf=0D 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=0D =0D LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.in= f=0D + DebugCommonLib|MdePkg/Library/BaseDebugCommonLib/BaseDebugCommonLib.inf= =0D DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf=0D =0D IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf=0D 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=0D =0D LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.in= f=0D + DebugCommonLib|MdePkg/Library/BaseDebugCommonLib/BaseDebugCommonLib.inf= =0D DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf=0D =0D IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf=0D 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=0D =0D LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.in= f=0D + DebugCommonLib|MdePkg/Library/BaseDebugCommonLib/BaseDebugCommonLib.inf= =0D DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf=0D =0D IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf=0D --=20 2.24.2 (Apple Git-127)