Move LOADER_HIGH_ZONE definition to a header file (thus removing hardcoded value from meminit.c).

NT4 boots with both 16Mb and 32Mb loading sizes. Win2003 doesn't fit into 16Mb, so ~32Mb should be used.

svn path=/branches/winldr/; revision=25531
This commit is contained in:
Aleksey Bragin
2007-01-19 15:08:05 +00:00
parent 65e2f272fc
commit 41911adc3d
3 changed files with 6 additions and 6 deletions
+5
View File
@@ -46,6 +46,11 @@ typedef struct
#define MM_SIZE_TO_PAGES(a) \
( ((a) >> MM_PAGE_SHIFT) + ((a) & MM_PAGE_MASK ? 1 : 0) )
//
// This is the zone which is used by the OS loader
//
#define LOADER_HIGH_ZONE ((16*1024*1024) >> MM_PAGE_SHIFT) //16Mb page
#endif // defined __i386__ or _PPC_
typedef struct
+1 -1
View File
@@ -352,7 +352,7 @@ ULONG MmFindAvailablePages(PVOID PageLookupTable, ULONG TotalPageCount, ULONG Pa
if (FromEnd)
{
/* Allocate "high" (from end) pages */
for (Index=/*LastFreePageHint-1*/(16*1024*1024>>12)-1; Index>0; Index--)
for (Index=/*LastFreePageHint-1*/LOADER_HIGH_ZONE-1; Index>0; Index--)
//for (Index=LastFreePageHint-1; Index>0; Index--)
{
if (RealPageLookupTable[Index].PageAllocated != LoaderFree)
-5
View File
@@ -21,11 +21,6 @@ extern ULONG TotalNLSSize;
#undef KIP0PCRADDRESS
#define KIP0PCRADDRESS 0xffdff000
//
// This is the zone which is used by the OS loader
//
#define LOADER_HIGH_ZONE ((16*1024*1024) >> MM_PAGE_SHIFT) //16Mb page
#define HYPER_SPACE_ENTRY 0x300
PCHAR MemTypeDesc[] = {