- Don't use EXPORTED
- Define MM_HIGHEST_VAD_ADDRESS; this seems to be the actual value of
the PEB and represents the highest address that a VAD can be on Windows
(and the PEB is the highest vad). This define shoudl probably go in mm.h
since I believe the checks and code in NtXxxVirtualMemory should use
-it- instead of MM_HIGHEST_USER_ADDRESS.
Modified: trunk/reactos/ntoskrnl/cc/copy.c
Modified: trunk/reactos/ntoskrnl/ex/event.c
Modified: trunk/reactos/ntoskrnl/ex/profile.c
Modified: trunk/reactos/ntoskrnl/ex/win32k.c
Modified: trunk/reactos/ntoskrnl/io/adapter.c
Modified: trunk/reactos/ntoskrnl/io/disk.c
Modified: trunk/reactos/ntoskrnl/io/driver.c
Modified: trunk/reactos/ntoskrnl/kd/kdmain.c
Modified: trunk/reactos/ntoskrnl/ke/clock.c
Modified: trunk/reactos/ntoskrnl/ke/main.c
Modified: trunk/reactos/ntoskrnl/mm/mm.c
Modified: trunk/reactos/ntoskrnl/mm/process.c
Modified: trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/ps/job.c
Modified: trunk/reactos/ntoskrnl/ps/process.c
Modified: trunk/reactos/ntoskrnl/ps/thread.c
_____
Modified: trunk/reactos/ntoskrnl/cc/copy.c
--- trunk/reactos/ntoskrnl/cc/copy.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/cc/copy.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -29,9 +29,9 @@
#error Unknown compiler for alloca intrinsic stack allocation
"function"
#endif
-ULONG EXPORTED CcFastMdlReadWait;
-ULONG EXPORTED CcFastReadNotPossible;
-ULONG EXPORTED CcFastReadWait;
+ULONG CcFastMdlReadWait;
+ULONG CcFastReadNotPossible;
+ULONG CcFastReadWait;
ULONG CcFastReadNoWait;
ULONG CcFastReadResourceMiss;
_____
Modified: trunk/reactos/ntoskrnl/ex/event.c
--- trunk/reactos/ntoskrnl/ex/event.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/ex/event.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -16,7 +16,7 @@
/* GLOBALS
*******************************************************************/
-POBJECT_TYPE EXPORTED ExEventObjectType = NULL;
+POBJECT_TYPE ExEventObjectType = NULL;
static GENERIC_MAPPING ExpEventMapping = {
STANDARD_RIGHTS_READ | SYNCHRONIZE | EVENT_QUERY_STATE,
_____
Modified: trunk/reactos/ntoskrnl/ex/profile.c
--- trunk/reactos/ntoskrnl/ex/profile.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/ex/profile.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -13,7 +13,7 @@
#include <ntoskrnl.h>
#include <internal/debug.h>
-/* This structure is a *GUESS* -- Alex */
+/* FIXME: NDK This structure is a *GUESS* -- Alex */
typedef struct _EPROFILE {
PEPROCESS Process;
PVOID ImageBase;
@@ -30,7 +30,7 @@
/* GLOBALS
*******************************************************************/
-POBJECT_TYPE EXPORTED ExProfileObjectType = NULL;
+POBJECT_TYPE ExProfileObjectType = NULL;
static KMUTEX ExpProfileMutex;
_____
Modified: trunk/reactos/ntoskrnl/ex/win32k.c
--- trunk/reactos/ntoskrnl/ex/win32k.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/ex/win32k.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -15,8 +15,8 @@
/* DATA
**********************************************************************/
-POBJECT_TYPE EXPORTED ExWindowStationObjectType = NULL;
-POBJECT_TYPE EXPORTED ExDesktopObjectType = NULL;
+POBJECT_TYPE ExWindowStationObjectType = NULL;
+POBJECT_TYPE ExDesktopObjectType = NULL;
static GENERIC_MAPPING ExpWindowStationMapping =
{
_____
Modified: trunk/reactos/ntoskrnl/io/adapter.c
--- trunk/reactos/ntoskrnl/io/adapter.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/io/adapter.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -15,9 +15,9 @@
/* DATA
**********************************************************************/
-POBJECT_TYPE EXPORTED IoAdapterObjectType = NULL; /* FIXME */
-POBJECT_TYPE EXPORTED IoDeviceHandlerObjectType = NULL; /* FIXME
*/
-ULONG EXPORTED IoDeviceHandlerObjectSize = 0; /* FIXME */
+POBJECT_TYPE IoAdapterObjectType = NULL; /* FIXME */
+POBJECT_TYPE IoDeviceHandlerObjectType = NULL; /* FIXME */
+ULONG IoDeviceHandlerObjectSize = 0; /* FIXME */
/* FUNCTIONS
*****************************************************************/
_____
Modified: trunk/reactos/ntoskrnl/io/disk.c
--- trunk/reactos/ntoskrnl/io/disk.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/io/disk.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -64,7 +64,7 @@
EZ_Drive
} DISK_MANAGER;
-HAL_DISPATCH EXPORTED HalDispatchTable =
+HAL_DISPATCH HalDispatchTable =
{
HAL_DISPATCH_VERSION,
(pHalQuerySystemInformation) NULL, // HalQuerySystemInformation
@@ -90,7 +90,7 @@
(pHalMirrorVerify) NULL //HalMirrorVerify;
};
-HAL_PRIVATE_DISPATCH EXPORTED HalPrivateDispatchTable =
+HAL_PRIVATE_DISPATCH HalPrivateDispatchTable =
{
HAL_PRIVATE_DISPATCH_VERSION
};
_____
Modified: trunk/reactos/ntoskrnl/io/driver.c
--- trunk/reactos/ntoskrnl/io/driver.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/io/driver.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -15,7 +15,7 @@
#include <internal/debug.h>
/* ke/main.c */
-extern LOADER_PARAMETER_BLOCK EXPORTED KeLoaderBlock;
+extern LOADER_PARAMETER_BLOCK KeLoaderBlock;
extern ULONG KeTickCount;
extern BOOLEAN SetupMode;
@@ -73,7 +73,7 @@
static UNICODE_STRING IopHardwareDatabaseKey =
RTL_CONSTANT_STRING(L"\\REGISTRY\\MACHINE\\HARDWARE\\DESCRIPTION\\SYSTEM
");
-POBJECT_TYPE EXPORTED IoDriverObjectType = NULL;
+POBJECT_TYPE IoDriverObjectType = NULL;
/* DECLARATIONS
***************************************************************/
_____
Modified: trunk/reactos/ntoskrnl/kd/kdmain.c
--- trunk/reactos/ntoskrnl/kd/kdmain.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/kd/kdmain.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -13,11 +13,11 @@
/* VARIABLES
***************************************************************/
-BOOLEAN EXPORTED KdDebuggerEnabled = FALSE;
-BOOLEAN EXPORTED KdEnteredDebugger = FALSE;
-BOOLEAN EXPORTED KdDebuggerNotPresent = TRUE;
-BOOLEAN EXPORTED KiEnableTimerWatchdog = FALSE;
-ULONG EXPORTED KiBugCheckData;
+BOOLEAN KdDebuggerEnabled = FALSE;
+BOOLEAN KdEnteredDebugger = FALSE;
+BOOLEAN KdDebuggerNotPresent = TRUE;
+BOOLEAN KiEnableTimerWatchdog = FALSE;
+ULONG KiBugCheckData;
BOOLEAN KdpBreakPending;
VOID STDCALL PspDumpThreads(BOOLEAN SystemThreads);
_____
Modified: trunk/reactos/ntoskrnl/ke/clock.c
--- trunk/reactos/ntoskrnl/ke/clock.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/ke/clock.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -52,14 +52,8 @@
*/
#define CLOCK_INCREMENT (100000)
-#ifdef __GNUC__
-ULONG EXPORTED KeMaximumIncrement = 100000;
-ULONG EXPORTED KeMinimumIncrement = 100000;
-#else
-/* Microsoft-style declarations */
-EXPORTED ULONG KeMaximumIncrement = 100000;
-EXPORTED ULONG KeMinimumIncrement = 100000;
-#endif
+ULONG KeMaximumIncrement = 100000;
+ULONG KeMinimumIncrement = 100000;
#define MICROSECONDS_PER_TICK (10000)
#define TICKS_TO_CALIBRATE (1)
_____
Modified: trunk/reactos/ntoskrnl/ke/main.c
--- trunk/reactos/ntoskrnl/ke/main.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/ke/main.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -22,15 +22,15 @@
ULONG NtMajorVersion = 5;
ULONG NtMinorVersion = 0;
ULONG NtOSCSDVersion = BUILD_OSCSDVERSION(6, 0);
-EXPORTED ULONG NtBuildNumber = KERNEL_VERSION_BUILD;
-EXPORTED ULONG NtGlobalFlag = 0;
-EXPORTED CHAR KeNumberProcessors;
-EXPORTED KAFFINITY KeActiveProcessors = 1;
-EXPORTED LOADER_PARAMETER_BLOCK KeLoaderBlock;
-EXPORTED ULONG KeDcacheFlushCount = 0;
-EXPORTED ULONG KeIcacheFlushCount = 0;
-EXPORTED ULONG KiDmaIoCoherency = 0; /* RISC Architectures only */
-EXPORTED ULONG InitSafeBootMode = 0; /* KB83764 */
+ULONG NtBuildNumber = KERNEL_VERSION_BUILD;
+ULONG NtGlobalFlag = 0;
+CHAR KeNumberProcessors;
+KAFFINITY KeActiveProcessors = 1;
+LOADER_PARAMETER_BLOCK KeLoaderBlock;
+ULONG KeDcacheFlushCount = 0;
+ULONG KeIcacheFlushCount = 0;
+ULONG KiDmaIoCoherency = 0; /* RISC Architectures only */
+ULONG InitSafeBootMode = 0; /* KB83764 */
LOADER_MODULE KeLoaderModules[64];
static CHAR KeLoaderModuleStrings[64][256];
_____
Modified: trunk/reactos/ntoskrnl/mm/mm.c
--- trunk/reactos/ntoskrnl/mm/mm.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/mm/mm.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -18,10 +18,10 @@
extern LDR_DATA_TABLE_ENTRY NtoskrnlModuleObject;
extern LDR_DATA_TABLE_ENTRY HalModuleObject;
-ULONG EXPORTED MmUserProbeAddress = 0;
-PVOID EXPORTED MmHighestUserAddress = NULL;
-PBOOLEAN EXPORTED Mm64BitPhysicalAddress = FALSE;
-PVOID EXPORTED MmSystemRangeStart = NULL;
+ULONG MmUserProbeAddress = 0;
+PVOID MmHighestUserAddress = NULL;
+PBOOLEAN Mm64BitPhysicalAddress = FALSE;
+PVOID MmSystemRangeStart = NULL;
MM_STATS MmStats;
_____
Modified: trunk/reactos/ntoskrnl/mm/process.c
--- trunk/reactos/ntoskrnl/mm/process.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/mm/process.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -18,6 +18,9 @@
extern ULONG NtOSCSDVersion;
extern ULONG NtGlobalFlag;
+#define MM_HIGHEST_VAD_ADDRESS \
+ (PVOID)((ULONG_PTR)MM_HIGHEST_USER_ADDRESS - (16 * PAGE_SIZE))
+
/* FUNCTIONS
*****************************************************************/
PVOID
@@ -202,8 +205,8 @@
DPRINT("MmCreatePeb\n");
/* Allocate the PEB */
- Peb = MiCreatePebOrTeb(Process, (PVOID)PEB_BASE);
- if (Peb != (PVOID)PEB_BASE)
+ Peb = MiCreatePebOrTeb(Process, MM_HIGHEST_VAD_ADDRESS);
+ if (Peb != MM_HIGHEST_VAD_ADDRESS)
{
DPRINT1("MiCreatePebOrTeb() returned %x\n", Peb);
return STATUS_UNSUCCESSFUL;
@@ -345,7 +348,7 @@
}
/* Allocate the TEB */
- Teb = MiCreatePebOrTeb(Process, (PVOID)TEB_BASE);
+ Teb = MiCreatePebOrTeb(Process, MM_HIGHEST_VAD_ADDRESS);
/* Initialize the PEB */
RtlZeroMemory(Teb, sizeof(TEB));
_____
Modified: trunk/reactos/ntoskrnl/mm/section.c
--- trunk/reactos/ntoskrnl/mm/section.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/mm/section.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -66,7 +66,7 @@
/* GLOBALS
*******************************************************************/
-POBJECT_TYPE EXPORTED MmSectionObjectType = NULL;
+POBJECT_TYPE MmSectionObjectType = NULL;
static GENERIC_MAPPING MmpSectionMapping = {
STANDARD_RIGHTS_READ | SECTION_MAP_READ | SECTION_QUERY,
_____
Modified: trunk/reactos/ntoskrnl/ps/job.c
--- trunk/reactos/ntoskrnl/ps/job.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/ps/job.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -18,7 +18,7 @@
/* GLOBALS
*******************************************************************/
-POBJECT_TYPE EXPORTED PsJobType = NULL;
+POBJECT_TYPE PsJobType = NULL;
LIST_ENTRY PsJobListHead;
static FAST_MUTEX PsJobListLock;
_____
Modified: trunk/reactos/ntoskrnl/ps/process.c
--- trunk/reactos/ntoskrnl/ps/process.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/ps/process.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -16,9 +16,9 @@
/* GLOBALS
******************************************************************/
-PEPROCESS EXPORTED PsInitialSystemProcess = NULL;
+PEPROCESS PsInitialSystemProcess = NULL;
PEPROCESS PsIdleProcess = NULL;
-POBJECT_TYPE EXPORTED PsProcessType = NULL;
+POBJECT_TYPE PsProcessType = NULL;
extern PHANDLE_TABLE PspCidTable;
EPROCESS_QUOTA_BLOCK PspDefaultQuotaBlock;
_____
Modified: trunk/reactos/ntoskrnl/ps/thread.c
--- trunk/reactos/ntoskrnl/ps/thread.c 2005-11-22 01:48:27 UTC (rev
19444)
+++ trunk/reactos/ntoskrnl/ps/thread.c 2005-11-22 02:30:18 UTC (rev
19445)
@@ -21,7 +21,7 @@
extern PVOID PspSystemDllEntryPoint;
extern PHANDLE_TABLE PspCidTable;
-POBJECT_TYPE EXPORTED PsThreadType = NULL;
+POBJECT_TYPE PsThreadType = NULL;
/* FUNCTIONS
***************************************************************/