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 <ard.biesheuvel@linaro.org>
Reviewed-by: "Yao, Jiewen" <Jiewen.Yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17808 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Ard Biesheuvel 2015-07-02 07:32:10 +00:00 committed by abiesheuvel
parent 288ed59079
commit 8171f0265b
1 changed files with 0 additions and 82 deletions

View File

@ -143,35 +143,6 @@ CoreReleasePropertiesTableLock (
CoreReleaseLock (&mPropertiesTableLock); CoreReleaseLock (&mPropertiesTableLock);
} }
/**
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. Sort memory map entries based upon PhysicalStart, from low to high.
@ -304,59 +275,6 @@ EnforceMemoryMapAttribute (
return ; return ;
} }
/**
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]. Return the first image record, whose [ImageBase, ImageSize] covered by [Buffer, Length].