Compare commits

...

1 Commits

Author SHA1 Message Date
Aleksey Bragin
bd07e8377d - Don't store memory allocation descriptors inside the bootloader, since this memory is unmapped in kernelmode. Fixes a pagefault after switching to paged mode.
svn path=/branches/winldr/; revision=31982
2008-01-25 11:14:44 +00:00

View File

@@ -107,7 +107,7 @@ PUCHAR KernelPageTablesBuffer;
ULONG PhysicalPageTables;
ULONG KernelPageTables;
MEMORY_ALLOCATION_DESCRIPTOR Mad[1024];
MEMORY_ALLOCATION_DESCRIPTOR *Mad;
ULONG MadCount = 0;
@@ -428,6 +428,9 @@ WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
if (MempAllocatePageTables() == FALSE)
return FALSE;
// Allocate memory for memory allocation descriptors
Mad = MmHeapAlloc(sizeof(MEMORY_ALLOCATION_DESCRIPTOR) * 1024);
// Setup an entry for each descriptor
MemoryMap = MmGetMemoryMap(&NoEntries);
if (MemoryMap == NULL)