public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@intel.com>
To: "Dong, Eric" <eric.dong@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Fan, Jeff" <jeff.fan@intel.com>
Subject: Re: [Patch 3/7] UefiCpuPkg CpuDxe: Enhance get mtrr mask logic.
Date: Mon, 7 Aug 2017 06:29:09 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B9CE286@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1501752726-14072-4-git-send-email-eric.dong@intel.com>

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

Thanks/Ray

> -----Original Message-----
> From: Dong, Eric
> Sent: Thursday, August 3, 2017 5:32 PM
> To: edk2-devel@lists.01.org
> Cc: Fan, Jeff <jeff.fan@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
> Subject: [Patch 3/7] UefiCpuPkg CpuDxe: Enhance get mtrr mask logic.
> 
> In order to not use the deprecated macro, refine get mtrr mask value logic.
> 
> Cc: Jeff Fan <jeff.fan@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> ---
>  UefiCpuPkg/CpuDxe/CpuDxe.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c
> index 8680656..6218670 100644
> --- a/UefiCpuPkg/CpuDxe/CpuDxe.c
> +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c
> @@ -25,8 +25,8 @@
>  BOOLEAN                   InterruptState = FALSE;
>  EFI_HANDLE                mCpuHandle = NULL;
>  BOOLEAN                   mIsFlushingGCD;
> -UINT64                    mValidMtrrAddressMask =
> MTRR_LIB_CACHE_VALID_ADDRESS;
> -UINT64                    mValidMtrrBitsMask    = MTRR_LIB_MSR_VALID_MASK;
> +UINT64                    mValidMtrrAddressMask;
> +UINT64                    mValidMtrrBitsMask;
>  UINT64                    mTimerPeriod = 0;
> 
>  FIXED_MTRR    mFixedMtrrTable[] = {
> @@ -510,13 +510,12 @@ InitializeMtrrMask (
>      AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL);
> 
>      PhysicalAddressBits = (UINT8) RegEax;
> -
> -    mValidMtrrBitsMask    = LShiftU64 (1, PhysicalAddressBits) - 1;
> -    mValidMtrrAddressMask = mValidMtrrBitsMask & 0xfffffffffffff000ULL;
>    } else {
> -    mValidMtrrBitsMask    = MTRR_LIB_MSR_VALID_MASK;
> -    mValidMtrrAddressMask = MTRR_LIB_CACHE_VALID_ADDRESS;
> +    PhysicalAddressBits = 36;
>    }
> +
> +  mValidMtrrBitsMask    = LShiftU64 (1, PhysicalAddressBits) - 1;
> +  mValidMtrrAddressMask = mValidMtrrBitsMask & 0xfffffffffffff000ULL;
>  }
> 
>  /**
> --
> 2.7.0.windows.1



  reply	other threads:[~2017-08-07  6:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03  9:31 [Patch 0/7] Remove deprecated macro Eric Dong
2017-08-03  9:32 ` [Patch 1/7] QuarkSocPkg MtrrLib: Enhance get mtrr mask logic Eric Dong
2017-08-07  6:28   ` Ni, Ruiyu
2017-08-03  9:32 ` [Patch 2/7] Vlv2TbltDevicePkg: " Eric Dong
2017-08-07  6:29   ` Ni, Ruiyu
2017-08-03  9:32 ` [Patch 3/7] UefiCpuPkg CpuDxe: " Eric Dong
2017-08-07  6:29   ` Ni, Ruiyu [this message]
2017-08-03  9:32 ` [Patch 4/7] QuarkSocPkg MtrrLib: Remove reference deprecated macro Eric Dong
2017-08-03 10:21   ` Ni, Ruiyu
2017-08-04  4:52     ` Dong, Eric
2017-08-04  6:53       ` Ni, Ruiyu
2017-08-07  6:31   ` Ni, Ruiyu
2017-08-03  9:32 ` [Patch 5/7] Vlv2TbltDevicePkg: " Eric Dong
2017-08-03  9:32 ` [Patch 6/7] UefiCpuPkg CpuDxe: " Eric Dong
2017-08-07  6:30   ` Ni, Ruiyu
2017-08-03  9:32 ` [Patch 7/7] UefiCpuPkg MtrrLib: Remove deprecated micro Eric Dong
2017-08-07  6:30   ` Ni, Ruiyu
2017-08-24 11:07   ` Laszlo Ersek

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=734D49CCEBEEF84792F5B80ED585239D5B9CE286@SHSMSX104.ccr.corp.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