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

Thanks/Ray

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Eric Dong
> Sent: Thursday, August 3, 2017 5:32 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu...@intel.com>; Kinney, Michael D
> <michael.d.kin...@intel.com>; Fan, Jeff <jeff....@intel.com>
> Subject: [edk2] [Patch 1/7] QuarkSocPkg MtrrLib: Enhance get mtrr mask
> logic.
> 
> In order to not use the deprecated macro, refine get mtrr mask value logic.
> 
> Cc: Jeff Fan <jeff....@intel.com>
> Cc: Ruiyu Ni <ruiyu...@intel.com>
> Cc: Michael D Kinney <michael.d.kin...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Eric Dong <eric.d...@intel.com>
> ---
>  QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.c
> b/QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.c
> index 58d8c0d..2760427 100644
> --- a/QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.c
> +++ b/QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.c
> @@ -1036,13 +1036,12 @@ MtrrLibInitializeMtrrMask (
>      AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL);
> 
>      PhysicalAddressBits = (UINT8) RegEax;
> -
> -    *MtrrValidBitsMask    = LShiftU64 (1, PhysicalAddressBits) - 1;
> -    *MtrrValidAddressMask = *MtrrValidBitsMask & 0xfffffffffffff000ULL;
>    } else {
> -    *MtrrValidBitsMask    = MTRR_LIB_MSR_VALID_MASK;
> -    *MtrrValidAddressMask = MTRR_LIB_CACHE_VALID_ADDRESS;
> +    PhysicalAddressBits = 36;
>    }
> +
> +  *MtrrValidBitsMask    = LShiftU64 (1, PhysicalAddressBits) - 1;
> +  *MtrrValidAddressMask = *MtrrValidBitsMask & 0xfffffffffffff000ULL;
>  }
> 
> 
> --
> 2.7.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to