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.web10.14603.1589211683961879175 for ; Mon, 11 May 2020 08:41:24 -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 029EECD46A for ; Mon, 11 May 2020 18:41:22 +0300 (MSK) From: "Vitaly Cheptsov" To: devel@edk2.groups.io Subject: [PATCH V4 03/27] MdePkg: Add support for DebugCommonLib Date: Mon, 11 May 2020 18:40:57 +0300 Message-Id: <20200511154121.3878-4-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 --- MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf = | 10 ++ MdePkg/Library/BaseDebugLibNull/DebugLib.c = | 98 ------------------- MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf = | 1 + MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c = | 98 ------------------- MdePkg/Library/BaseLib/BaseLib.inf = | 1 + MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c = | 98 ------------------- MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.i= nf | 1 + MdePkg/Library/UefiDebugLibConOut/DebugLib.c = | 98 ------------------- MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf = | 1 + MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c = | 99 -------------------- MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLibDebugPortProtocol= .inf | 1 + MdePkg/Library/UefiDebugLibStdErr/DebugLib.c = | 98 ------------------- MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf = | 1 + 13 files changed, 16 insertions(+), 589 deletions(-) diff --git a/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf b/MdePkg/= Library/BaseDebugLibNull/BaseDebugLibNull.inf index 81a63a5074..78a63de6cc 100644 --- a/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf +++ b/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf @@ -29,3 +29,13 @@ [Sources] [Packages]=0D MdePkg/MdePkg.dec=0D =0D +=0D +[LibraryClasses]=0D + DebugCommonLib=0D + PcdLib=0D +=0D +=0D +[Pcd]=0D + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES=0D + gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel ## CONSUMES=0D +=0D diff --git a/MdePkg/Library/BaseDebugLibNull/DebugLib.c b/MdePkg/Library/Ba= seDebugLibNull/DebugLib.c index 20c175ec6d..843be399aa 100644 --- a/MdePkg/Library/BaseDebugLibNull/DebugLib.c +++ b/MdePkg/Library/BaseDebugLibNull/DebugLib.c @@ -146,101 +146,3 @@ DebugClearMemory ( return Buffer;=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 FALSE;=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 FALSE;=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 FALSE;=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 FALSE;=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 FALSE;=0D -}=0D -=0D diff --git a/MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.i= nf b/MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf index 7504faee67..9230caf757 100644 --- a/MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf +++ b/MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf @@ -35,6 +35,7 @@ [LibraryClasses] PcdLib=0D PrintLib=0D BaseLib=0D + DebugCommonLib=0D DebugPrintErrorLevelLib=0D =0D [Pcd]=0D diff --git a/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c b/MdePkg/Libr= ary/BaseDebugLibSerialPort/DebugLib.c index aeeab85737..be801b536c 100644 --- a/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c +++ b/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c @@ -274,101 +274,3 @@ DebugClearMemory ( 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 -=0D diff --git a/MdePkg/Library/BaseLib/BaseLib.inf b/MdePkg/Library/BaseLib/Ba= seLib.inf index a57ae2da31..d2cb2340df 100644 --- a/MdePkg/Library/BaseLib/BaseLib.inf +++ b/MdePkg/Library/BaseLib/BaseLib.inf @@ -403,6 +403,7 @@ [Packages] [LibraryClasses]=0D PcdLib=0D DebugLib=0D + DebugCommonLib=0D BaseMemoryLib=0D =0D [Pcd]=0D diff --git a/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c b/MdePk= g/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c index cc79843b1c..b792c4abf6 100644 --- a/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c +++ b/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c @@ -335,101 +335,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/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLib= SerialPort.inf b/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebu= gLibSerialPort.inf index 31d169ad7c..dc994f0516 100644 --- a/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialP= ort.inf +++ b/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialP= ort.inf @@ -36,6 +36,7 @@ [Packages] [LibraryClasses]=0D BaseLib=0D BaseMemoryLib=0D + DebugCommonLib=0D DebugPrintErrorLevelLib=0D PcdLib=0D PrintLib=0D diff --git a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c b/MdePkg/Library/= UefiDebugLibConOut/DebugLib.c index 8ea38ea7cc..268ca5bfef 100644 --- a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c +++ b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c @@ -274,101 +274,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/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf b/Mde= Pkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf index 53bbc8ce3f..ac692e6d21 100644 --- a/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf +++ b/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf @@ -44,6 +44,7 @@ [LibraryClasses] BaseLib=0D PcdLib=0D PrintLib=0D + DebugCommonLib=0D DebugPrintErrorLevelLib=0D =0D [Pcd]=0D diff --git a/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c b/MdeP= kg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c index cd7e2abbd3..e3add1ec22 100644 --- a/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c +++ b/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c @@ -328,102 +328,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 -=0D diff --git a/MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLibDebug= PortProtocol.inf b/MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLi= bDebugPortProtocol.inf index e12a1025c6..5e96462a27 100644 --- a/MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLibDebugPortPro= tocol.inf +++ b/MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLibDebugPortPro= tocol.inf @@ -44,6 +44,7 @@ [LibraryClasses] BaseLib=0D PcdLib=0D PrintLib=0D + DebugCommonLib=0D DebugPrintErrorLevelLib=0D =0D [Protocols]=0D diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c b/MdePkg/Library/= UefiDebugLibStdErr/DebugLib.c index fcfdafede0..129c85587a 100644 --- a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c +++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c @@ -275,101 +275,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/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf b/Mde= Pkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf index 5ecb971a0a..3afd50d709 100644 --- a/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf +++ b/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf @@ -42,6 +42,7 @@ [LibraryClasses] BaseLib=0D PcdLib=0D PrintLib=0D + DebugCommonLib=0D DebugPrintErrorLevelLib=0D =0D [Pcd]=0D --=20 2.24.2 (Apple Git-127)