Author: fireball Date: Fri Jan 19 18:08:05 2007 New Revision: 25531
URL: http://svn.reactos.org/svn/reactos?rev=25531&view=rev Log: 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.
Modified: branches/winldr/include/mm.h branches/winldr/mm/meminit.c branches/winldr/windows/wlmemory.c
Modified: branches/winldr/include/mm.h URL: http://svn.reactos.org/svn/reactos/branches/winldr/include/mm.h?rev=25531&am... ============================================================================== --- branches/winldr/include/mm.h (original) +++ branches/winldr/include/mm.h Fri Jan 19 18:08:05 2007 @@ -45,6 +45,11 @@
#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_
Modified: branches/winldr/mm/meminit.c URL: http://svn.reactos.org/svn/reactos/branches/winldr/mm/meminit.c?rev=25531&am... ============================================================================== --- branches/winldr/mm/meminit.c (original) +++ branches/winldr/mm/meminit.c Fri Jan 19 18:08:05 2007 @@ -352,7 +352,7 @@ 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)
Modified: branches/winldr/windows/wlmemory.c URL: http://svn.reactos.org/svn/reactos/branches/winldr/windows/wlmemory.c?rev=25... ============================================================================== --- branches/winldr/windows/wlmemory.c (original) +++ branches/winldr/windows/wlmemory.c Fri Jan 19 18:08:05 2007 @@ -20,11 +20,6 @@ // This is needed because headers define wrong one for ReactOS #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