diff options
author | Jeff Fan <jeff.fan@intel.com> | 2015-12-10 07:31:51 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-12-10 07:31:51 +0000 |
commit | 8cdd99bb2f9628037ca339b273c273a7c7c4cdb5 (patch) | |
tree | 1c62a377c2d56f55c07b8c1c0a754e8f4108f3e8 /UefiCpuPkg/Library/MtrrLib | |
parent | e01bbd9f84666a8d0f1d364e7301b99e72ce8f44 (diff) | |
download | edk2-8cdd99bb2f9628037ca339b273c273a7c7c4cdb5.tar.gz edk2-8cdd99bb2f9628037ca339b273c273a7c7c4cdb5.tar.bz2 edk2-8cdd99bb2f9628037ca339b273c273a7c7c4cdb5.zip |
UefiCpuPkg/MtrrLib:Initialize local variables before use them
(Sync patch r19183 from main trunk.)
Cc: Shumin Qiu <shumin.qiu@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@19211 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/Library/MtrrLib')
-rw-r--r-- | UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c index f5b3460f13..199e165d46 100644 --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c @@ -1489,7 +1489,9 @@ MtrrSetMemoryAttributeWorker ( UINT64 NewValue;
MTRR_VARIABLE_SETTINGS *VariableSettings;
- MtrrContextValid = FALSE;
+ MtrrContextValid = FALSE;
+ VariableMtrrCount = 0;
+ ZeroMem (&WorkingFixedSettings, sizeof (WorkingFixedSettings));
for (Index = 0; Index < MTRR_NUMBER_OF_FIXED_MTRR; Index++) {
FixedSettingsValid[Index] = FALSE;
FixedSettingsModified[Index] = FALSE;
|