mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 13:38:19 +00:00
[NTOSKRNL]
◙ Fix MiInitializePageTable ◙ Comment out some more code for amd64 svn path=/trunk/; revision=48291
This commit is contained in:
parent
7d17455cc4
commit
ac342cea5f
3 changed files with 12 additions and 8 deletions
|
@ -1593,11 +1593,12 @@ MiBuildPagedPool(VOID)
|
|||
#else
|
||||
/* Do it this way */
|
||||
// Bla = MmSystemPageDirectory[(PointerPde - (PMMPTE)PDE_BASE) / PDE_COUNT]
|
||||
#endif
|
||||
|
||||
/* Initialize the PFN entry for it */
|
||||
MiInitializePfnForOtherProcess(PageFrameIndex,
|
||||
PointerPde,
|
||||
MmSystemPageDirectory[(PointerPde - (PMMPTE)PDE_BASE) / PDE_COUNT]);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Release the PFN database lock
|
||||
|
|
|
@ -99,10 +99,11 @@ MiCheckPdeForPagedPool(IN PVOID Address)
|
|||
//
|
||||
if (PointerPde->u.Hard.Valid == 0)
|
||||
{
|
||||
#ifndef _M_AMD64
|
||||
#ifdef _M_AMD64
|
||||
ASSERT(FALSE);
|
||||
#else
|
||||
/* This seems to be making the assumption that one PDE is one page long */
|
||||
C_ASSERT(PAGE_SIZE == (PD_COUNT * (sizeof(MMPTE) * PDE_COUNT)));
|
||||
#endif
|
||||
|
||||
//
|
||||
// Copy it from our double-mapped system page directory
|
||||
|
@ -111,6 +112,7 @@ MiCheckPdeForPagedPool(IN PVOID Address)
|
|||
MmSystemPagePtes[((ULONG_PTR)PointerPde &
|
||||
(PAGE_SIZE - 1)) /
|
||||
sizeof(MMPTE)].u.Long);
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -373,19 +373,20 @@ MiInitializeSessionSpace(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|||
VOID
|
||||
MiInitializePageTable()
|
||||
{
|
||||
ULONG64 PageFrameOffset;
|
||||
ULONG64 PxePhysicalAddress;
|
||||
MMPTE TmplPte, *Pte;
|
||||
PFN_NUMBER PxePfn;
|
||||
|
||||
/* HACK: don't use freeldr debug print anymore */
|
||||
//FrLdrDbgPrint = NoDbgPrint;
|
||||
|
||||
/* Get current directory base */
|
||||
MmSystemPageDirectory[0] = ((PMMPTE)PXE_SELFMAP)->u.Hard.PageFrameNumber;
|
||||
PageFrameOffset = MmSystemPageDirectory[0] << PAGE_SHIFT;
|
||||
ASSERT(PageFrameOffset == __readcr3());
|
||||
PxePfn = ((PMMPTE)PXE_SELFMAP)->u.Hard.PageFrameNumber;
|
||||
PxePhysicalAddress = PxePfn << PAGE_SHIFT;
|
||||
ASSERT(PxePhysicalAddress == __readcr3());
|
||||
|
||||
/* Set directory base for the system process */
|
||||
PsGetCurrentProcess()->Pcb.DirectoryTableBase[0] = PageFrameOffset;
|
||||
PsGetCurrentProcess()->Pcb.DirectoryTableBase[0] = PxePhysicalAddress;
|
||||
|
||||
/* Enable global pages */
|
||||
__writecr4(__readcr4() | CR4_PGE);
|
||||
|
|
Loading…
Reference in a new issue