UefiCpuPkg/MtrrLib:Fix VS2012 build failure

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
Dandan Bi 2017-04-05 09:00:01 +08:00 committed by Hao Wu
parent fe4a28ccbf
commit 3ff1e8987b
1 changed files with 4 additions and 0 deletions

View File

@ -702,6 +702,7 @@ MtrrLibGetPositiveMtrrNumber (
BOOLEAN UseLeastAlignment;
UseLeastAlignment = TRUE;
SubLength = 0;
//
// Calculate the alignment of the base address.
@ -854,6 +855,7 @@ MtrrLibGetMtrrNumber (
*SubLeft = 0;
*SubRight = 0;
LeastSubtractiveMtrrNumber = 0;
BaseAlignment = 0;
//
// Get the optimal left subtraction solution.
@ -1627,6 +1629,8 @@ MtrrLibSetMemoryAttributeInVariableMtrr (
UINT32 SubtractiveRight;
BOOLEAN UseLeastAlignment;
Alignment = 0;
MtrrNumber = MtrrLibGetMtrrNumber (Ranges, RangeCount, VariableMtrr, *VariableMtrrCount,
BaseAddress, Length, Type, Alignment0, &SubtractiveLeft, &SubtractiveRight);