From d6cd3275f2607e8950c8c84009ccce815d24f7c8 Mon Sep 17 00:00:00 2001 From: ReactOS Portable Systems Group Date: Fri, 15 Feb 2008 00:50:26 +0000 Subject: [PATCH] Remove accidentally enabled debugging function, and apply the FreeLDR 6MB hack when building the ARC Memory Descriptor List as well. This will reflect the memory in use (thus representing the ARC-based glorious hack) when parsing the memory descriptor list, something we'll soon have to do in MmInitializePageList. svn path=/trunk/; revision=32370 --- reactos/ntoskrnl/ke/freeldr.c | 10 +++++++++- reactos/ntoskrnl/mm/mminit.c | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/ke/freeldr.c b/reactos/ntoskrnl/ke/freeldr.c index ebee6beeddf..13a04df35a1 100644 --- a/reactos/ntoskrnl/ke/freeldr.c +++ b/reactos/ntoskrnl/ke/freeldr.c @@ -906,7 +906,7 @@ KiRosFrldrLpbToNtLpb(IN PROS_LOADER_PARAMETER_BLOCK RosLoaderBlock, { PLOADER_PARAMETER_BLOCK LoaderBlock; PLDR_DATA_TABLE_ENTRY LdrEntry; - PLOADER_MODULE RosEntry; + PLOADER_MODULE RosEntry = NULL; ULONG i, j, ModSize; PVOID ModStart; PCHAR DriverName; @@ -1147,6 +1147,14 @@ KiRosFrldrLpbToNtLpb(IN PROS_LOADER_PARAMETER_BLOCK RosLoaderBlock, InsertTailList(&LoaderBlock->LoadOrderListHead, &LdrEntry->InLoadOrderLinks); } + + /* Now mark the remainder of the FreeLDR 6MB area as "in use" */ + KiRosAllocateNtDescriptor(LoaderMemoryData, + KERNEL_DESCRIPTOR_PAGE(RosEntry->ModEnd), + KERNEL_DESCRIPTOR_PAGE((0x80800000 + 0x600000)) - + KERNEL_DESCRIPTOR_PAGE(RosEntry->ModEnd), + 0, + &Base); /* Setup command line */ LoaderBlock->LoadOptions = BldrCommandLine; diff --git a/reactos/ntoskrnl/mm/mminit.c b/reactos/ntoskrnl/mm/mminit.c index c7a24086e78..976dc0b5e71 100644 --- a/reactos/ntoskrnl/mm/mminit.c +++ b/reactos/ntoskrnl/mm/mminit.c @@ -348,7 +348,7 @@ MmInit1(IN PADDRESS_RANGE BIOSMemoryMap, PLDR_DATA_TABLE_ENTRY LdrEntry; /* Dump memory descriptors */ - if (TRUE) MiDbgDumpMemoryDescriptors(); + if (MiDbgEnableMdDump) MiDbgDumpMemoryDescriptors(); if (MiDbgEnableMdDump) MiDbgDumpBiosMap(BIOSMemoryMap, AddressRangeCount); /* Set the page directory */