mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
Fixed bug.
svn path=/trunk/; revision=1210
This commit is contained in:
parent
6e00280f38
commit
fcf9dcd627
|
@ -83,7 +83,12 @@ PVOID MmInitializePageList(PVOID FirstPhysKernelAddress,
|
||||||
MmPageArray = (PHYSICAL_PAGE *)LastKernelAddress;
|
MmPageArray = (PHYSICAL_PAGE *)LastKernelAddress;
|
||||||
|
|
||||||
DPRINT("Reserved %d\n", Reserved);
|
DPRINT("Reserved %d\n", Reserved);
|
||||||
|
|
||||||
|
LastKernelAddress = PAGE_ROUND_UP(LastKernelAddress);
|
||||||
|
LastKernelAddress = ((ULONG)LastKernelAddress + (Reserved * PAGESIZE));
|
||||||
|
LastPhysKernelAddress = (PVOID)PAGE_ROUND_UP(LastPhysKernelAddress);
|
||||||
|
LastPhysKernelAddress = LastPhysKernelAddress + (Reserved * PAGESIZE);
|
||||||
|
|
||||||
MiNrFreePages = 0;
|
MiNrFreePages = 0;
|
||||||
MiNrUsedPages = 0;
|
MiNrUsedPages = 0;
|
||||||
|
|
||||||
|
@ -103,8 +108,8 @@ PVOID MmInitializePageList(PVOID FirstPhysKernelAddress,
|
||||||
&MmPageArray[i].ListEntry);
|
&MmPageArray[i].ListEntry);
|
||||||
}
|
}
|
||||||
MiNrUsedPages = MiNrUsedPages +
|
MiNrUsedPages = MiNrUsedPages +
|
||||||
(((0xa0000) / PAGESIZE) - i);
|
((((ULONG)LastPhysKernelAddress) / PAGESIZE) - i);
|
||||||
for (; i<(0xa0000 / PAGESIZE); i++)
|
for (; i<((ULONG)LastKernelAddress / PAGESIZE); i++)
|
||||||
{
|
{
|
||||||
MmPageArray[i].Flags = PHYSICAL_PAGE_INUSE;
|
MmPageArray[i].Flags = PHYSICAL_PAGE_INUSE;
|
||||||
MmPageArray[i].ReferenceCount = 1;
|
MmPageArray[i].ReferenceCount = 1;
|
||||||
|
@ -114,6 +119,18 @@ PVOID MmInitializePageList(PVOID FirstPhysKernelAddress,
|
||||||
InsertTailList(&UsedPageListHead,
|
InsertTailList(&UsedPageListHead,
|
||||||
&MmPageArray[i].ListEntry);
|
&MmPageArray[i].ListEntry);
|
||||||
}
|
}
|
||||||
|
MiNrFreePages = MiNrFreePages +
|
||||||
|
((0xa0000/PAGESIZE) - i);
|
||||||
|
for (; i<(0xa0000/PAGESIZE); i++)
|
||||||
|
{
|
||||||
|
MmPageArray[i].Flags = PHYSICAL_PAGE_FREE;
|
||||||
|
MmPageArray[i].ReferenceCount = 0;
|
||||||
|
KeInitializeEvent(&MmPageArray[i].Event,
|
||||||
|
NotificationEvent,
|
||||||
|
FALSE);
|
||||||
|
InsertTailList(&FreePageListHead,
|
||||||
|
&MmPageArray[i].ListEntry);
|
||||||
|
}
|
||||||
for (; i<(0x100000 / PAGESIZE); i++)
|
for (; i<(0x100000 / PAGESIZE); i++)
|
||||||
{
|
{
|
||||||
MmPageArray[i].Flags = PHYSICAL_PAGE_BIOS;
|
MmPageArray[i].Flags = PHYSICAL_PAGE_BIOS;
|
||||||
|
@ -185,9 +202,7 @@ PVOID MmInitializePageList(PVOID FirstPhysKernelAddress,
|
||||||
InsertTailList(&FreePageListHead,
|
InsertTailList(&FreePageListHead,
|
||||||
&MmPageArray[i].ListEntry);
|
&MmPageArray[i].ListEntry);
|
||||||
}
|
}
|
||||||
DPRINT("\nMmInitializePageList() = %x\n",
|
return((PVOID)LastKernelAddress);
|
||||||
LastKernelAddress + Reserved * PAGESIZE);
|
|
||||||
return((PVOID)(LastKernelAddress + Reserved * PAGESIZE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID MmReferencePage(PVOID PhysicalAddress)
|
VOID MmReferencePage(PVOID PhysicalAddress)
|
||||||
|
|
Loading…
Reference in a new issue