From 7ab32f0f5cf3236b79b70194e10b01583dc66a69 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Fri, 23 Sep 2011 22:24:11 +0000 Subject: [PATCH] [NTOSKRNL] Converting MmLargeStackSize from registry setting to byte value is portable code, move it out of MiInitMachineDependent svn path=/trunk/; revision=53819 --- reactos/ntoskrnl/mm/ARM3/i386/init.c | 22 ---------------------- reactos/ntoskrnl/mm/ARM3/mminit.c | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/reactos/ntoskrnl/mm/ARM3/i386/init.c b/reactos/ntoskrnl/mm/ARM3/i386/init.c index 0f91b30ce67..1168e31add9 100644 --- a/reactos/ntoskrnl/mm/ARM3/i386/init.c +++ b/reactos/ntoskrnl/mm/ARM3/i386/init.c @@ -163,28 +163,6 @@ MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock) PMMPFN Pfn1; 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 */ #if 0 if (KeFeatureBits & KF_GLOBAL_PAGE) diff --git a/reactos/ntoskrnl/mm/ARM3/mminit.c b/reactos/ntoskrnl/mm/ARM3/mminit.c index 751d521bc92..4005a59f3b8 100644 --- a/reactos/ntoskrnl/mm/ARM3/mminit.c +++ b/reactos/ntoskrnl/mm/ARM3/mminit.c @@ -2038,6 +2038,28 @@ MmArmInitSystem(IN ULONG Phase, 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 */ MiInitMachineDependent(LoaderBlock);