ULONG MmLowestPhysicalPage = 0xFFFFFFFF;
ULONG MmHighestPhysicalPage = 0;
-PMEMORY_DESCRIPTOR BiosMemoryMap;
+PFREELDR_MEMORY_DESCRIPTOR BiosMemoryMap;
ULONG BiosMemoryMapEntryCount;
extern ULONG_PTR MmHeapPointer;
ULONG
AddMemoryDescriptor(
- IN OUT PMEMORY_DESCRIPTOR List,
+ IN OUT PFREELDR_MEMORY_DESCRIPTOR List,
IN ULONG MaxCount,
IN PFN_NUMBER BasePage,
IN PFN_NUMBER PageCount,
- IN MEMORY_TYPE MemoryType)
+ IN TYPE_OF_MEMORY MemoryType)
{
ULONG i, c;
PFN_NUMBER NextBase;
return c;
}
-const MEMORY_DESCRIPTOR*
-ArcGetMemoryDescriptor(const MEMORY_DESCRIPTOR* Current)
+const FREELDR_MEMORY_DESCRIPTOR*
+ArcGetMemoryDescriptor(const FREELDR_MEMORY_DESCRIPTOR* Current)
{
if (Current == NULL)
{
BOOLEAN MmInitializeMemoryManager(VOID)
{
#if DBG
- const MEMORY_DESCRIPTOR* MemoryDescriptor = NULL;
+ const FREELDR_MEMORY_DESCRIPTOR* MemoryDescriptor = NULL;
#endif
TRACE("Initializing Memory Manager.\n");
ULONG MmGetAddressablePageCountIncludingHoles(VOID)
{
- const MEMORY_DESCRIPTOR* MemoryDescriptor = NULL;
+ const FREELDR_MEMORY_DESCRIPTOR* MemoryDescriptor = NULL;
ULONG PageCount;
//
//
// Yes, remember it if this is real memory
//
- if (MemoryDescriptor->MemoryType == MemoryFree)
+ if (MemoryDescriptor->MemoryType == LoaderFree)
MmHighestPhysicalPage = MemoryDescriptor->BasePage + MemoryDescriptor->PageCount;
}
PVOID MmFindLocationForPageLookupTable(ULONG TotalPageCount)
{
- const MEMORY_DESCRIPTOR* MemoryDescriptor = NULL;
+ const FREELDR_MEMORY_DESCRIPTOR* MemoryDescriptor = NULL;
ULONG PageLookupTableSize;
ULONG PageLookupTablePages;
ULONG PageLookupTableStartPage = 0;
while ((MemoryDescriptor = ArcGetMemoryDescriptor(MemoryDescriptor)) != NULL)
{
// Continue, if memory is not free
- if (MemoryDescriptor->MemoryType != MemoryFree) continue;
+ if (MemoryDescriptor->MemoryType != LoaderFree) continue;
// Continue, if the block is not big enough?
if (MemoryDescriptor->PageCount < PageLookupTablePages) continue;
VOID MmInitPageLookupTable(PVOID PageLookupTable, ULONG TotalPageCount)
{
- const MEMORY_DESCRIPTOR* MemoryDescriptor = NULL;
+ const FREELDR_MEMORY_DESCRIPTOR* MemoryDescriptor = NULL;
TYPE_OF_MEMORY MemoryMapPageAllocated;
ULONG PageLookupTableStartPage;
ULONG PageLookupTablePageCount;