[BOOT:MM] More work on memory manager

This commit is contained in:
2024-08-26 12:30:31 -04:00
parent bbd8f475bb
commit ef1ac515dd
9 changed files with 322 additions and 37 deletions

View File

@@ -17,12 +17,6 @@ Abstract:
#include "bootlib.h"
#include "mm.h"
#define MAX_STATIC_DESCRIPTOR_COUNT 1024
BOOT_MEMORY_DESCRIPTOR MmStaticMemoryDescriptors[MAX_STATIC_DESCRIPTOR_COUNT];
PBOOT_MEMORY_DESCRIPTOR MmGlobalMemoryDescriptors;
ULONG MmGlobalMemoryDescriptorCount;
NTSTATUS
BlpMmInitialize (
IN PBOOT_MEMORY_INFO MemoryInfo,
@@ -69,14 +63,12 @@ Return Value:
}
//
// Initialize memory descriptors.
// Initialize memory descriptor manager.
//
MmGlobalMemoryDescriptors = &MmStaticMemoryDescriptors[0];
MmGlobalMemoryDescriptorCount = MAX_STATIC_DESCRIPTOR_COUNT;
RtlZeroMemory(MmGlobalMemoryDescriptors, MAX_STATIC_DESCRIPTOR_COUNT * sizeof(BOOT_MEMORY_DESCRIPTOR));
MmMdInitialize(0, LibraryParameters);
//
// Initialize the page allocator.
// Initialize page allocator.
//
Status = MmPaInitialize(MemoryInfo, LibraryParameters->MinimumPageAllocation);
if (!NT_SUCCESS(Status)) {