diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-10-23 13:11:40 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-10-23 15:49:04 +0800 |
commit | e00e0dd7228c00b27cea5de9ed061576d2cd85b5 (patch) | |
tree | 840f2f3c1f7ad6a337a4eb9bca2aef9b1403e65a /UefiCpuPkg | |
parent | 1a421c2c173adece66f3c24f6d1cfb2ae5cee9cb (diff) | |
download | edk2-e00e0dd7228c00b27cea5de9ed061576d2cd85b5.zip edk2-e00e0dd7228c00b27cea5de9ed061576d2cd85b5.tar.gz edk2-e00e0dd7228c00b27cea5de9ed061576d2cd85b5.tar.bz2 |
UefiCpuPkg/MtrrLib: Use SetMem instead of SetMem64 to fix hang
ClearMasks and OrMasks are not 8-byte aligned.
But SetMem64 requires the input address is 8-byte aligned.
If the input is not 8-byte aligned, assertion is hit.
Use SetMem instead.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c index 200becd..8e46e46 100644 --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c @@ -2123,8 +2123,8 @@ MtrrLibSetBelow1MBMemoryAttribute ( //
// (Value & ~0 | 0) still equals to (Value)
//
- SetMem64 (ClearMasks, sizeof (ClearMasks), 0);
- SetMem64 (OrMasks, sizeof (OrMasks), 0);
+ SetMem (ClearMasks, sizeof (ClearMasks), 0);
+ SetMem (OrMasks, sizeof (OrMasks), 0);
MsrIndex = (UINT32)-1;
while ((BaseAddress < BASE_1MB) && (Length != 0)) {
|