[edk2-devel] [Patch v2 1/2] UefiCpuPkg/RegisterCpuFeaturesLib: Remove debug message.

Dong, Eric posted 2 patches 6 years, 6 months ago
[edk2-devel] [Patch v2 1/2] UefiCpuPkg/RegisterCpuFeaturesLib: Remove debug message.
Posted by Dong, Eric 6 years, 6 months ago
This debug message may be called by BSP and APs. It may
caused ASSERT when APs call this debug code.

In order to avoid system boot assert, Remove this debug
message.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
---
 .../CpuFeaturesInitialize.c                   | 22 -------------------
 1 file changed, 22 deletions(-)

diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
index 4e97e863c7..fb0535edd6 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
@@ -9,7 +9,6 @@
 #include "RegisterCpuFeatures.h"
 
 CHAR16 *mDependTypeStr[]   = {L"None", L"Thread", L"Core", L"Package", L"Invalid" };
-CHAR16 *mRegisterTypeStr[] = {L"MSR", L"CR", L"MMIO", L"CACHE", L"SEMAP", L"INVALID" };
 
 /**
   Worker function to save PcdCpuFeaturesCapability.
@@ -772,7 +771,6 @@ ProgramProcessorRegister (
   UINT32                    PackageThreadsCount;
   UINT32                    CurrentThread;
   UINTN                     ProcessorIndex;
-  UINTN                     ThreadIndex;
   UINTN                     ValidThreadCount;
   UINT32                    *ValidCoreCountPerPackage;
 
@@ -785,26 +783,6 @@ ProgramProcessorRegister (
 
     RegisterTableEntry = &RegisterTableEntryHead[Index];
 
-    DEBUG_CODE_BEGIN ();
-      //
-      // Wait for the AP to release the MSR spin lock.
-      //
-      while (!AcquireSpinLockOrFail (&CpuFlags->ConsoleLogLock)) {
-        CpuPause ();
-      }
-      ThreadIndex = ApLocation->Package * CpuStatus->MaxCoreCount * CpuStatus->MaxThreadCount +
-              ApLocation->Core * CpuStatus->MaxThreadCount +
-              ApLocation->Thread;
-      DEBUG ((
-        DEBUG_INFO,
-        "Processor = %08lu, Index %08lu, Type = %s!\n",
-        (UINT64)ThreadIndex,
-        (UINT64)Index,
-        mRegisterTypeStr[MIN ((REGISTER_TYPE)RegisterTableEntry->RegisterType, InvalidReg)]
-        ));
-      ReleaseSpinLock (&CpuFlags->ConsoleLogLock);
-    DEBUG_CODE_END ();
-
     //
     // Check the type of specified register
     //
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44896): https://edk2.groups.io/g/devel/message/44896
Mute This Topic: https://groups.io/mt/32723169/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch v2 1/2] UefiCpuPkg/RegisterCpuFeaturesLib: Remove debug message.
Posted by rebecca@bsdio.com 6 years, 6 months ago
On 2019-08-05 00:43, Dong, Eric wrote:
> This debug message may be called by BSP and APs. It may
> caused ASSERT when APs call this debug code.
>
> In order to avoid system boot assert, Remove this debug
> message.
>
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>

I can't find it just now, but I seem to recall there's an associated BZ
ticket that we triaged a couple of weeks ago.


-- 
Rebecca Cran


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#45028): https://edk2.groups.io/g/devel/message/45028
Mute This Topic: https://groups.io/mt/32723169/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch v2 1/2] UefiCpuPkg/RegisterCpuFeaturesLib: Remove debug message.
Posted by Laszlo Ersek 6 years, 6 months ago
On 08/07/19 19:17, Rebecca Cran wrote:
> On 2019-08-05 00:43, Dong, Eric wrote:
>> This debug message may be called by BSP and APs. It may
>> caused ASSERT when APs call this debug code.
>>
>> In order to avoid system boot assert, Remove this debug
>> message.
>>
>> Signed-off-by: Eric Dong <eric.dong@intel.com>
>> Cc: Ray Ni <ray.ni@intel.com>
>> Cc: Laszlo Ersek <lersek@redhat.com>
> 
> I can't find it just now, but I seem to recall there's an associated BZ
> ticket that we triaged a couple of weeks ago.

Possibly <https://bugzilla.tianocore.org/show_bug.cgi?id=1984>?

Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#45215): https://edk2.groups.io/g/devel/message/45215
Mute This Topic: https://groups.io/mt/32723169/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-