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.web12.14660.1589211685400903261 for ; Mon, 11 May 2020 08:41:25 -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 587E5CD46C for ; Mon, 11 May 2020 18:41:23 +0300 (MSK) From: "Vitaly Cheptsov" To: devel@edk2.groups.io Subject: [PATCH V4 05/27] ArmPkg: Add support for DebugCommonLib Date: Mon, 11 May 2020 18:40:59 +0300 Message-Id: <20200511154121.3878-6-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 --- ArmPkg/ArmPkg.dsc | 1 + ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc | 1 + ArmPkg/Library/SemiHostingDebugLib/DebugLib.c | 84 ----------= ---------- ArmPkg/Library/SemiHostingDebugLib/SemiHostingDebugLib.inf | 3 +- 4 files changed, 4 insertions(+), 85 deletions(-) diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc index 549a2d29ab..fe9691205e 100644 --- a/ArmPkg/ArmPkg.dsc +++ b/ArmPkg/ArmPkg.dsc @@ -35,6 +35,7 @@ [LibraryClasses.common] CacheMaintenanceLib|ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMainte= nanceLib.inf=0D CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf= =0D DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf=0D + DebugCommonLib|MdePkg/Library/BaseDebugCommonLib/BaseDebugCommonLib.inf= =0D HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf=0D diff --git a/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc b/ArmPkg/Dr= ivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc index 2818ce65db..51d7776eb3 100644 --- a/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc +++ b/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc @@ -30,6 +30,7 @@ [LibraryClasses] BaseLib|MdePkg/Library/BaseLib/BaseLib.inf=0D BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf=0D DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf=0D + DebugCommonLib|MdePkg/Library/BaseDebugCommonLib/BaseDebugCommonLib.inf= =0D DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf=0D DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/Def= aultExceptionHandlerLib.inf=0D DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf=0D diff --git a/ArmPkg/Library/SemiHostingDebugLib/DebugLib.c b/ArmPkg/Library= /SemiHostingDebugLib/DebugLib.c index ae762d8bea..58822db098 100644 --- a/ArmPkg/Library/SemiHostingDebugLib/DebugLib.c +++ b/ArmPkg/Library/SemiHostingDebugLib/DebugLib.c @@ -250,87 +250,3 @@ DebugClearMemory ( //=0D return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));=0D }=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 - PcdDebugPropertyMask is set. Otherwise FALSE is returned.=0D -=0D - @retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebug= PropertyMask is set.=0D - @retval FALSE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebug= PropertyMask 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 -=0D - Returns TRUE if DEBUG()macros are enabled.=0D -=0D - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit= of=0D - PcdDebugPropertyMask is set. Otherwise FALSE is returned.=0D -=0D - @retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugP= ropertyMask is set.=0D - @retval FALSE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugP= ropertyMask 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 -=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 - PcdDebugPropertyMask is set. Otherwise FALSE is returned.=0D -=0D - @retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugPr= opertyMask is set.=0D - @retval FALSE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugPr= opertyMask 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 -=0D - Returns TRUE if DEBUG_CLEAR_MEMORY()macro is enabled.=0D -=0D - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENAB= LED bit of=0D - PcdDebugPropertyMask is set. Otherwise FALSE is returned.=0D -=0D - @retval TRUE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of Pc= dDebugPropertyMask is set.=0D - @retval FALSE The DEBUG_PROPERTY_DEBUG_CLEAR_MEMORY_ENABLED bit of Pc= dDebugPropertyMask 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 diff --git a/ArmPkg/Library/SemiHostingDebugLib/SemiHostingDebugLib.inf b/A= rmPkg/Library/SemiHostingDebugLib/SemiHostingDebugLib.inf index 71bf20b1ca..ef1f97672a 100644 --- a/ArmPkg/Library/SemiHostingDebugLib/SemiHostingDebugLib.inf +++ b/ArmPkg/Library/SemiHostingDebugLib/SemiHostingDebugLib.inf @@ -33,7 +33,8 @@ [LibraryClasses] PcdLib=0D PrintLib=0D SemihostLib=0D - DebugLib=0D + DebugCommonLib=0D + DebugPrintErrorLevelLib=0D =0D [Pcd.common]=0D gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel=0D --=20 2.24.2 (Apple Git-127)