diff options
author | Jeff Fan <jeff.fan@intel.com> | 2015-12-10 07:10:13 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-12-10 07:10:13 +0000 |
commit | 2d675c1c8c9e43195bf32d5a34a54f962f35afca (patch) | |
tree | 796c24cc050567cdf65b2c6a9d58c94d2f0d2bf5 | |
parent | abef2c854763e067a5cb25698ee61a14641982fc (diff) | |
download | edk2-platforms-2d675c1c8c9e43195bf32d5a34a54f962f35afca.tar.xz |
UefiCpuPkg/MtrrLib:Initialize local variables before use them
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/trunk/edk2@19183 6f19259b-4bc3-4df7-8a09-765794883524
-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;
|