]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
MdePkg/DxeServicesLib: Return NULL GetFileBufferByFilePath reads directory
[mirror_edk2.git] / MdeModulePkg / Core / PiSmmCore / PiSmmIpl.c
index 4759579cab51626ccfd1469d6b429b3fe7486fbd..ba596cd1b7efd7c937fba74eff79fdce82caa9a1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   SMM IPL that produces SMM related runtime protocols and load the SMM Core into SMRAM\r
 \r
-  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials are licensed and made available \r
   under the terms and conditions of the BSD License which accompanies this \r
   distribution.  The full text of the license may be found at        \r
@@ -1042,6 +1042,7 @@ SmmIplEntry (
   UINT64                          SmmCodeSize;\r
   EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE    *LMFAConfigurationTable;\r
   EFI_CPU_ARCH_PROTOCOL           *CpuArch;\r
+  EFI_STATUS                      SetAttrStatus;\r
 \r
   //\r
   // Fill in the image handle of the SMM IPL so the SMM Core can use this as the \r
@@ -1213,12 +1214,12 @@ SmmIplEntry (
       // Attempt to reset SMRAM cacheability to UC\r
       //\r
       if (CpuArch != NULL) {\r
-        Status = gDS->SetMemorySpaceAttributes(\r
-                        mSmramCacheBase, \r
-                        mSmramCacheSize,\r
-                        EFI_MEMORY_UC\r
-                        );\r
-        if (EFI_ERROR (Status)) {\r
+        SetAttrStatus = gDS->SetMemorySpaceAttributes(\r
+                               mSmramCacheBase, \r
+                               mSmramCacheSize,\r
+                               EFI_MEMORY_UC\r
+                               );\r
+        if (EFI_ERROR (SetAttrStatus)) {\r
           DEBUG ((DEBUG_WARN, "SMM IPL failed to reset SMRAM window to EFI_MEMORY_UC\n"));\r
         }  \r
       }\r
@@ -1250,7 +1251,8 @@ SmmIplEntry (
     // Free all allocated resources\r
     //\r
     FreePool (gSmmCorePrivate->SmramRanges);\r
-    \r
+    FreePool (gSmmCorePrivate->FullSmramRanges);\r
+\r
     return EFI_UNSUPPORTED;\r
   }\r
   \r