From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=eric.dong@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AA813211B1114 for ; Sun, 6 Jan 2019 17:05:59 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jan 2019 17:05:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,449,1539673200"; d="scan'208";a="123802598" Received: from ydong10-win10.ccr.corp.intel.com ([10.239.9.125]) by orsmga002.jf.intel.com with ESMTP; 06 Jan 2019 17:05:58 -0800 From: Eric Dong To: edk2-devel@lists.01.org Cc: Ruiyu Ni Date: Mon, 7 Jan 2019 09:05:54 +0800 Message-Id: <20190107010555.23264-2-eric.dong@intel.com> X-Mailer: git-send-email 2.15.0.windows.1 In-Reply-To: <20190107010555.23264-1-eric.dong@intel.com> References: <20190107010555.23264-1-eric.dong@intel.com> Subject: [Patch v2 1/2] UefiCpuPkg/RegisterCpuFeaturesLib: Enhance debug message. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 01:05:59 -0000 Enhance debug message format to let them easy to read. Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong --- .../RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c index 0a74d448c8..624ddee055 100644 --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c @@ -473,8 +473,9 @@ DumpRegisterTableOnProcessor ( case Msr: DEBUG (( DebugPrintErrorLevel, - "Processor: %d: MSR: %x, Bit Start: %d, Bit Length: %d, Value: %lx\r\n", + "Processor: %04d: Index %04d, MSR : %08x, Bit Start: %02d, Bit Length: %02d, Value: %016lx\r\n", ProcessorNumber, + FeatureIndex, RegisterTableEntry->Index, RegisterTableEntry->ValidBitStart, RegisterTableEntry->ValidBitLength, @@ -484,8 +485,9 @@ DumpRegisterTableOnProcessor ( case ControlRegister: DEBUG (( DebugPrintErrorLevel, - "Processor: %d: CR: %x, Bit Start: %d, Bit Length: %d, Value: %lx\r\n", + "Processor: %04d: Index %04d, CR : %08x, Bit Start: %02d, Bit Length: %02d, Value: %016lx\r\n", ProcessorNumber, + FeatureIndex, RegisterTableEntry->Index, RegisterTableEntry->ValidBitStart, RegisterTableEntry->ValidBitLength, @@ -495,8 +497,9 @@ DumpRegisterTableOnProcessor ( case MemoryMapped: DEBUG (( DebugPrintErrorLevel, - "Processor: %d: MMIO: %lx, Bit Start: %d, Bit Length: %d, Value: %lx\r\n", + "Processor: %04d: Index %04d, MMIO : %08lx, Bit Start: %02d, Bit Length: %02d, Value: %016lx\r\n", ProcessorNumber, + FeatureIndex, RegisterTableEntry->Index | LShiftU64 (RegisterTableEntry->HighIndex, 32), RegisterTableEntry->ValidBitStart, RegisterTableEntry->ValidBitLength, @@ -506,8 +509,9 @@ DumpRegisterTableOnProcessor ( case CacheControl: DEBUG (( DebugPrintErrorLevel, - "Processor: %d: CACHE: %x, Bit Start: %d, Bit Length: %d, Value: %lx\r\n", + "Processor: %04d: Index %04d, CACHE: %08lx, Bit Start: %02d, Bit Length: %02d, Value: %016lx\r\n", ProcessorNumber, + FeatureIndex, RegisterTableEntry->Index, RegisterTableEntry->ValidBitStart, RegisterTableEntry->ValidBitLength, @@ -517,8 +521,9 @@ DumpRegisterTableOnProcessor ( case Semaphore: DEBUG (( DebugPrintErrorLevel, - "Processor: %d: Semaphore: Scope Value: %s\r\n", + "Processor: %04d: Index %04d, SEMAP: %s\r\n", ProcessorNumber, + FeatureIndex, mDependTypeStr[MIN ((UINT32)RegisterTableEntry->Value, InvalidDepType)] )); break; @@ -833,7 +838,7 @@ ProgramProcessorRegister ( ApLocation->Thread; DEBUG (( DEBUG_INFO, - "Processor = %lu, Entry Index %lu, Type = %s!\n", + "Processor = %08lu, Index %08lu, Type = %s!\n", (UINT64)ThreadIndex, (UINT64)Index, mRegisterTypeStr[MIN ((REGISTER_TYPE)RegisterTableEntry->RegisterType, InvalidReg)] -- 2.15.0.windows.1