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>
This commit is contained in:
Wei6 Xu 2024-05-14 01:47:32 +08:00 committed by mergify[bot]
parent f0254c9a1c
commit 003a4d4ef4

View File

@ -81,11 +81,9 @@ MM_CORE_MMI_HANDLERS mMmCoreMmiHandlers[] = {
{ NULL, NULL, NULL, FALSE }, { NULL, NULL, NULL, FALSE },
}; };
BOOLEAN mMmEntryPointRegistered = FALSE; BOOLEAN mMmEntryPointRegistered = FALSE;
UINTN mMmramRangeCount; MM_COMM_BUFFER *mMmCommunicationBuffer;
EFI_MMRAM_DESCRIPTOR *mMmramRanges; VOID *mInternalCommBufferCopy;
MM_COMM_BUFFER *mMmCommunicationBuffer;
VOID *mInternalCommBufferCopy;
/** /**
Place holder function until all the MM System Table Service are available. Place holder function until all the MM System Table Service are available.
@ -696,16 +694,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. // No need to initialize memory service.
// It is done in the constructor of StandaloneMmCoreMemoryAllocationLib(), // It is done in the constructor of StandaloneMmCoreMemoryAllocationLib(),