This removes the functions RevertRuntimeMemoryMap () and DumpMemoryMap () which are not referenced anywhere in the code.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c | 82 -------------------- 1 file changed, 82 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c index 351599311281..24240113659d 100644 --- a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c +++ b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c @@ -144,35 +144,6 @@ CoreReleasePropertiesTableLock ( } /** - Dump memory map. - - @param MemoryMap A pointer to the buffer in which firmware places - the current memory map. - @param MemoryMapSize Size, in bytes, of the MemoryMap buffer. - @param DescriptorSize Size, in bytes, of an individual EFI_MEMORY_DESCRIPTOR. -**/ -VOID -DumpMemoryMap ( - IN EFI_MEMORY_DESCRIPTOR *MemoryMap, - IN UINTN MemoryMapSize, - IN UINTN DescriptorSize - ) -{ - EFI_MEMORY_DESCRIPTOR *MemoryMapEntry; - EFI_MEMORY_DESCRIPTOR *MemoryMapEnd; - UINT64 MemoryBlockLength; - - DEBUG ((EFI_D_VERBOSE, " MemoryMap:\n")); - MemoryMapEntry = MemoryMap; - MemoryMapEnd = (EFI_MEMORY_DESCRIPTOR *) ((UINT8 *) MemoryMap + MemoryMapSize); - while (MemoryMapEntry < MemoryMapEnd) { - MemoryBlockLength = (UINT64) (EfiPagesToSize (MemoryMapEntry->NumberOfPages)); - DEBUG ((EFI_D_VERBOSE, " Entry(0x%02x) 0x%016lx - 0x%016lx (0x%016lx)\n", MemoryMapEntry->Type, MemoryMapEntry->PhysicalStart, MemoryMapEntry->PhysicalStart + MemoryBlockLength, MemoryMapEntry->Attribute)); - MemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (MemoryMapEntry, DescriptorSize); - } -} - -/** Sort memory map entries based upon PhysicalStart, from low to high. @param MemoryMap A pointer to the buffer in which firmware places @@ -305,59 +276,6 @@ EnforceMemoryMapAttribute ( } /** - Sort memory map entries whose type is EfiRuntimeServicesCode/EfiRuntimeServicesData, - from high to low. - This function assumes memory map is already from low to high, so it just reverts them. - - @param MemoryMap A pointer to the buffer in which firmware places - the current memory map. - @param MemoryMapSize Size, in bytes, of the MemoryMap buffer. - @param DescriptorSize Size, in bytes, of an individual EFI_MEMORY_DESCRIPTOR. -**/ -VOID -RevertRuntimeMemoryMap ( - IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, - IN UINTN MemoryMapSize, - IN UINTN DescriptorSize - ) -{ - EFI_MEMORY_DESCRIPTOR *MemoryMapEntry; - EFI_MEMORY_DESCRIPTOR *MemoryMapEnd; - EFI_MEMORY_DESCRIPTOR TempMemoryMap; - - EFI_MEMORY_DESCRIPTOR *RuntimeMapEntryBegin; - EFI_MEMORY_DESCRIPTOR *RuntimeMapEntryEnd; - - MemoryMapEntry = MemoryMap; - RuntimeMapEntryBegin = NULL; - RuntimeMapEntryEnd = NULL; - MemoryMapEnd = (EFI_MEMORY_DESCRIPTOR *) ((UINT8 *) MemoryMap + MemoryMapSize); - while ((UINTN)MemoryMapEntry < (UINTN)MemoryMapEnd) { - if ((MemoryMapEntry->Type == EfiRuntimeServicesCode) || - (MemoryMapEntry->Type == EfiRuntimeServicesData)) { - if (RuntimeMapEntryBegin == NULL) { - RuntimeMapEntryBegin = MemoryMapEntry; - } - RuntimeMapEntryEnd = MemoryMapEntry; - } - MemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (MemoryMapEntry, DescriptorSize); - } - - MemoryMapEntry = RuntimeMapEntryBegin; - MemoryMapEnd = RuntimeMapEntryEnd; - while (MemoryMapEntry < MemoryMapEnd) { - CopyMem (&TempMemoryMap, MemoryMapEntry, sizeof(EFI_MEMORY_DESCRIPTOR)); - CopyMem (MemoryMapEntry, MemoryMapEnd, sizeof(EFI_MEMORY_DESCRIPTOR)); - CopyMem (MemoryMapEnd, &TempMemoryMap, sizeof(EFI_MEMORY_DESCRIPTOR)); - - MemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (MemoryMapEntry, DescriptorSize); - MemoryMapEnd = PREVIOUS_MEMORY_DESCRIPTOR (MemoryMapEnd, DescriptorSize); - } - - return ; -} - -/** Return the first image record, whose [ImageBase, ImageSize] covered by [Buffer, Length]. @param Buffer Start Address -- 1.9.1 ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel