summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2014-11-12 03:27:48 +0000
committerlzeng14 <lzeng14@Edk2>2014-11-12 03:27:48 +0000
commit84edd20bd0756ef5719835498d4283435d6b5e77 (patch)
tree2fceedfc8b217a7475ec26277c070b9c08991dfd /MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
parentdad83a8c1207e585b2cb417d0680fe2e9452d262 (diff)
downloadedk2-platforms-84edd20bd0756ef5719835498d4283435d6b5e77.tar.xz
MdeModulePkg DxeCore/PiSmmCore: Add UEFI memory and SMRAM profile support.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16335 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/PiSmmCore/PiSmmCore.c')
-rw-r--r--MdeModulePkg/Core/PiSmmCore/PiSmmCore.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
index a7220e4235..d16baedec9 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
@@ -1,7 +1,7 @@
/** @file
SMM Core Main Entry Point
- Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
distribution. The full text of the license may be found at
@@ -82,6 +82,9 @@ SMM_CORE_SMI_HANDLERS mSmmCoreSmiHandlers[] = {
{ NULL, NULL, NULL, FALSE }
};
+UINTN mFullSmramRangeCount;
+EFI_SMRAM_DESCRIPTOR *mFullSmramRanges;
+
/**
Place holder function until all the SMM System Table Service are available.
@@ -226,6 +229,8 @@ SmmReadyToLockHandler (
gST = NULL;
gBS = NULL;
+ SmramProfileReadyToLock ();
+
return Status;
}
@@ -401,6 +406,16 @@ SmmMain (
//
SmmInitializeMemoryServices (gSmmCorePrivate->SmramRangeCount, gSmmCorePrivate->SmramRanges);
+ SmramProfileInit ();
+
+ //
+ // Copy FullSmramRanges to SMRAM
+ //
+ mFullSmramRangeCount = gSmmCorePrivate->FullSmramRangeCount;
+ mFullSmramRanges = AllocatePool (mFullSmramRangeCount * sizeof (EFI_SMRAM_DESCRIPTOR));
+ ASSERT (mFullSmramRanges != NULL);
+ CopyMem (mFullSmramRanges, gSmmCorePrivate->FullSmramRanges, mFullSmramRangeCount * sizeof (EFI_SMRAM_DESCRIPTOR));
+
//
// Register all SMI Handlers required by the SMM Core
//
@@ -412,6 +427,8 @@ SmmMain (
);
ASSERT_EFI_ERROR (Status);
}
-
+
+ RegisterSmramProfileHandler ();
+
return EFI_SUCCESS;
}