summaryrefslogtreecommitdiffstats
path: root/StandaloneMmPkg
diff options
context:
space:
mode:
authorWei6 Xu <wei6.xu@intel.com>2024-05-14 01:47:32 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-08-28 15:25:27 +0000
commit003a4d4ef4a2238c9cef83be36021861c6d949d2 (patch)
tree14b435e2ca60e14d013eb2a2e67dec7afe43390f /StandaloneMmPkg
parentf0254c9a1ca68c13f71da5424971b5617c5a1ca6 (diff)
downloadedk2-003a4d4ef4a2238c9cef83be36021861c6d949d2.tar.gz
edk2-003a4d4ef4a2238c9cef83be36021861c6d949d2.tar.bz2
edk2-003a4d4ef4a2238c9cef83be36021861c6d949d2.zip
StandaloneMmPkg/Core: Remove unused mMmramRanges and mMmramRangeCount
mMmramRanges and mMmramRangeCount are the global variables that are used to cache the MMRAM Ranges info, but they are not used in MM Core. Therefore, remove mMmramRanges and mMmramRangeCount. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Diffstat (limited to 'StandaloneMmPkg')
-rw-r--r--StandaloneMmPkg/Core/StandaloneMmCore.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.c b/StandaloneMmPkg/Core/StandaloneMmCore.c
index 49d3e6d407..e5c28be4e0 100644
--- a/StandaloneMmPkg/Core/StandaloneMmCore.c
+++ b/StandaloneMmPkg/Core/StandaloneMmCore.c
@@ -81,11 +81,9 @@ MM_CORE_MMI_HANDLERS mMmCoreMmiHandlers[] = {
{ NULL, NULL, NULL, FALSE },
};
-BOOLEAN mMmEntryPointRegistered = FALSE;
-UINTN mMmramRangeCount;
-EFI_MMRAM_DESCRIPTOR *mMmramRanges;
-MM_COMM_BUFFER *mMmCommunicationBuffer;
-VOID *mInternalCommBufferCopy;
+BOOLEAN mMmEntryPointRegistered = FALSE;
+MM_COMM_BUFFER *mMmCommunicationBuffer;
+VOID *mInternalCommBufferCopy;
/**
Place holder function until all the MM System Table Service are available.
@@ -697,16 +695,6 @@ StandaloneMmMain (
}
//
- // Copy the MMRAM ranges into private MMRAM
- //
- mMmramRangeCount = MmramRangeCount;
- DEBUG ((DEBUG_INFO, "mMmramRangeCount - 0x%x\n", mMmramRangeCount));
- mMmramRanges = AllocatePool (mMmramRangeCount * sizeof (EFI_MMRAM_DESCRIPTOR));
- DEBUG ((DEBUG_INFO, "mMmramRanges - 0x%x\n", mMmramRanges));
- ASSERT (mMmramRanges != NULL);
- CopyMem (mMmramRanges, (VOID *)(UINTN)MmramRanges, mMmramRangeCount * sizeof (EFI_MMRAM_DESCRIPTOR));
-
- //
// No need to initialize memory service.
// It is done in the constructor of StandaloneMmCoreMemoryAllocationLib(),
// so that the library linked with StandaloneMmCore can use AllocatePool() in