From 003a4d4ef4a2238c9cef83be36021861c6d949d2 Mon Sep 17 00:00:00 2001 From: Wei6 Xu Date: Tue, 14 May 2024 01:47:32 +0800 Subject: 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 Cc: Sami Mujawar Cc: Ray Ni Cc: Jiaxin Wu Signed-off-by: Wei6 Xu --- StandaloneMmPkg/Core/StandaloneMmCore.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'StandaloneMmPkg') 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. @@ -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. // It is done in the constructor of StandaloneMmCoreMemoryAllocationLib(), -- cgit