diff options
author | Eric Dong <eric.dong@intel.com> | 2018-11-08 09:00:10 +0800 |
---|---|---|
committer | Eric Dong <eric.dong@intel.com> | 2019-01-14 10:29:26 +0800 |
commit | a6416d91c32e785259a8c07e1e2b767b754965b5 (patch) | |
tree | 290b36e167c9aff8ba79904ebea02fe1ab8ac406 /UefiCpuPkg | |
parent | 8daa4278e80c70e6caabc525cd122744488253f5 (diff) | |
download | edk2-a6416d91c32e785259a8c07e1e2b767b754965b5.zip edk2-a6416d91c32e785259a8c07e1e2b767b754965b5.tar.gz edk2-a6416d91c32e785259a8c07e1e2b767b754965b5.tar.bz2 |
UefiCpuPkg/RegisterCpuFeaturesLib: Enhance debug message.
Enhance debug message format to let them easy to read.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1411
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c index 0a74d44..624ddee 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)]
|