summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
diff options
context:
space:
mode:
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;
}