From: Eric Dong <eric.dong@intel.com>
To: edk2-devel@lists.01.org
Cc: Jeff Fan <jeff.fan@intel.com>, Ruiyu Ni <ruiyu.ni@intel.com>,
David Wei <david.wei@intel.com>
Subject: [Patch 5/7] Vlv2TbltDevicePkg: Remove reference deprecated macro.
Date: Thu, 3 Aug 2017 17:32:04 +0800 [thread overview]
Message-ID: <1501752726-14072-6-git-send-email-eric.dong@intel.com> (raw)
In-Reply-To: <1501752726-14072-1-git-send-email-eric.dong@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: David Wei <david.wei@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/Vlv2TbltDevicePkg/PlatformInitPei/MemoryPeim.c b/Vlv2TbltDevicePkg/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)
+#define CACHE_MTRR_ENABLED 0x800
+
//
// This is the memory needed for PEI to start up DXE.
//
@@ -197,7 +199,7 @@ SetPeiCacheMode (
//
Index = 0;
MtrrSetting.Variables.Mtrr[0].Base = (FixedPcdGet32 (PcdFlashAreaBaseAddress) | CacheWriteProtected);
- MtrrSetting.Variables.Mtrr[0].Mask = ((~((UINT64)(FixedPcdGet32 (PcdFlashAreaSize) - 1))) & ValidMtrrAddressMask) | MTRR_LIB_CACHE_MTRR_ENABLED;
+ MtrrSetting.Variables.Mtrr[0].Mask = ((~((UINT64)(FixedPcdGet32 (PcdFlashAreaSize) - 1))) & ValidMtrrAddressMask) | CACHE_MTRR_ENABLED;
Index ++;
MemOverflow =0;
@@ -205,7 +207,7 @@ SetPeiCacheMode (
MtrrSetting.Variables.Mtrr[Index].Base = (MemOverflow & ValidMtrrAddressMask) | CacheWriteBack;
MemoryLength = MaxMemoryLength - MemOverflow;
MemoryLength = GetPowerOfTwo64 (MemoryLength);
- MtrrSetting.Variables.Mtrr[Index].Mask = ((~(MemoryLength - 1)) & ValidMtrrAddressMask) | MTRR_LIB_CACHE_MTRR_ENABLED;
+ MtrrSetting.Variables.Mtrr[Index].Mask = ((~(MemoryLength - 1)) & ValidMtrrAddressMask) | CACHE_MTRR_ENABLED;
MemOverflow += MemoryLength;
Index++;
@@ -217,7 +219,7 @@ SetPeiCacheMode (
MemoryLengthUc = GetPowerOfTwo64 (MaxMemoryLength - MemoryLength);
MtrrSetting.Variables.Mtrr[Index].Base = ((MaxMemoryLength - MemoryLengthUc) & ValidMtrrAddressMask) | CacheUncacheable;
- MtrrSetting.Variables.Mtrr[Index].Mask= ((~(MemoryLengthUc - 1)) & ValidMtrrAddressMask) | MTRR_LIB_CACHE_MTRR_ENABLED;
+ MtrrSetting.Variables.Mtrr[Index].Mask= ((~(MemoryLengthUc - 1)) & ValidMtrrAddressMask) | CACHE_MTRR_ENABLED;
MaxMemoryLength -= MemoryLengthUc;
Index++;
}
@@ -232,7 +234,7 @@ SetPeiCacheMode (
MemoryLength = MemOverflow;
}
- MtrrSetting.Variables.Mtrr[Index].Mask = ((~(MemoryLength - 1)) & ValidMtrrAddressMask) | MTRR_LIB_CACHE_MTRR_ENABLED;
+ MtrrSetting.Variables.Mtrr[Index].Mask = ((~(MemoryLength - 1)) & ValidMtrrAddressMask) | CACHE_MTRR_ENABLED;
MemOverflow += MemoryLength;
HighMemoryLength -= MemoryLength;
--
2.7.0.windows.1
next prev parent reply other threads:[~2017-08-03 9:30 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
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 ` Eric Dong [this message]
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=1501752726-14072-6-git-send-email-eric.dong@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