diff options
author | Dandan Bi <dandan.bi@intel.com> | 2017-04-05 09:00:01 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2017-04-05 11:26:55 +0800 |
commit | 3ff1e8987b0b6dd82cdda8f02127582caace57d6 (patch) | |
tree | 42996cd7c0936d4ad7fb91b29c5e35debdf3ea50 /UefiCpuPkg | |
parent | fe4a28ccbfd33cae9e1f56b174d46b4eb2329efd (diff) | |
download | edk2-platforms-3ff1e8987b0b6dd82cdda8f02127582caace57d6.tar.xz |
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>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c index 8e8427291f..c38191a7ef 100644 --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c @@ -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);
|