mirror of
https://github.com/reactos/reactos.git
synced 2025-06-26 07:59:43 +00:00
[NTOSKRNL]
Converting MmLargeStackSize from registry setting to byte value is portable code, move it out of MiInitMachineDependent svn path=/trunk/; revision=53819
This commit is contained in:
parent
551ca94879
commit
7ab32f0f5c
2 changed files with 22 additions and 22 deletions
|
@ -163,28 +163,6 @@ MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||||
PMMPFN Pfn1;
|
PMMPFN Pfn1;
|
||||||
ULONG Flags;
|
ULONG Flags;
|
||||||
|
|
||||||
/* Check for kernel stack size that's too big */
|
|
||||||
if (MmLargeStackSize > (KERNEL_LARGE_STACK_SIZE / _1KB))
|
|
||||||
{
|
|
||||||
/* Sanitize to default value */
|
|
||||||
MmLargeStackSize = KERNEL_LARGE_STACK_SIZE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Take the registry setting, and convert it into bytes */
|
|
||||||
MmLargeStackSize *= _1KB;
|
|
||||||
|
|
||||||
/* Now align it to a page boundary */
|
|
||||||
MmLargeStackSize = PAGE_ROUND_UP(MmLargeStackSize);
|
|
||||||
|
|
||||||
/* Sanity checks */
|
|
||||||
ASSERT(MmLargeStackSize <= KERNEL_LARGE_STACK_SIZE);
|
|
||||||
ASSERT((MmLargeStackSize & (PAGE_SIZE - 1)) == 0);
|
|
||||||
|
|
||||||
/* Make sure it's not too low */
|
|
||||||
if (MmLargeStackSize < KERNEL_STACK_SIZE) MmLargeStackSize = KERNEL_STACK_SIZE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for global bit */
|
/* Check for global bit */
|
||||||
#if 0
|
#if 0
|
||||||
if (KeFeatureBits & KF_GLOBAL_PAGE)
|
if (KeFeatureBits & KF_GLOBAL_PAGE)
|
||||||
|
|
|
@ -2038,6 +2038,28 @@ MmArmInitSystem(IN ULONG Phase,
|
||||||
MI_MIN_ALLOCATION_FRAGMENT);
|
MI_MIN_ALLOCATION_FRAGMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check for kernel stack size that's too big */
|
||||||
|
if (MmLargeStackSize > (KERNEL_LARGE_STACK_SIZE / _1KB))
|
||||||
|
{
|
||||||
|
/* Sanitize to default value */
|
||||||
|
MmLargeStackSize = KERNEL_LARGE_STACK_SIZE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Take the registry setting, and convert it into bytes */
|
||||||
|
MmLargeStackSize *= _1KB;
|
||||||
|
|
||||||
|
/* Now align it to a page boundary */
|
||||||
|
MmLargeStackSize = PAGE_ROUND_UP(MmLargeStackSize);
|
||||||
|
|
||||||
|
/* Sanity checks */
|
||||||
|
ASSERT(MmLargeStackSize <= KERNEL_LARGE_STACK_SIZE);
|
||||||
|
ASSERT((MmLargeStackSize & (PAGE_SIZE - 1)) == 0);
|
||||||
|
|
||||||
|
/* Make sure it's not too low */
|
||||||
|
if (MmLargeStackSize < KERNEL_STACK_SIZE) MmLargeStackSize = KERNEL_STACK_SIZE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Initialize the platform-specific parts */
|
/* Initialize the platform-specific parts */
|
||||||
MiInitMachineDependent(LoaderBlock);
|
MiInitMachineDependent(LoaderBlock);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue