Revision: 17808
http://sourceforge.net/p/edk2/code/17808
Author: abiesheuvel
Date: 2015-07-02 07:32:10 +0000 (Thu, 02 Jul 2015)
Log Message:
-----------
MdeModulePkg: remove unused functions from Core/Dxe/Misc/PropertiesTable.c
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 <[email protected]>
Reviewed-by: "Yao, Jiewen" <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
Modified: trunk/edk2/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
===================================================================
--- trunk/edk2/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c 2015-07-02
07:23:33 UTC (rev 17807)
+++ trunk/edk2/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c 2015-07-02
07:32:10 UTC (rev 17808)
@@ -144,35 +144,6 @@
}
/**
- 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 @@
}
/**
- 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
------------------------------------------------------------------------------
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-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits