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:
@@ -979,6 +979,13 @@ ExecuteSmmCoreFromSmram (
|
||||
//
|
||||
DEBUG ((DEBUG_INFO, "SMM IPL calling SMM Core at SMRAM address %p\n", (VOID *)(UINTN)ImageContext.EntryPoint));
|
||||
|
||||
gSmmCorePrivate->PiSmmCoreImageBase = ImageContext.ImageAddress;
|
||||
gSmmCorePrivate->PiSmmCoreImageSize = ImageContext.ImageSize;
|
||||
DEBUG ((DEBUG_INFO, "PiSmmCoreImageBase - 0x%016lx\n", gSmmCorePrivate->PiSmmCoreImageBase));
|
||||
DEBUG ((DEBUG_INFO, "PiSmmCoreImageSize - 0x%016lx\n", gSmmCorePrivate->PiSmmCoreImageSize));
|
||||
|
||||
gSmmCorePrivate->PiSmmCoreEntryPoint = ImageContext.EntryPoint;
|
||||
|
||||
//
|
||||
// Execute image
|
||||
//
|
||||
@@ -1076,6 +1083,14 @@ SmmIplEntry (
|
||||
|
||||
gSmmCorePrivate->SmramRangeCount = Size / sizeof (EFI_SMRAM_DESCRIPTOR);
|
||||
|
||||
//
|
||||
// Save a full copy
|
||||
//
|
||||
gSmmCorePrivate->FullSmramRangeCount = gSmmCorePrivate->SmramRangeCount;
|
||||
gSmmCorePrivate->FullSmramRanges = (EFI_SMRAM_DESCRIPTOR *) AllocatePool (Size);
|
||||
ASSERT (gSmmCorePrivate->FullSmramRanges != NULL);
|
||||
CopyMem (gSmmCorePrivate->FullSmramRanges, gSmmCorePrivate->SmramRanges, Size);
|
||||
|
||||
//
|
||||
// Open all SMRAM ranges
|
||||
//
|
||||
|
Reference in New Issue
Block a user