]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Change the minimal SMM core size from 1MB to 256KB-4K.
authorjyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 3 Mar 2010 02:04:37 +0000 (02:04 +0000)
committerjyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 3 Mar 2010 02:04:37 +0000 (02:04 +0000)
Some platforms only enable 1MB, after reserve 1 page for SMM S3. There is at most 1MB-4KB for SMM core.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10158 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c

index afb6d15bcdb234524a21449b6285332aa30afa6c..1029a077794cb23fe8daf7bd5eaa1e713ab97af9 100644 (file)
@@ -920,10 +920,10 @@ SmmIplEntry (
   }\r
   \r
   //\r
-  // Find the largest SMRAM range between 1MB and 4GB that is at least 1MB in size\r
+  // Find the largest SMRAM range between 1MB and 4GB that is at least 256KB - 4K in size\r
   //\r
   mCurrentSmramRange = NULL;\r
-  for (Index = 0, MaxSize = SIZE_1MB; Index < gSmmCorePrivate->SmramRangeCount; Index++) {\r
+  for (Index = 0, MaxSize = SIZE_256KB - EFI_PAGE_SIZE; Index < gSmmCorePrivate->SmramRangeCount; Index++) {\r
     if (gSmmCorePrivate->SmramRanges[Index].CpuStart >= BASE_1MB) {\r
       if ((gSmmCorePrivate->SmramRanges[Index].CpuStart + gSmmCorePrivate->SmramRanges[Index].PhysicalSize) <= BASE_4GB) {\r
         if (gSmmCorePrivate->SmramRanges[Index].PhysicalSize >= MaxSize) {\r