From nobody Fri Dec 27 18:24:59 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 15017527457791006.8398357502908; Thu, 3 Aug 2017 02:32:25 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 445D921AEB0BD; Thu, 3 Aug 2017 02:30:04 -0700 (PDT) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 D985C21AEB0B0 for ; Thu, 3 Aug 2017 02:30:02 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Aug 2017 02:32:14 -0700 Received: from ydong10-win10.ccr.corp.intel.com ([10.239.158.51]) by orsmga002.jf.intel.com with ESMTP; 03 Aug 2017 02:32:13 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,315,1498546800"; d="scan'208";a="119098261" From: Eric Dong To: edk2-devel@lists.01.org Date: Thu, 3 Aug 2017 17:32:04 +0800 Message-Id: <1501752726-14072-6-git-send-email-eric.dong@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1501752726-14072-1-git-send-email-eric.dong@intel.com> References: <1501752726-14072-1-git-send-email-eric.dong@intel.com> Subject: [edk2] [Patch 5/7] Vlv2TbltDevicePkg: Remove reference deprecated macro. 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: , Cc: Ruiyu Ni , Jeff Fan , David Wei MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Jeff Fan Cc: Ruiyu Ni Cc: David Wei Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong --- Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c b/Vlv2TbltDevic= ePkg/PlatformInitPei/MemoryPeim.c index 5a18a3f..53d5802 100644 --- a/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c +++ b/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c @@ -31,6 +31,8 @@ Abstract: #define PEI_MIN_MEMORY_SIZE (6 * 0x800000) #define PEI_RECOVERY_MIN_MEMORY_SIZE (6 * 0x800000) =20 +#define CACHE_MTRR_ENABLED 0x800 + // // This is the memory needed for PEI to start up DXE. // @@ -197,7 +199,7 @@ SetPeiCacheMode ( // Index =3D 0; MtrrSetting.Variables.Mtrr[0].Base =3D (FixedPcdGet32 (PcdFlashAreaBaseA= ddress) | CacheWriteProtected); - MtrrSetting.Variables.Mtrr[0].Mask =3D ((~((UINT64)(FixedPcdGet32 (PcdFl= ashAreaSize) - 1))) & ValidMtrrAddressMask) | MTRR_LIB_CACHE_MTRR_ENABLED; + MtrrSetting.Variables.Mtrr[0].Mask =3D ((~((UINT64)(FixedPcdGet32 (PcdFl= ashAreaSize) - 1))) & ValidMtrrAddressMask) | CACHE_MTRR_ENABLED; Index ++; =20 MemOverflow =3D0; @@ -205,7 +207,7 @@ SetPeiCacheMode ( MtrrSetting.Variables.Mtrr[Index].Base =3D (MemOverflow & ValidMtrrAdd= ressMask) | CacheWriteBack; MemoryLength =3D MaxMemoryLength - MemOverflow; MemoryLength =3D GetPowerOfTwo64 (MemoryLength); - MtrrSetting.Variables.Mtrr[Index].Mask =3D ((~(MemoryLength - 1)) & Va= lidMtrrAddressMask) | MTRR_LIB_CACHE_MTRR_ENABLED; + MtrrSetting.Variables.Mtrr[Index].Mask =3D ((~(MemoryLength - 1)) & Va= lidMtrrAddressMask) | CACHE_MTRR_ENABLED; =20 MemOverflow +=3D MemoryLength; Index++; @@ -217,7 +219,7 @@ SetPeiCacheMode ( MemoryLengthUc =3D GetPowerOfTwo64 (MaxMemoryLength - MemoryLength); =20 MtrrSetting.Variables.Mtrr[Index].Base =3D ((MaxMemoryLength - MemoryL= engthUc) & ValidMtrrAddressMask) | CacheUncacheable; - MtrrSetting.Variables.Mtrr[Index].Mask=3D ((~(MemoryLengthUc - 1)) &= ValidMtrrAddressMask) | MTRR_LIB_CACHE_MTRR_ENABLED; + MtrrSetting.Variables.Mtrr[Index].Mask=3D ((~(MemoryLengthUc - 1)) &= ValidMtrrAddressMask) | CACHE_MTRR_ENABLED; MaxMemoryLength -=3D MemoryLengthUc; Index++; } @@ -232,7 +234,7 @@ SetPeiCacheMode ( MemoryLength =3D MemOverflow; } =20 - MtrrSetting.Variables.Mtrr[Index].Mask =3D ((~(MemoryLength - 1)) & Va= lidMtrrAddressMask) | MTRR_LIB_CACHE_MTRR_ENABLED; + MtrrSetting.Variables.Mtrr[Index].Mask =3D ((~(MemoryLength - 1)) & Va= lidMtrrAddressMask) | CACHE_MTRR_ENABLED; =20 MemOverflow +=3D MemoryLength; HighMemoryLength -=3D MemoryLength; --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel