[edk2-devel] [Patch 1/2] UefiCpuPkg/RegisterCpuFeaturesLib: Default avoid print.

Dong, Eric eric.dong at intel.com
Wed Jul 31 07:35:01 UTC 2019


REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1984

Current debug message brings much restriction for the platform
which use this driver.

For PEI and DXE phase, platform mush link base DebugLib (without
using any pei/dxe services, even for its dependent libraries).

This patch default disable this debug message, only open it when
need to debug the related code.

Signed-off-by: Eric Dong <eric.dong at intel.com>
Cc: Ray Ni <ray.ni at intel.com>
Cc: Laszlo Ersek <lersek at redhat.com>
---
 .../Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
index 4e97e863c7..48fbd58c39 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
@@ -9,7 +9,9 @@
 #include "RegisterCpuFeatures.h"
 
 CHAR16 *mDependTypeStr[]   = {L"None", L"Thread", L"Core", L"Package", L"Invalid" };
+GLOBAL_REMOVE_IF_UNREFERENCED
 CHAR16 *mRegisterTypeStr[] = {L"MSR", L"CR", L"MMIO", L"CACHE", L"SEMAP", L"INVALID" };
+#define DEBUG_CPU_MSG         0
 
 /**
   Worker function to save PcdCpuFeaturesCapability.
@@ -796,7 +798,7 @@ ProgramProcessorRegister (
               ApLocation->Core * CpuStatus->MaxThreadCount +
               ApLocation->Thread;
       DEBUG ((
-        DEBUG_INFO,
+        DEBUG_CPU_MSG,
         "Processor = %08lu, Index %08lu, Type = %s!\n",
         (UINT64)ThreadIndex,
         (UINT64)Index,
-- 
2.21.0.windows.1


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

View/Reply Online (#44671): https://edk2.groups.io/g/devel/message/44671
Mute This Topic: https://groups.io/mt/32664466/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list