From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 0B14921CE7417 for ; Sun, 6 Aug 2017 23:26:27 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Aug 2017 23:28:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,336,1498546800"; d="scan'208";a="136423984" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga005.fm.intel.com with ESMTP; 06 Aug 2017 23:28:42 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 6 Aug 2017 23:28:42 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 6 Aug 2017 23:28:41 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.151]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.197]) with mapi id 14.03.0319.002; Mon, 7 Aug 2017 14:28:40 +0800 From: "Ni, Ruiyu" To: "Dong, Eric" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Fan, Jeff" Thread-Topic: [edk2] [Patch 1/7] QuarkSocPkg MtrrLib: Enhance get mtrr mask logic. Thread-Index: AQHTDDtx42c/qll6t0a0yWX3G/G+waJ4dCSg Date: Mon, 7 Aug 2017 06:28:39 +0000 Deferred-Delivery: Mon, 7 Aug 2017 06:28:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B9CE264@SHSMSX104.ccr.corp.intel.com> References: <1501752726-14072-1-git-send-email-eric.dong@intel.com> <1501752726-14072-2-git-send-email-eric.dong@intel.com> In-Reply-To: <1501752726-14072-2-git-send-email-eric.dong@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 1/7] QuarkSocPkg MtrrLib: Enhance get mtrr mask logic. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Aug 2017 06:26:27 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Thanks/Ray > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@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 ; Kinney, Michael D > ; Fan, Jeff > Subject: [edk2] [Patch 1/7] QuarkSocPkg MtrrLib: Enhance get mtrr mask > logic. >=20 > In order to not use the deprecated macro, refine get mtrr mask value logi= c. >=20 > Cc: Jeff Fan > Cc: Ruiyu Ni > Cc: Michael D Kinney > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Eric Dong > --- > QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) >=20 > 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); >=20 > PhysicalAddressBits =3D (UINT8) RegEax; > - > - *MtrrValidBitsMask =3D LShiftU64 (1, PhysicalAddressBits) - 1; > - *MtrrValidAddressMask =3D *MtrrValidBitsMask & 0xfffffffffffff000ULL= ; > } else { > - *MtrrValidBitsMask =3D MTRR_LIB_MSR_VALID_MASK; > - *MtrrValidAddressMask =3D MTRR_LIB_CACHE_VALID_ADDRESS; > + PhysicalAddressBits =3D 36; > } > + > + *MtrrValidBitsMask =3D LShiftU64 (1, PhysicalAddressBits) - 1; > + *MtrrValidAddressMask =3D *MtrrValidBitsMask & 0xfffffffffffff000ULL; > } >=20 >=20 > -- > 2.7.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel