Fix some wrong Mm definitions and sync up with proper ones.

svn path=/trunk/; revision=12714
This commit is contained in:
Alex Ionescu 2005-01-02 05:36:43 +00:00
parent 3be1a720e8
commit 9b48875031
12 changed files with 44 additions and 36 deletions

View file

@ -17,20 +17,6 @@
*/
#define NR_PRIORITY_LEVELS (32)
/*
* Types of memory to allocate
*/
enum
{
NonPagedPool,
PagedPool,
NonPagedPoolMustSucceed,
NonPagedPoolCacheAligned = 4,
PagedPoolCacheAligned,
NonPagedPoolCacheAlignedMustS,
};
/*
* PURPOSE: Object attributes
*/

View file

@ -5,6 +5,24 @@
typedef ULONG INTERLOCKED_RESULT;
typedef enum _POOL_TYPE {
NonPagedPool,
PagedPool,
NonPagedPoolMustSucceed,
DontUseThisType,
NonPagedPoolCacheAligned,
PagedPoolCacheAligned,
NonPagedPoolCacheAlignedMustS,
MaxPoolType,
NonPagedPoolSession = 32,
PagedPoolSession,
NonPagedPoolMustSucceedSession,
DontUseThisTypeSession,
NonPagedPoolCacheAlignedSession,
PagedPoolCacheAlignedSession,
NonPagedPoolCacheAlignedMustSSession
} POOL_TYPE;
typedef enum _WORK_QUEUE_TYPE {
CriticalWorkQueue,
DelayedWorkQueue,

View file

@ -1,14 +1,14 @@
#ifndef _INCLUDE_DDK_MMFUNCS_H
#define _INCLUDE_DDK_MMFUNCS_H
/* $Id: mmfuncs.h,v 1.24 2004/10/22 20:51:44 ekohl Exp $ */
/* $Id$ */
/* MEMORY MANAGMENT ******************************************************/
#ifdef __NTOSKRNL__
extern PVOID EXPORTED MmUserProbeAddress;
extern ULONG EXPORTED MmUserProbeAddress;
extern PVOID EXPORTED MmHighestUserAddress;
#else
extern PVOID IMPORTED MmUserProbeAddress;
extern ULONG IMPORTED MmUserProbeAddress;
extern PVOID IMPORTED MmHighestUserAddress;
#endif
@ -632,8 +632,8 @@ MmSecureVirtualMemory (
BOOLEAN
STDCALL
MmSetAddressRangeModified (
DWORD Unknown0,
DWORD Unknown1
IN PVOID Address,
IN ULONG Length
);
NTSTATUS
STDCALL

View file

@ -1,4 +1,4 @@
/* $Id: mmtypes.h,v 1.21 2004/12/22 05:06:59 royce Exp $ */
/* $Id$ */
#ifndef _INCLUDE_DDK_MMTYPES_H
#define _INCLUDE_DDK_MMTYPES_H
@ -48,6 +48,11 @@
#define MDL_ALLOCATED_MUST_SUCCEED (0x4000)
#define MDL_64_BIT_VA (0x8000)
typedef enum _MM_PAGE_PRIORITY {
LowPagePriority,
NormalPagePriority = 16,
HighPagePriority = 32
} MM_PAGE_PRIORITY;
typedef struct _MDL
/*

View file

@ -1,4 +1,4 @@
/* $Id: ntddk.h,v 1.38 2003/12/30 17:39:38 fireball Exp $
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -62,8 +62,8 @@ extern "C" {
#include <ddk/mmtypes.h>
#include <ddk/potypes.h>
#include <ddk/pnptypes.h>
#include <ddk/iotypes.h>
#include <ddk/extypes.h>
#include <ddk/iotypes.h>
#include <ddk/pstypes.h>
#include <ntos/ldrtypes.h>
#include <ntos/zwtypes.h>

View file

@ -12,7 +12,6 @@ typedef CCHAR KPROCESSOR_MODE;
typedef UCHAR KIRQL;
typedef KIRQL* PKIRQL;
typedef ULONG IO_ALLOCATION_ACTION;
typedef ULONG POOL_TYPE;
typedef ULONG TIMER_TYPE;
typedef ULONG MM_SYSTEM_SIZE;
typedef ULONG LOCK_OPERATION;

View file

@ -1,4 +1,4 @@
/* $Id: mdl.c,v 1.69 2004/10/22 20:38:22 ekohl Exp $
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -814,7 +814,7 @@ MmMapLockedPagesSpecifyCache ( IN PMDL Mdl,
IN MEMORY_CACHING_TYPE CacheType,
IN PVOID BaseAddress,
IN ULONG BugCheckOnFailure,
IN ULONG Priority )
IN MM_PAGE_PRIORITY Priority )
{
UNIMPLEMENTED;
return MmMapLockedPages (Mdl, AccessMode);

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: mm.c,v 1.80 2004/11/13 13:09:07 weiden Exp $
/* $Id$
*
* COPYRIGHT: See COPYING in the top directory
* PROJECT: ReactOS kernel
@ -38,7 +38,7 @@
extern MODULE_OBJECT NtoskrnlModuleObject;
extern MODULE_OBJECT HalModuleObject;
PVOID EXPORTED MmUserProbeAddress = NULL;
ULONG EXPORTED MmUserProbeAddress = 0;
PVOID EXPORTED MmHighestUserAddress = NULL;
PBOOLEAN EXPORTED Mm64BitPhysicalAddress = FALSE;
PVOID EXPORTED MmSystemRangeStart = NULL;
@ -490,8 +490,8 @@ MmGrowKernelStack (
BOOLEAN
STDCALL
MmSetAddressRangeModified (
DWORD Unknown0,
DWORD Unknown1
IN PVOID Address,
IN ULONG Length
)
{
UNIMPLEMENTED;

View file

@ -327,7 +327,7 @@ MmInit1(ULONG FirstKrnlPhysAddr,
* FIXME: Set this based on the system command line
*/
MmSystemRangeStart = (PVOID)KERNEL_BASE; // 0xC0000000
MmUserProbeAddress = (PVOID)0x7fff0000;
MmUserProbeAddress = 0x7fff0000;
MmHighestUserAddress = (PVOID)0x7ffeffff;
/*

View file

@ -1,4 +1,4 @@
/* $Id: npool.c,v 1.93 2004/11/28 22:06:25 blight Exp $
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -1537,7 +1537,7 @@ VOID STDCALL ExFreeNonPagedPool (PVOID block)
}
PVOID STDCALL
ExAllocateNonPagedPoolWithTag(ULONG Type, ULONG Size, ULONG Tag, PVOID Caller)
ExAllocateNonPagedPoolWithTag(POOL_TYPE Type, ULONG Size, ULONG Tag, PVOID Caller)
{
#ifdef WHOLE_PAGE_ALLOCATIONS
PVOID block;

View file

@ -1,4 +1,4 @@
/* $Id: pool.c,v 1.36 2004/12/11 00:13:37 royce Exp $
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -121,7 +121,7 @@ ExAllocatePool (POOL_TYPE PoolType, ULONG NumberOfBytes)
* @implemented
*/
PVOID STDCALL
ExAllocatePoolWithTag (ULONG PoolType, ULONG NumberOfBytes, ULONG Tag)
ExAllocatePoolWithTag (POOL_TYPE PoolType, ULONG NumberOfBytes, ULONG Tag)
{
PVOID Block;

View file

@ -1,4 +1,4 @@
/* $Id: process.c,v 1.160 2004/12/24 17:07:00 navaraf Exp $
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -787,7 +787,7 @@ NtCreateProcess(OUT PHANDLE ProcessHandle,
MmLockAddressSpace(&Process->AddressSpace);
/* Protect the highest 64KB of the process address space */
BaseAddress = MmUserProbeAddress;
BaseAddress = (PVOID)MmUserProbeAddress;
Status = MmCreateMemoryArea(Process,
&Process->AddressSpace,
MEMORY_AREA_NO_ACCESS,