From nobody Tue Apr 30 19:19: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 1501752735173396.79039049507753; Thu, 3 Aug 2017 02:32:15 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4C0CC21AEB0A6; Thu, 3 Aug 2017 02:29:59 -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 5A1B62095DB81 for ; Thu, 3 Aug 2017 02:29:58 -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:09 -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:08 -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="119098227" From: Eric Dong To: edk2-devel@lists.01.org Date: Thu, 3 Aug 2017 17:32:00 +0800 Message-Id: <1501752726-14072-2-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 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: , Cc: Ruiyu Ni , Michael D Kinney , Jeff Fan 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" In order to not use the deprecated macro, refine get mtrr mask value logic. Cc: Jeff Fan Cc: Ruiyu Ni Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Ruiyu Ni --- QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.c b/Quar= kSocPkg/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 --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Tue Apr 30 19:19: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 1501752737703871.9414041616142; Thu, 3 Aug 2017 02:32:17 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 84B032095DB8D; Thu, 3 Aug 2017 02:30:00 -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 9B10F21AEB0AE for ; Thu, 3 Aug 2017 02:29:59 -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:10 -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:09 -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="119098236" From: Eric Dong To: edk2-devel@lists.01.org Date: Thu, 3 Aug 2017 17:32:01 +0800 Message-Id: <1501752726-14072-3-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 2/7] Vlv2TbltDevicePkg: 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: , 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" In order to not use the deprecated macro, refine get mtrr mask value logic. Cc: Jeff Fan Cc: Ruiyu Ni Cc: David Wei Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Ruiyu Ni --- Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c | 45 ++++++++++++++++++++++= ---- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c b/Vlv2TbltDevic= ePkg/PlatformInitPei/MemoryPeim.c index 99bdeb1..5a18a3f 100644 --- a/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c +++ b/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c @@ -70,6 +70,34 @@ GetMemorySize ( ); =20 =20 +/** + Initializes the valid address mask for MTRRs. + + This function initializes the valid bits mask and valid address mask for= MTRRs. + +**/ +UINT64 +InitializeAddressMtrrMask ( + VOID + ) +{ + UINT32 RegEax; + UINT8 PhysicalAddressBits;=20 + UINT64 ValidMtrrBitsMask; + + AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL); + + if (RegEax >=3D 0x80000008) { + AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL); + + PhysicalAddressBits =3D (UINT8) RegEax; + } else { + PhysicalAddressBits =3D 36; + } + + ValidMtrrBitsMask =3D LShiftU64 (1, PhysicalAddressBits) - 1; + return (ValidMtrrBitsMask & 0xfffffffffffff000ULL); +} =20 EFI_STATUS EFIAPI @@ -89,6 +117,7 @@ SetPeiCacheMode ( UINT64 HighMemoryLength; UINT8 Index; MTRR_SETTINGS MtrrSetting; + UINT64 ValidMtrrAddressMask; =20 // // Load Cache PPI @@ -124,6 +153,8 @@ SetPeiCacheMode ( &BootMode ); =20 + ValidMtrrAddressMask =3D InitializeAddressMtrrMask (); + // // Determine memory usage // @@ -166,15 +197,15 @@ 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))) & MTRR_LIB_CACHE_VALID_ADDRESS) | MTRR_LIB_CACHE_MTRR_E= NABLED; + MtrrSetting.Variables.Mtrr[0].Mask =3D ((~((UINT64)(FixedPcdGet32 (PcdFl= ashAreaSize) - 1))) & ValidMtrrAddressMask) | MTRR_LIB_CACHE_MTRR_ENABLED; Index ++; =20 MemOverflow =3D0; while (MaxMemoryLength > MemOverflow){ - MtrrSetting.Variables.Mtrr[Index].Base =3D (MemOverflow & MTRR_LIB_CAC= HE_VALID_ADDRESS) | CacheWriteBack; + 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)) & MT= RR_LIB_CACHE_VALID_ADDRESS) | MTRR_LIB_CACHE_MTRR_ENABLED; + MtrrSetting.Variables.Mtrr[Index].Mask =3D ((~(MemoryLength - 1)) & Va= lidMtrrAddressMask) | MTRR_LIB_CACHE_MTRR_ENABLED; =20 MemOverflow +=3D MemoryLength; Index++; @@ -185,15 +216,15 @@ SetPeiCacheMode ( while (MaxMemoryLength !=3D MemoryLength) { MemoryLengthUc =3D GetPowerOfTwo64 (MaxMemoryLength - MemoryLength); =20 - MtrrSetting.Variables.Mtrr[Index].Base =3D ((MaxMemoryLength - MemoryL= engthUc) & MTRR_LIB_CACHE_VALID_ADDRESS) | CacheUncacheable; - MtrrSetting.Variables.Mtrr[Index].Mask=3D ((~(MemoryLengthUc - 1)) &= MTRR_LIB_CACHE_VALID_ADDRESS) | MTRR_LIB_CACHE_MTRR_ENABLED; + 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; MaxMemoryLength -=3D MemoryLengthUc; Index++; } =20 MemOverflow =3D0x100000000; while (HighMemoryLength > 0) { - MtrrSetting.Variables.Mtrr[Index].Base =3D (MemOverflow & MTRR_LIB_CAC= HE_VALID_ADDRESS) | CacheWriteBack; + MtrrSetting.Variables.Mtrr[Index].Base =3D (MemOverflow & ValidMtrrAdd= ressMask) | CacheWriteBack; MemoryLength =3D HighMemoryLength; MemoryLength =3D GetPowerOfTwo64 (MemoryLength); =20 @@ -201,7 +232,7 @@ SetPeiCacheMode ( MemoryLength =3D MemOverflow; } =20 - MtrrSetting.Variables.Mtrr[Index].Mask =3D ((~(MemoryLength - 1)) & MT= RR_LIB_CACHE_VALID_ADDRESS) | MTRR_LIB_CACHE_MTRR_ENABLED; + MtrrSetting.Variables.Mtrr[Index].Mask =3D ((~(MemoryLength - 1)) & Va= lidMtrrAddressMask) | MTRR_LIB_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 From nobody Tue Apr 30 19:19: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 1501752740168713.8991588131819; Thu, 3 Aug 2017 02:32:20 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C20862095DB90; Thu, 3 Aug 2017 02:30:01 -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 92F7A21AEB0B0 for ; Thu, 3 Aug 2017 02:30:00 -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:11 -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:10 -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="119098248" From: Eric Dong To: edk2-devel@lists.01.org Date: Thu, 3 Aug 2017 17:32:02 +0800 Message-Id: <1501752726-14072-4-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 3/7] UefiCpuPkg CpuDxe: 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: , Cc: Ruiyu Ni , Jeff Fan 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" In order to not use the deprecated macro, refine get mtrr mask value logic. Cc: Jeff Fan Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Ruiyu Ni --- 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 =3D FALSE; EFI_HANDLE mCpuHandle =3D NULL; BOOLEAN mIsFlushingGCD; -UINT64 mValidMtrrAddressMask =3D MTRR_LIB_CACHE_VALID_A= DDRESS; -UINT64 mValidMtrrBitsMask =3D MTRR_LIB_MSR_VALID_MAS= K; +UINT64 mValidMtrrAddressMask; +UINT64 mValidMtrrBitsMask; UINT64 mTimerPeriod =3D 0; =20 FIXED_MTRR mFixedMtrrTable[] =3D { @@ -510,13 +510,12 @@ InitializeMtrrMask ( AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL); =20 PhysicalAddressBits =3D (UINT8) RegEax; - - mValidMtrrBitsMask =3D LShiftU64 (1, PhysicalAddressBits) - 1; - mValidMtrrAddressMask =3D mValidMtrrBitsMask & 0xfffffffffffff000ULL; } else { - mValidMtrrBitsMask =3D MTRR_LIB_MSR_VALID_MASK; - mValidMtrrAddressMask =3D MTRR_LIB_CACHE_VALID_ADDRESS; + PhysicalAddressBits =3D 36; } + + mValidMtrrBitsMask =3D LShiftU64 (1, PhysicalAddressBits) - 1; + mValidMtrrAddressMask =3D mValidMtrrBitsMask & 0xfffffffffffff000ULL; } =20 /** --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Tue Apr 30 19:19: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 1501752744621577.5889386139276; Thu, 3 Aug 2017 02:32:24 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0B26C21AEB0B0; 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 D0AB121AEB0B0 for ; Thu, 3 Aug 2017 02:30:01 -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:13 -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:11 -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="119098256" From: Eric Dong To: edk2-devel@lists.01.org Date: Thu, 3 Aug 2017 17:32:03 +0800 Message-Id: <1501752726-14072-5-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 4/7] QuarkSocPkg MtrrLib: 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 , Michael D Kinney , Jeff Fan 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: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Ruiyu Ni --- .../QuarkNorthCluster/Library/MtrrLib/MtrrLib.c | 26 +++++++++++++-----= ---- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.c b/Quar= kSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.c index 2760427..fe00b37 100644 --- a/QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.c +++ b/QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.c @@ -23,6 +23,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHE= R EXPRESS OR IMPLIED. =20 #define QUARK_SOC_CPUID_FAMILY_MODEL_STEPPING 0x590 =20 +#define CACHE_MTRR_ENABLED 0x800 +#define CACHE_FIXED_MTRR_ENABLED 0x400 +#define IA32_MTRR_CAP_VCNT_MASK 0xFF + // // Context to save and restore when MTRRs are programmed // @@ -121,7 +125,7 @@ GetVariableMtrrCountWorker ( { UINT32 VariableMtrrCount; =20 - VariableMtrrCount =3D (UINT32)(MtrrRegisterRead (QUARK_NC_HOST_BRIDGE_IA= 32_MTRR_CAP) & MTRR_LIB_IA32_MTRR_CAP_VCNT_MASK); + VariableMtrrCount =3D (UINT32)(MtrrRegisterRead (QUARK_NC_HOST_BRIDGE_IA= 32_MTRR_CAP) & IA32_MTRR_CAP_VCNT_MASK); ASSERT (VariableMtrrCount <=3D MTRR_NUMBER_OF_VARIABLE_MTRR); return VariableMtrrCount; } @@ -558,7 +562,7 @@ MtrrGetMemoryAttributeInVariableMtrrWorker ( =20 ZeroMem (VariableMtrr, sizeof (VARIABLE_MTRR) * MTRR_NUMBER_OF_VARIABLE_= MTRR); for (Index =3D 0, UsedMtrr =3D 0; Index < FirmwareVariableMtrrCount; Ind= ex++) { - if ((VariableSettings->Mtrr[Index].Mask & MTRR_LIB_CACHE_MTRR_ENABLED)= !=3D 0) { + if ((VariableSettings->Mtrr[Index].Mask & CACHE_MTRR_ENABLED) !=3D 0) { VariableMtrr[Index].Msr =3D (UINT32)Index; VariableMtrr[Index].BaseAddress =3D (VariableSettings->Mtrr[Index].B= ase & MtrrValidAddressMask); VariableMtrr[Index].Length =3D ((~(VariableSettings->Mtrr[Index= ].Mask & MtrrValidAddressMask)) & MtrrValidBitsMask) + 1; @@ -969,7 +973,7 @@ ProgramVariableMtrr ( // MTRR Physical Mask // TempQword =3D ~(Length - 1); - VariableSettings->Mtrr[MtrrNumber].Mask =3D (TempQword & MtrrValidAddres= sMask) | MTRR_LIB_CACHE_MTRR_ENABLED; + VariableSettings->Mtrr[MtrrNumber].Mask =3D (TempQword & MtrrValidAddres= sMask) | CACHE_MTRR_ENABLED; } =20 =20 @@ -1157,7 +1161,7 @@ MtrrGetMemoryAttributeByAddressWorker ( } MtrrType =3D MTRR_CACHE_INVALID_TYPE; =20 - if ((TempQword & MTRR_LIB_CACHE_MTRR_ENABLED) =3D=3D 0) { + if ((TempQword & CACHE_MTRR_ENABLED) =3D=3D 0) { return CacheUncacheable; } =20 @@ -1165,7 +1169,7 @@ MtrrGetMemoryAttributeByAddressWorker ( // If address is less than 1M, then try to go through the fixed MTRR // if (Address < BASE_1MB) { - if ((TempQword & MTRR_LIB_CACHE_FIXED_MTRR_ENABLED) !=3D 0) { + if ((TempQword & CACHE_FIXED_MTRR_ENABLED) !=3D 0) { // // Go through the fixed MTRR // @@ -1539,7 +1543,7 @@ MtrrSetMemoryAttributeWorker ( } if (MtrrSetting !=3D NULL) { MtrrSetting->Fixed.Mtrr[MsrNum] =3D (MtrrSetting->Fixed.Mtrr[MsrNu= m] & ~ClearMask) | OrMask; - MtrrSetting->MtrrDefType |=3D MTRR_LIB_CACHE_FIXED_MTRR_ENABLED; + MtrrSetting->MtrrDefType |=3D CACHE_FIXED_MTRR_ENABLED; } else { if (!FixedSettingsValid[MsrNum]) { WorkingFixedSettings.Mtrr[MsrNum] =3D MtrrRegisterRead (mMtrrLib= FixedMtrrTable[MsrNum].Msr); @@ -1654,7 +1658,7 @@ MtrrSetMemoryAttributeWorker ( // Find first unused MTRR // for (MsrNum =3D 0; MsrNum < VariableMtrrCount; MsrNum++) { - if ((VariableSettings->Mtrr[MsrNum].Mask & MTRR_LIB_CACHE_MTRR_ENABLED= ) =3D=3D 0) { + if ((VariableSettings->Mtrr[MsrNum].Mask & CACHE_MTRR_ENABLED) =3D=3D = 0) { break; } } @@ -1674,7 +1678,7 @@ MtrrSetMemoryAttributeWorker ( // Find unused MTRR // for (; MsrNum < VariableMtrrCount; MsrNum++) { - if ((VariableSettings->Mtrr[MsrNum].Mask & MTRR_LIB_CACHE_MTRR_ENA= BLED) =3D=3D 0) { + if ((VariableSettings->Mtrr[MsrNum].Mask & CACHE_MTRR_ENABLED) =3D= =3D 0) { break; } } @@ -1705,7 +1709,7 @@ MtrrSetMemoryAttributeWorker ( // Find unused MTRR // for (; MsrNum < VariableMtrrCount; MsrNum++) { - if ((VariableSettings->Mtrr[MsrNum].Mask & MTRR_LIB_CACHE_MTRR_ENABL= ED) =3D=3D 0) { + if ((VariableSettings->Mtrr[MsrNum].Mask & CACHE_MTRR_ENABLED) =3D= =3D 0) { break; } } @@ -1728,7 +1732,7 @@ MtrrSetMemoryAttributeWorker ( // Find unused MTRR // for (; MsrNum < VariableMtrrCount; MsrNum++) { - if ((VariableSettings->Mtrr[MsrNum].Mask & MTRR_LIB_CACHE_MTRR_ENABL= ED) =3D=3D 0) { + if ((VariableSettings->Mtrr[MsrNum].Mask & CACHE_MTRR_ENABLED) =3D= =3D 0) { break; } } @@ -1801,7 +1805,7 @@ Done: DEBUG((DEBUG_CACHE, " Status =3D %r\n", Status)); if (!RETURN_ERROR (Status)) { if (MtrrSetting !=3D NULL) { - MtrrSetting->MtrrDefType |=3D MTRR_LIB_CACHE_MTRR_ENABLED; + MtrrSetting->MtrrDefType |=3D CACHE_MTRR_ENABLED; } MtrrDebugPrintAllMtrrsWorker (MtrrSetting); } --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Tue Apr 30 19:19: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 From nobody Tue Apr 30 19:19: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 1501752748968760.1857685036509; Thu, 3 Aug 2017 02:32:28 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 78C3521AEB0CE; 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 D98412095DB87 for ; Thu, 3 Aug 2017 02:30:03 -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:15 -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:14 -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="119098273" From: Eric Dong To: edk2-devel@lists.01.org Date: Thu, 3 Aug 2017 17:32:05 +0800 Message-Id: <1501752726-14072-7-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 6/7] UefiCpuPkg CpuDxe: 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 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Ruiyu Ni --- UefiCpuPkg/CpuDxe/CpuDxe.c | 22 +++++++++++----------- UefiCpuPkg/CpuDxe/CpuDxe.h | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c index 6218670..b386f3b 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.c +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c @@ -31,57 +31,57 @@ UINT64 mTimerPeriod =3D 0; =20 FIXED_MTRR mFixedMtrrTable[] =3D { { - MTRR_LIB_IA32_MTRR_FIX64K_00000, + MSR_IA32_MTRR_FIX64K_00000, 0, 0x10000 }, { - MTRR_LIB_IA32_MTRR_FIX16K_80000, + MSR_IA32_MTRR_FIX16K_80000, 0x80000, 0x4000 }, { - MTRR_LIB_IA32_MTRR_FIX16K_A0000, + MSR_IA32_MTRR_FIX16K_A0000, 0xA0000, 0x4000 }, { - MTRR_LIB_IA32_MTRR_FIX4K_C0000, + MSR_IA32_MTRR_FIX4K_C0000, 0xC0000, 0x1000 }, { - MTRR_LIB_IA32_MTRR_FIX4K_C8000, + MSR_IA32_MTRR_FIX4K_C8000, 0xC8000, 0x1000 }, { - MTRR_LIB_IA32_MTRR_FIX4K_D0000, + MSR_IA32_MTRR_FIX4K_D0000, 0xD0000, 0x1000 }, { - MTRR_LIB_IA32_MTRR_FIX4K_D8000, + MSR_IA32_MTRR_FIX4K_D8000, 0xD8000, 0x1000 }, { - MTRR_LIB_IA32_MTRR_FIX4K_E0000, + MSR_IA32_MTRR_FIX4K_E0000, 0xE0000, 0x1000 }, { - MTRR_LIB_IA32_MTRR_FIX4K_E8000, + MSR_IA32_MTRR_FIX4K_E8000, 0xE8000, 0x1000 }, { - MTRR_LIB_IA32_MTRR_FIX4K_F0000, + MSR_IA32_MTRR_FIX4K_F0000, 0xF0000, 0x1000 }, { - MTRR_LIB_IA32_MTRR_FIX4K_F8000, + MSR_IA32_MTRR_FIX4K_F8000, 0xF8000, 0x1000 }, diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.h b/UefiCpuPkg/CpuDxe/CpuDxe.h index 27ad45b..4861abe 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.h +++ b/UefiCpuPkg/CpuDxe/CpuDxe.h @@ -19,6 +19,7 @@ =20 #include #include +#include =20 #include #include --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Tue Apr 30 19:19: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 1501752752028348.2338387187665; Thu, 3 Aug 2017 02:32:32 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AF01B2095DB93; Thu, 3 Aug 2017 02:30:05 -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 DD96F21AEB0DB for ; Thu, 3 Aug 2017 02:30:04 -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:16 -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:15 -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="119098278" From: Eric Dong To: edk2-devel@lists.01.org Date: Thu, 3 Aug 2017 17:32:06 +0800 Message-Id: <1501752726-14072-8-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 7/7] UefiCpuPkg MtrrLib: Remove deprecated micro. 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 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Ruiyu Ni --- UefiCpuPkg/Include/Library/MtrrLib.h | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/UefiCpuPkg/Include/Library/MtrrLib.h b/UefiCpuPkg/Include/Libr= ary/MtrrLib.h index a63da4d..6120526 100644 --- a/UefiCpuPkg/Include/Library/MtrrLib.h +++ b/UefiCpuPkg/Include/Library/MtrrLib.h @@ -31,33 +31,6 @@ #define RESERVED_FIRMWARE_VARIABLE_MTRR_NUMBER 2 =20 #define MTRR_NUMBER_OF_FIXED_MTRR 11 -// -// Below macro is deprecated, and should not be used. -// -#define FIRMWARE_VARIABLE_MTRR_NUMBER 6 -#define MTRR_LIB_IA32_MTRR_CAP 0x0FE -#define MTRR_LIB_IA32_MTRR_CAP_VCNT_MASK 0x0FF -#define MTRR_LIB_IA32_MTRR_FIX64K_00000 0x250 -#define MTRR_LIB_IA32_MTRR_FIX16K_80000 0x258 -#define MTRR_LIB_IA32_MTRR_FIX16K_A0000 0x259 -#define MTRR_LIB_IA32_MTRR_FIX4K_C0000 0x268 -#define MTRR_LIB_IA32_MTRR_FIX4K_C8000 0x269 -#define MTRR_LIB_IA32_MTRR_FIX4K_D0000 0x26A -#define MTRR_LIB_IA32_MTRR_FIX4K_D8000 0x26B -#define MTRR_LIB_IA32_MTRR_FIX4K_E0000 0x26C -#define MTRR_LIB_IA32_MTRR_FIX4K_E8000 0x26D -#define MTRR_LIB_IA32_MTRR_FIX4K_F0000 0x26E -#define MTRR_LIB_IA32_MTRR_FIX4K_F8000 0x26F -#define MTRR_LIB_IA32_VARIABLE_MTRR_BASE 0x200 -// -// Below macro is deprecated, and should not be used. -// -#define MTRR_LIB_IA32_VARIABLE_MTRR_END 0x20F -#define MTRR_LIB_IA32_MTRR_DEF_TYPE 0x2FF -#define MTRR_LIB_MSR_VALID_MASK 0xFFFFFFFFFULL -#define MTRR_LIB_CACHE_VALID_ADDRESS 0xFFFFFF000ULL -#define MTRR_LIB_CACHE_MTRR_ENABLED 0x800 -#define MTRR_LIB_CACHE_FIXED_MTRR_ENABLED 0x400 =20 // // Structure to describe a fixed MTRR --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel