mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 11:46:50 +00:00
Un-hardcoded the 0xC0000000 value, and stuck the define in one single place both for ASM and C code. This define is 0x80000000 by default, but automatically sets itself to 0xC0000000 if 3GB is set to 1 in reactos/config. This option is turned on by default for now, because the Default heap is at 0xA0000000, which doesn't work on a non 3GB system. Lower values seem to crash Win32K but I fill figure out a solution.
svn path=/trunk/; revision=11193
This commit is contained in:
parent
8646668c58
commit
dc70244c68
7 changed files with 39 additions and 13 deletions
|
@ -42,6 +42,11 @@ MP := 0
|
|||
#
|
||||
ACPI := 0
|
||||
|
||||
#
|
||||
# whether to use a 3GB User, 1GB Kernel memory map
|
||||
#
|
||||
3GB := 1
|
||||
|
||||
#
|
||||
# Whether to build regression tests
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: rtl.h,v 1.48 2004/08/11 21:03:11 jimtabor Exp $
|
||||
/* $Id: rtl.h,v 1.49 2004/10/04 21:38:48 ion Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -173,7 +173,7 @@ typedef struct _RTL_HANDLE_TABLE
|
|||
} RTL_HANDLE_TABLE, *PRTL_HANDLE_TABLE;
|
||||
|
||||
|
||||
#define HEAP_BASE (0xa0000000)
|
||||
#define HEAP_BASE (0xA0000000)
|
||||
|
||||
/* RtlQueryProcessDebugInformation */
|
||||
#define PDI_MODULES 0x01 /* The loaded modules of the process */
|
||||
|
|
|
@ -56,6 +56,14 @@ CFLAGS += -D_DISABLE_TIDENTS
|
|||
# no native setjmp/longjmp in the kernel
|
||||
CFLAGS += -D_SEH_NO_NATIVE_NLG
|
||||
|
||||
# 3GB User Mode Memory Space support
|
||||
ifeq ($(3GB), 1)
|
||||
CFLAGS += -D__3GB__
|
||||
TARGET_BASE = 0xC0000000
|
||||
else
|
||||
TARGET_BASE = 0x80000000
|
||||
endif
|
||||
|
||||
# enable thread event pair features (NT4 only!)
|
||||
# CFLAGS += -D_ENABLE_THRDEVTPAIR
|
||||
|
||||
|
@ -539,7 +547,7 @@ TARGET_LIBS = \
|
|||
TARGET_LFLAGS = \
|
||||
-Wl,-T,ntoskrnl.lnk \
|
||||
-Wl,--subsystem,native \
|
||||
-Wl,--image-base,0xc0000000 \
|
||||
-Wl,--image-base,$(TARGET_BASE) \
|
||||
-Wl,--file-alignment,0x1000 \
|
||||
-Wl,--section-alignment,0x1000 \
|
||||
-Wl,--entry,_NtProcessStartup
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_I386_MM_H
|
||||
#define __NTOSKRNL_INCLUDE_INTERNAL_I386_MM_H
|
||||
|
||||
struct _EPROCESS;
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* Page access attributes (or these together)
|
||||
|
@ -25,8 +23,13 @@ struct _EPROCESS;
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef __3GB__
|
||||
#define KERNEL_BASE (0xC0000000)
|
||||
#else
|
||||
#define KERNEL_BASE (0x80000000)
|
||||
#endif
|
||||
|
||||
#define KERNEL_BASE (0xc0000000)
|
||||
#ifndef __ASM__
|
||||
|
||||
#if defined(__GNUC__)
|
||||
|
||||
|
@ -53,7 +56,7 @@ struct _EPROCESS;
|
|||
#error Unknown compiler for inline assembler
|
||||
#endif
|
||||
|
||||
|
||||
struct _EPROCESS;
|
||||
PULONG MmGetPageDirectory(VOID);
|
||||
VOID MiEnablePAE(PVOID* LastKernelAddress);
|
||||
|
||||
|
@ -62,4 +65,6 @@ VOID MiEnablePAE(PVOID* LastKernelAddress);
|
|||
#define PAGE_MASK(x) ((x)&(~0xfff))
|
||||
#define PAE_PAGE_MASK(x) ((x)&(~0xfffLL))
|
||||
|
||||
#endif /* ASSEMBLER */
|
||||
|
||||
#endif /* __NTOSKRNL_INCLUDE_INTERNAL_I386_MM_H */
|
||||
|
|
|
@ -2,14 +2,17 @@
|
|||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/i386/segment.h>
|
||||
#include <internal/ps.h>
|
||||
#include <internal/i386/mm.h>
|
||||
|
||||
#define KERNEL_BASE (0xc0000000)
|
||||
/* FIXME: These should be calculated from Command Line */
|
||||
#define KERNEL_PD_START (KERNEL_BASE / 0x100000) /* Page Directory Start. Only the High 3 bits. */
|
||||
#define KERNEL_PD_END ((KERNEL_BASE + 0x00400000) / 0x100000) /* Page Directory End. Only the High 3 bits. */
|
||||
|
||||
#define MULTIBOOT_HEADER_MAGIC (0x1BADB002)
|
||||
|
||||
#define MULTIBOOT_HEADER_FLAGS (0x00010003)
|
||||
|
||||
#define V2P(x) (x - 0xc0000000 + 0x200000)
|
||||
#define V2P(x) (x - KERNEL_BASE + 0x200000)
|
||||
|
||||
#ifdef MP
|
||||
|
||||
|
@ -99,7 +102,7 @@ _multiboot_entry:
|
|||
subl $__bss_start__, %ecx
|
||||
shr $2, %ecx
|
||||
movl $__bss_start__, %edi
|
||||
subl $0xc0000000, %edi
|
||||
subl $KERNEL_BASE, %edi
|
||||
addl $0x200000, %edi
|
||||
rep
|
||||
stosl
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: mminit.c,v 1.69 2004/09/26 15:07:44 hbirr Exp $
|
||||
/* $Id: mminit.c,v 1.70 2004/10/04 21:38:49 ion Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -404,8 +404,8 @@ MmInit1(ULONG FirstKrnlPhysAddr,
|
|||
|
||||
|
||||
DPRINT("Invalidating between %x and %x\n",
|
||||
LastKernelAddress, 0xc0600000);
|
||||
for (i=(LastKernelAddress); i<0xc0600000; i+=PAGE_SIZE)
|
||||
LastKernelAddress, KERNEL_BASE + 0x00600000);
|
||||
for (i=(LastKernelAddress); i<KERNEL_BASE + 0x00600000; i+=PAGE_SIZE)
|
||||
{
|
||||
MmRawDeleteVirtualMapping((PVOID)(i));
|
||||
}
|
||||
|
|
|
@ -138,7 +138,12 @@ export MS2PS = $(Q)$(TOOLS_PATH)/ms2ps/ms2ps
|
|||
|
||||
export STD_CFLAGS = -I$(PATH_TO_TOP)/include -I$(W32API_PATH)/include -pipe -march=$(OARCH) -D_M_IX86
|
||||
export STD_CPPFLAGS = $(STD_CFLAGS)
|
||||
# Check for 3GB
|
||||
ifeq ($(3GB), 1)
|
||||
export STD_ASFLAGS = -I$(PATH_TO_TOP)/include -I$(W32API_PATH)/include -D__ASM__ -D_M_IX86 -D__3GB__
|
||||
else
|
||||
export STD_ASFLAGS = -I$(PATH_TO_TOP)/include -I$(W32API_PATH)/include -D__ASM__ -D_M_IX86
|
||||
endif
|
||||
export STD_RCFLAGS = --include-dir $(PATH_TO_TOP)/include --include-dir $(W32API_PATH)/include
|
||||
export STD_NFLAGS = -f win32
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue