summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
diff options
context:
space:
mode:
authorjyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-03 02:04:37 +0000
committerjyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-03 02:04:37 +0000
commit06b07ce37c50290822f44bb7efe67dea9c72167b (patch)
tree6596cad05c21aa0446afa5584d5d945241d6b428 /MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
parenta17b7e9f33e56388cb2030ffaf1956f2a27a7e6b (diff)
downloadedk2-platforms-06b07ce37c50290822f44bb7efe67dea9c72167b.tar.xz
Change the minimal SMM core size from 1MB to 256KB-4K.
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
Diffstat (limited to 'MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c')
-rw-r--r--MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
index afb6d15bcd..1029a07779 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
@@ -920,10 +920,10 @@ SmmIplEntry (
}
//
- // Find the largest SMRAM range between 1MB and 4GB that is at least 1MB in size
+ // Find the largest SMRAM range between 1MB and 4GB that is at least 256KB - 4K in size
//
mCurrentSmramRange = NULL;
- for (Index = 0, MaxSize = SIZE_1MB; Index < gSmmCorePrivate->SmramRangeCount; Index++) {
+ for (Index = 0, MaxSize = SIZE_256KB - EFI_PAGE_SIZE; Index < gSmmCorePrivate->SmramRangeCount; Index++) {
if (gSmmCorePrivate->SmramRanges[Index].CpuStart >= BASE_1MB) {
if ((gSmmCorePrivate->SmramRanges[Index].CpuStart + gSmmCorePrivate->SmramRanges[Index].PhysicalSize) <= BASE_4GB) {
if (gSmmCorePrivate->SmramRanges[Index].PhysicalSize >= MaxSize) {