public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@Intel.com>
To: Eric Dong <eric.dong@intel.com>, edk2-devel@lists.01.org
Subject: Re: [Patch v2 1/2] UefiCpuPkg/RegisterCpuFeaturesLib: Enhance debug message.
Date: Mon, 7 Jan 2019 15:53:54 +0800	[thread overview]
Message-ID: <ff7a68bc-805b-12a0-d7dc-c2d8a734b78d@Intel.com> (raw)
In-Reply-To: <20190107010555.23264-2-eric.dong@intel.com>

On 1/7/2019 9:05 AM, Eric Dong wrote:
> Enhance debug message format to let them easy to read.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> ---
>   .../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)]
> 
Reviewed-by: Ray Ni <ray.ni@intel.com>

-- 
Thanks,
Ray


  reply	other threads:[~2019-01-07  7:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07  1:05 [Patch v2 0/2] Avoid AP calls PeiServices table Eric Dong
2019-01-07  1:05 ` [Patch v2 1/2] UefiCpuPkg/RegisterCpuFeaturesLib: Enhance debug message Eric Dong
2019-01-07  7:53   ` Ni, Ruiyu [this message]
2019-01-07  1:05 ` [Patch 2/2] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService Eric Dong
     [not found]   ` <734D49CCEBEEF84792F5B80ED585239D5BFA53EB@SHSMSX103.ccr.corp.intel.com>
2019-01-07 19:17     ` Laszlo Ersek
2019-01-08  5:32       ` Dong, Eric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff7a68bc-805b-12a0-d7dc-c2d8a734b78d@Intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox