mirror of
https://github.com/reactos/reactos.git
synced 2024-08-21 02:43:48 +00:00
[NTOS]: Actually use calculated kernel stack size value.
[NTOS]: Define the template PTE/PDE statically, instead of doing it in code. It's faster, and saves us the trouble of not being able to use the template from point 0. Move the template setup into ARM3 instead of page.c. svn path=/trunk/; revision=45549
This commit is contained in:
parent
9f67c34652
commit
8e0c1b2fb4
|
@ -29,6 +29,9 @@
|
|||
PMEMORY_ALLOCATION_DESCRIPTOR MxFreeDescriptor;
|
||||
MEMORY_ALLOCATION_DESCRIPTOR MxOldFreeDescriptor;
|
||||
|
||||
MMPTE ValidKernelPde = {.u.Hard.Valid = 1, .u.Hard.Write = 1, .u.Hard.Dirty = 1, .u.Hard.Accessed = 1};
|
||||
MMPTE ValidKernelPte = {.u.Hard.Valid = 1, .u.Hard.Write = 1, .u.Hard.Dirty = 1, .u.Hard.Accessed = 1};
|
||||
|
||||
/* PRIVATE FUNCTIONS **********************************************************/
|
||||
|
||||
PFN_NUMBER
|
||||
|
@ -70,7 +73,7 @@ MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|||
ULONG FreePages = 0;
|
||||
PFN_NUMBER PageFrameIndex, PoolPages;
|
||||
PMMPTE StartPde, EndPde, PointerPte, LastPte;
|
||||
MMPTE TempPde = HyperTemplatePte, TempPte = HyperTemplatePte;
|
||||
MMPTE TempPde, TempPte;
|
||||
PVOID NonPagedPoolExpansionVa;
|
||||
ULONG OldCount, L2Associativity;
|
||||
PFN_NUMBER FreePage, FreePageCount, PagesLeft, BasePage, PageCount;
|
||||
|
@ -97,10 +100,17 @@ MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|||
if (MmLargeStackSize < KERNEL_STACK_SIZE) MmLargeStackSize = KERNEL_STACK_SIZE;
|
||||
}
|
||||
|
||||
//
|
||||
// The large kernel stack is cutomizable, but use default value for now
|
||||
//
|
||||
MmLargeStackSize = KERNEL_LARGE_STACK_SIZE;
|
||||
/* Check for global bit */
|
||||
if (KeFeatureBits & KF_GLOBAL_PAGE)
|
||||
{
|
||||
/* Set it on the template PTE and PDE */
|
||||
ValidKernelPte.u.Hard.Global = TRUE;
|
||||
ValidKernelPde.u.Hard.Global = TRUE;
|
||||
}
|
||||
|
||||
/* Now templates are ready */
|
||||
TempPte = ValidKernelPte;
|
||||
TempPde = ValidKernelPde;
|
||||
|
||||
//
|
||||
// Set CR3 for the system process
|
||||
|
|
|
@ -1012,12 +1012,6 @@ MmInitGlobalKernelPageDirectory(VOID)
|
|||
|
||||
DPRINT("MmInitGlobalKernelPageDirectory()\n");
|
||||
|
||||
//
|
||||
// Setup template
|
||||
//
|
||||
HyperTemplatePte.u.Long = (PA_PRESENT | PA_READWRITE | PA_DIRTY | PA_ACCESSED);
|
||||
if (Ke386GlobalPagesEnabled) HyperTemplatePte.u.Long |= PA_GLOBAL;
|
||||
|
||||
for (i = ADDR_TO_PDE_OFFSET(MmSystemRangeStart); i < 1024; i++)
|
||||
{
|
||||
if (i != ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) &&
|
||||
|
|
Loading…
Reference in a new issue