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>
This commit is contained in:
parent
1a421c2c17
commit
e00e0dd722
|
@ -2123,8 +2123,8 @@ MtrrLibSetBelow1MBMemoryAttribute (
|
||||||
//
|
//
|
||||||
// (Value & ~0 | 0) still equals to (Value)
|
// (Value & ~0 | 0) still equals to (Value)
|
||||||
//
|
//
|
||||||
SetMem64 (ClearMasks, sizeof (ClearMasks), 0);
|
SetMem (ClearMasks, sizeof (ClearMasks), 0);
|
||||||
SetMem64 (OrMasks, sizeof (OrMasks), 0);
|
SetMem (OrMasks, sizeof (OrMasks), 0);
|
||||||
|
|
||||||
MsrIndex = (UINT32)-1;
|
MsrIndex = (UINT32)-1;
|
||||||
while ((BaseAddress < BASE_1MB) && (Length != 0)) {
|
while ((BaseAddress < BASE_1MB) && (Length != 0)) {
|
||||||
|
|
Loading…
Reference in New Issue