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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user