-# $Id: makefile,v 1.6 2000/03/08 21:23:13 jfilby Exp $
+# $Id: makefile,v 1.7 2000/04/02 13:32:43 ea Exp $
#
#
-BASE_CFLAGS = -I../../../include
-
-MP_OBJECTS = vgamp.o vgamp.coff ../../../ntoskrnl/ntoskrnl.a ../vidport/vidport.a
-
-all: vgamp.sys
-
-.phony: all
-
+all:
+ make -C display
+ make -C miniport
+
clean:
- - $(RM) *.o
- - $(RM) junk.tmp
- - $(RM) base.tmp
- - $(RM) temp.exp
- - $(RM) *.sys
- - $(RM) *.coff
-
-.phony: clean
-
-vgamp.sys: $(MP_OBJECTS)
- $(CC) \
- -specs=../../svc_specs \
- -mdll \
- -o junk.tmp \
- -Wl,--defsym,_end=end \
- -Wl,--defsym,_edata=__data_end__ \
- -Wl,--defsym,_etext=etext \
- -Wl,--base-file,base.tmp \
- $(MP_OBJECTS)
- - $(RM) junk.tmp
- $(DLLTOOL) \
- --dllname vgamp.sys \
- --base-file base.tmp \
- --output-exp temp.exp \
- --kill-at
- - $(RM) base.tmp
- $(CC) \
- --verbose \
- -Wl,--image-base,0x10000 \
- -Wl,-e,_DriverEntry@8 \
- -Wl,temp.exp \
- -specs=../../svc_specs \
- -mdll \
- -o vgamp.sys \
- $(MP_OBJECTS)
- - $(RM) temp.exp
-
-floppy: $(FLOPPY_DIR)/drivers/vgamp.sys
-
-$(FLOPPY_DIR)/drivers/vgamp.sys: vgamp.sys
-ifeq ($(DOSCLI),yes)
- $(CP) vgamp.sys $(FLOPPY_DIR)\drivers\vgamp.sys
-else
- $(CP) vgamp.sys $(FLOPPY_DIR)/drivers/vgamp.sys
-endif
-
-dist: ../../../$(DIST_DIR)/drivers/vgamp.sys
-
-../../../$(DIST_DIR)/drivers/vgamp.sys: vgamp.sys
-ifeq ($(DOSCLI),yes)
- $(CP) vgamp.sys ..\..\..\$(DIST_DIR)\drivers\vgamp.sys
-else
- $(CP) vgamp.sys ../../../$(DIST_DIR)/drivers/vgamp.sys
-endif
-
-include ../../../rules.mak
+ make -C display clean
+ make -C miniport clean
+#ifndef _INCLUDE_DDK_MMFUNCS_H
+#define _INCLUDE_DDK_MMFUNCS_H
+/* $Id: mmfuncs.h,v 1.5 2000/04/02 13:32:38 ea Exp $ */
/* MEMORY MANAGMENT ******************************************************/
#include <internal/mmhal.h>
-BOOLEAN MmIsNonPagedSystemAddressValid(PVOID VirtualAddress);
-BOOLEAN MmIsThisAnNtAsSystem(VOID);
-
#define PAGE_ROUND_UP(x) ( (((ULONG)x)%PAGESIZE) ? ((((ULONG)x)&(~0xfff))+0x1000) : ((ULONG)x) )
#define PAGE_ROUND_DOWN(x) (((ULONG)x)&(~0xfff))
*/
#define BYTES_TO_PAGES(size) (?)
+DWORD
+STDCALL
+MmAdjustWorkingSetSize (
+ DWORD Unknown0,
+ DWORD Unknown1,
+ DWORD Unknown2
+ );
PVOID
STDCALL
MmAllocateContiguousMemory (
* ARGUMENTS:
* MemoryDescriptorList = MDL to fill
*/
-VOID MmBuildMdlForNonPagedPool(PMDL MemoryDescriptorList);
-
+VOID
+STDCALL
+MmBuildMdlForNonPagedPool (
+ PMDL MemoryDescriptorList
+ );
+BOOLEAN
+STDCALL
+MmCanFileBeTruncated (
+ IN PSECTION_OBJECT_POINTERS SectionObjectPointer,
+ IN PLARGE_INTEGER NewFileSize
+ );
/*
* FUNCTION: Allocates and initializes an MDL
* ARGUMENTS:
* Length = Length in bytes of the buffer
* RETURNS: A pointer to the initalized MDL
*/
-PMDL MmCreateMdl(PMDL MemoryDescriptorList, PVOID Base, ULONG Length);
+PMDL
+STDCALL
+MmCreateMdl (
+ PMDL MemoryDescriptorList,
+ PVOID Base,
+ ULONG Length
+ );
+#if 0
+NTSTATUS
+STDCALL
+MmCreateSection (
+ OUT PSECTION_OBJECT * SectionObject,
+ IN ACCESS_MASK DesiredAccess,
+ IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
+ IN PLARGE_INTEGER MaximumSize,
+ IN ULONG SectionPageProtection,
+ IN ULONG AllocationAttributes,
+ IN HANDLE FileHandle OPTIONAL,
+ IN PFILE_OBJECT File OPTIONAL
+ );
+#endif
+DWORD
+STDCALL
+MmDbgTranslatePhysicalAddress (
+ DWORD Unknown0,
+ DWORD Unknown1
+ );
+BOOLEAN
+STDCALL
+MmDisableModifiedWriteOfSection (
+ DWORD Unknown0
+ );
+BOOLEAN
+STDCALL
+MmFlushImageSection (
+ IN PSECTION_OBJECT_POINTERS SectionObjectPointer,
+ IN MMFLUSH_TYPE FlushType
+ );
+BOOLEAN
+STDCALL
+MmForceSectionClosed (
+ DWORD Unknown0,
+ DWORD Unknown1
+ );
VOID
STDCALL
MmFreeContiguousMemory (
* Mdl = the mdl
* RETURNS: Size of the buffer
*/
-ULONG MmGetMdlByteCount(PMDL Mdl);
+#define MmGetMdlByteCount(Mdl) ((Mdl)->ByteCount)
/*
* FUNCTION: Returns the byte offset within a page of the buffer described
* Mdl = the mdl
* RETURNS: The offset in bytes
*/
-ULONG MmGetMdlByteOffset(PMDL Mdl);
+#define MmGetMdlByteOffset(Mdl) ((Mdl)->ByteOffset)
/*
* FUNCTION: Returns the initial virtual address for a buffer described
* Mdl = the mdl
* RETURNS: The initial virtual address
*/
-PVOID MmGetMdlVirtualAddress(PMDL Mdl);
+#define MmGetMdlVirtualAddress(Mdl) \
+ ((PVOID) ((PCHAR) (Mdl)->StartVa + (Mdl)->ByteOffset))
/*
* FUNCTION: Returns the physical address corresponding to a given valid
* BaseAddress = the virtual address
* RETURNS: The physical address
*/
-PHYSICAL_ADDRESS MmGetPhysicalAddress(PVOID BaseAddress);
+PHYSICAL_ADDRESS
+STDCALL
+MmGetPhysicalAddress (
+ IN PVOID BaseAddress
+ );
+#define MmGetProcedureAddress(Address) (Address)
/*
* FUNCTION: Maps the physical pages described by an MDL into system space
* RETURNS: The base system address for the mapped buffer
*/
PVOID MmGetSystemAddressForMdl(PMDL Mdl);
-
+NTSTATUS
+STDCALL
+MmGrowKernelStack (
+ DWORD Unknown0
+ );
+#ifdef __NTOSKRNL__
+extern PVOID EXPORTED MmHighestUserAddress;
+#else
+extern PVOID IMPORTED MmHighestUserAddress;
+#endif
/*
* FUNCTION: Initalizes an mdl
* ARGUMENTS:
* VirtualAddress = address to be check
* RETURNS: TRUE if an access would be valid
*/
-BOOLEAN MmIsAddressValid(PVOID VirtualAddress);
-
+BOOLEAN
+STDCALL
+MmIsAddressValid (
+ IN PVOID VirtualAddress
+ );
+BOOLEAN
+STDCALL
+MmIsNonPagedSystemAddressValid (
+ IN PVOID VirtualAddress
+ );
+BOOLEAN
+STDCALL
+MmIsRecursiveIoFault (
+ VOID
+ );
/*
* FUNCTION: Checks if the current platform is a workstation or a server
* RETURNS: If the system is a server returns true
* NOTE: Drivers can use this as an estimate of the likely resources
* available
*/
-BOOLEAN MmIsThisAnAsSystem(VOID);
-
+BOOLEAN
+STDCALL
+MmIsThisAnNtAsSystem (
+ VOID
+ );
/*
* FUNCTION: Locks a section of the driver's code into memory
* ARGUMENTS:
* AddressWithinSection = Any address in the region
* RETURNS: A handle to the region
*/
-PVOID MmLockPagableCodeSection(PVOID AddressWithinSection);
+#define MmLockPagableCodeSection(Address) MmLockPagableDataSection(Address)
/*
* FUNCTION: Locks a section of the driver's data into memory
* AddressWithinSection = Any address in the region
* RETURNS: A handle to the region
*/
-PVOID MmLockPagableDataSection(PVOID AddressWithinSection);
-
+PVOID
+STDCALL
+MmLockPagableDataSection (
+ PVOID AddressWithinSection
+ );
+PVOID
+STDCALL
+MmLockPagableImageSection (
+ PVOID AddressWithinSection
+ );
/*
* FUNCTION: Locks a section of memory
* ARGUMENTS:
* ImageSectionHandle = handle returned from MmLockPagableCodeSection
* or MmLockPagableDataSection
*/
-VOID MmLockPagableSectionByHandle(PVOID ImageSectionHandle);
-
+VOID
+STDCALL
+MmLockPagableSectionByHandle (
+ PVOID ImageSectionHandle
+ );
PVOID
STDCALL
MmMapIoSpace (
ULONG NumberOfBytes,
BOOLEAN CacheEnable
);
-VOID
-STDCALL
-MmUnmapIoSpace (
- PVOID BaseAddress,
- ULONG NumberOfBytes
- );
/*
* FUNCTION: Maps the pages described by a given MDL
* ARGUMENTS:
* AccessMode = Access mode in which to map the MDL
* RETURNS: The base virtual address which maps the buffer
*/
-PVOID MmMapLockedPages(PMDL MemoryDescriptorList, KPROCESSOR_MODE AccessMode);
+PVOID
+STDCALL
+MmMapLockedPages (
+ PMDL MemoryDescriptorList,
+ KPROCESSOR_MODE AccessMode
+ );
+VOID
+STDCALL
+MmMapMemoryDumpMdl (
+ PVOID Unknown0
+ );
+PVOID
+STDCALL
+MmMapVideoDisplay (
+ IN PHYSICAL_ADDRESS PhysicalAddress,
+ IN ULONG NumberOfBytes,
+ IN MEMORY_CACHING_TYPE CacheType
+ );
+NTSTATUS
+STDCALL
+MmMapViewInSystemSpace (
+ IN PVOID Section,
+ OUT PVOID * MappedBase,
+ IN PULONG ViewSize
+ );
+PVOID
+STDCALL
+MmMapViewOfSection (
+ DWORD Unknown0,
+ DWORD Unknown1,
+ DWORD Unknown2,
+ DWORD Unknown3,
+ DWORD Unknown4,
+ DWORD Unknown5,
+ DWORD Unknown6,
+ DWORD Unknown7,
+ DWORD Unknown8,
+ DWORD Unknown9
+ );
/*
* FUNCTION: Makes the whole driver pageable
* ARGUMENTS:
* AddressWithinSection = Any address within the driver
*/
-VOID MmPageEntireDriver(PVOID AddressWithinSection);
-
+VOID
+STDCALL
+MmPageEntireDriver (
+ PVOID AddressWithinSection
+ );
/*
* FUNCTION: Resets the pageable status of a driver's sections to their
* compile time settings
* ARGUMENTS:
* AddressWithinSection = Any address within the driver
*/
-VOID MmResetDriverPaging(PVOID AddressWithinSection);
-
+VOID
+STDCALL
+MmResetDriverPaging (
+ PVOID AddressWithinSection
+ );
+DWORD
+STDCALL
+MmSecureVirtualMemory (
+ DWORD Unknown0,
+ DWORD Unknown1,
+ DWORD Unknown2
+ );
+BOOLEAN
+STDCALL
+MmSetAddressRangeModified (
+ DWORD Unknown0,
+ DWORD Unknown1
+ );
+NTSTATUS
+STDCALL
+MmSetBankedSection (
+ DWORD Unknown0,
+ DWORD Unknown1,
+ DWORD Unknown2,
+ DWORD Unknown3,
+ DWORD Unknown4,
+ DWORD Unknown5
+ );
/*
* FUNCTION: Reinitializes a caller-allocated MDL
* ARGUMENTS:
* Operation = Types of operation for which the pages should be
* probed
*/
-VOID MmProbeAndLockPages(PMDL MemoryDescriptorList,
- KPROCESSOR_MODE AccessMode,
- LOCK_OPERATION Operation);
-
+VOID
+STDCALL
+MmProbeAndLockPages (
+ PMDL MemoryDescriptorList,
+ KPROCESSOR_MODE AccessMode,
+ LOCK_OPERATION Operation
+ );
/*
* FUNCTION: Returns an estimate of the amount of memory in the system
* RETURNS: Either MmSmallSystem, MmMediumSystem or MmLargeSystem
*/
-MM_SYSTEM_SIZE MmQuerySystemSize(VOID);
-
+MM_SYSTEM_SIZE
+STDCALL
+MmQuerySystemSize (
+ VOID
+ );
/*
* FUNCTION: Returns the number of bytes to allocate for an MDL
* describing a given address range
* Length = size in bytes of the region
* RETURNS: The number of bytes required for the MDL
*/
-ULONG MmSizeOfMdl(PVOID Base, ULONG Length);
-
+ULONG
+STDCALL
+MmSizeOfMdl (
+ PVOID Base,
+ ULONG Length
+ );
/*
* FUNCTION: Unlocks the physical pages described by a given MDL
* ARGUMENTS:
* Mdl = Mdl to unlock
*/
-VOID MmUnlockPages(PMDL Mdl);
-
+VOID
+STDCALL
+MmUnlockPages (
+ PMDL Mdl
+ );
/*
* FUNCTION: Releases a section of driver code or data previously locked into
* memory
* ARGUMENTS:
* ImageSectionHandle = Handle for the locked section
*/
-VOID MmUnlockPagableImageSection(PVOID ImageSectionHandle);
-
-VOID MmUnmapLockedPages(PVOID BaseAddress, PMDL MemoryDescriptorList);
-
+VOID
+STDCALL
+MmUnlockPagableImageSection (
+ PVOID ImageSectionHandle
+ );
+VOID
+STDCALL
+MmUnmapIoSpace (
+ PVOID BaseAddress,
+ ULONG NumberOfBytes
+ );
+VOID
+STDCALL
+MmUnmapLockedPages (
+ PVOID BaseAddress,
+ PMDL MemoryDescriptorList
+ );
+VOID
+STDCALL
+MmUnmapVideoDisplay (
+ IN PVOID BaseAddress,
+ IN ULONG NumberOfBytes
+ );
+NTSTATUS
+STDCALL
+MmUnmapViewInSystemSpace (
+ DWORD Unknown0
+ );
+#if 0
+NTSTATUS
+STDCALL
+MmUnmapViewOfSection (
+ PEPROCESS Process,
+ PMEMORY_AREA MemoryArea
+ )
+#endif
+VOID
+STDCALL
+MmUnsecureVirtualMemory (
+ DWORD Unknown0
+ );
+#endif
+#ifndef _INCLUDE_DDK_MMTYPES_H
+#define _INCLUDE_DDK_MMTYPES_H
+/* $Id: mmtypes.h,v 1.4 2000/04/02 13:32:38 ea Exp $ */
+
typedef struct _MADDRESS_SPACE
{
#define MmSmallSystem (0)
#define MmMediumSystem (1)
#define MmLargeSystem (2)
+/* Used in MmFlushImageSection */
+typedef
+enum _MMFLUSH_TYPE
+{
+ MmFlushForDelete,
+ MmFlushForWrite
+
+} MMFLUSH_TYPE;
+
+typedef
+enum _MEMORY_CACHING_TYPE
+{
+ MmNonCached = FALSE,
+ MmCached = TRUE,
+ MmFrameBufferCached,
+ MmHardwareCoherentCached,
+ MmMaximumCacheType
+
+} MEMORY_CACHING_TYPE;
+
+#endif
VOID MiShutdownMemoryManager(VOID);
ULONG MmGetPhysicalAddressForProcess(PEPROCESS Process,
PVOID Address);
-NTSTATUS MmUnmapViewOfSection(PEPROCESS Process,
+NTSTATUS STDCALL MmUnmapViewOfSection(PEPROCESS Process,
PMEMORY_AREA MemoryArea);
PVOID MiTryToSharePageInSection(PSECTION_OBJECT Section, ULONG Offset);
VOID MmInitPagingFile(VOID);
ULONG MmPageFault(ULONG cs, ULONG eip, ULONG error_code);
+/* FIXME: it should be in ddk/mmfuncs.h */
+NTSTATUS
+STDCALL
+MmCreateSection (
+ OUT PSECTION_OBJECT * SectionObject,
+ IN ACCESS_MASK DesiredAccess,
+ IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
+ IN PLARGE_INTEGER MaximumSize,
+ IN ULONG SectionPageProtection,
+ IN ULONG AllocationAttributes,
+ IN HANDLE FileHandle OPTIONAL,
+ IN PFILE_OBJECT File OPTIONAL
+ );
+
#endif
-/*
+/* $Id: drvlck.c,v 1.3 2000/04/02 13:32:41 ea Exp $
+ *
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/drvlck.c
/* FUNCTIONS *****************************************************************/
+#if 0
VOID MmUnlockPagableImageSection(PVOID ImageSectionHandle)
/*
* FUNCTION: Releases a section of driver code or driver data, previously
// MmUnlockMemoryArea((MEMORY_AREA *)ImageSectionHandle);
UNIMPLEMENTED;
}
+#endif
-VOID MmLockPagableSectionByHandle(PVOID ImageSectionHandle)
+VOID STDCALL MmLockPagableSectionByHandle(PVOID ImageSectionHandle)
{
// MmLockMemoryArea((MEMORY_AREA *)ImageSectionHandle);
UNIMPLEMENTED;
}
+#if 0
PVOID MmLockPagableCodeSection(PVOID AddressWithinSection)
{
PVOID Handle;
MmLockPagableSectionByHandle(Handle);
return(Handle);
}
+#endif
-PVOID MmLockPagableDataSection(PVOID AddressWithinSection)
+PVOID STDCALL MmLockPagableDataSection(PVOID AddressWithinSection)
{
- return(MmLockPagableCodeSection(AddressWithinSection));
+ PVOID Handle;
+ Handle = MmOpenMemoryAreaByAddress(NULL,AddressWithinSection);
+ MmLockPagableSectionByHandle(Handle);
+ return(Handle);
}
-VOID MmPageEntireDriver(PVOID AddressWithinSection)
+
+VOID
+STDCALL
+MmUnlockPagableImageSection (
+ PVOID ImageSectionHandle
+ )
{
}
-VOID MmResetDriverPaging(PVOID AddressWithinSection)
+
+VOID STDCALL MmPageEntireDriver(PVOID AddressWithinSection)
{
}
+VOID STDCALL MmResetDriverPaging(PVOID AddressWithinSection)
+{
+}
+
+
+/* EOF */
-# $Id: makefile_rex,v 1.65 2000/03/29 13:11:52 dwelch Exp $
+# $Id: makefile_rex,v 1.66 2000/04/02 13:32:39 ea Exp $
#
# ReactOS Operating System
#
MM_OBJECTS = mm/mm.o mm/freelist.o mm/pool.o mm/virtual.o \
mm/mdl.o mm/zone.o mm/paging.o mm/section.o \
mm/marea.o mm/ppool.o mm/npool.o mm/pagefile.o \
- mm/cont.o mm/iospace.o mm/ncache.o mm/aspace.o
+ mm/cont.o mm/iospace.o mm/ncache.o mm/aspace.o \
+ mm/pagfault.o
MM_I386_OBJECTS = mm/i386/page.o mm/i386/memsafe.o
-/*
+/* $Id: page.c,v 1.7 2000/04/02 13:32:43 ea Exp $
+ *
* COPYRIGHT: See COPYING in the top directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/i386/page.c
}
}
-PHYSICAL_ADDRESS MmGetPhysicalAddress(PVOID vaddr)
+PHYSICAL_ADDRESS STDCALL MmGetPhysicalAddress(PVOID vaddr)
/*
* FUNCTION: Returns the physical address corresponding to a virtual address
*/
return p;
}
+
+
+/* EOF */
-/* $Id: iospace.c,v 1.3 2000/03/29 13:11:54 dwelch Exp $
+/* $Id: iospace.c,v 1.4 2000/04/02 13:32:41 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
}
+/**********************************************************************
+ * NAME EXPORTED
+ * MmMapVideoDisplay@16
+ */
+PVOID
+STDCALL
+MmMapVideoDisplay (
+ IN PHYSICAL_ADDRESS PhysicalAddress,
+ IN ULONG NumberOfBytes,
+ IN MEMORY_CACHING_TYPE CacheType
+ )
+{
+ return MmMapIoSpace (
+ PhysicalAddress,
+ NumberOfBytes,
+ CacheType
+ );
+}
+
+
+VOID
+STDCALL
+MmUnmapVideoDisplay (
+ IN PVOID BaseAddress,
+ IN ULONG NumberOfBytes
+ )
+{
+ MmUnmapIoSpace (
+ BaseAddress,
+ NumberOfBytes
+ );
+}
+
+
/* EOF */
-/*
+/* $Id: mdl.c,v 1.18 2000/04/02 13:32:41 ea Exp $
+ *
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/mdl.c
return((PVOID)mdl_pages[((ULONG)Offset) / PAGESIZE]);
}
-VOID MmUnlockPages(PMDL MemoryDescriptorList)
+VOID STDCALL MmUnlockPages(PMDL MemoryDescriptorList)
/*
* FUNCTION: Unlocks the physical pages described by a given MDL
* ARGUMENTS:
/* It is harmless to leave this one as a stub */
}
-PVOID MmMapLockedPages(PMDL Mdl, KPROCESSOR_MODE AccessMode)
+PVOID STDCALL MmMapLockedPages(PMDL Mdl, KPROCESSOR_MODE AccessMode)
/*
* FUNCTION: Maps the physical pages described by a given MDL
* ARGUMENTS:
return(base + Mdl->ByteOffset);
}
-VOID MmUnmapLockedPages(PVOID BaseAddress, PMDL Mdl)
+VOID STDCALL MmUnmapLockedPages(PVOID BaseAddress, PMDL Mdl)
/*
* FUNCTION: Releases a mapping set up by a preceding call to MmMapLockedPages
* ARGUMENTS:
}
-VOID MmProbeAndLockPages(PMDL Mdl,
+VOID STDCALL MmProbeAndLockPages(PMDL Mdl,
KPROCESSOR_MODE AccessMode,
LOCK_OPERATION Operation)
/*
MmUnlockAddressSpace(AddressSpace);
}
+#if 0
ULONG MmGetMdlByteCount(PMDL Mdl)
/*
* FUNCTION: MmGetMdlByteCount returns the length in bytes described
{
return(Mdl->ByteCount);
}
+#endif
+#if 0
ULONG MmGetMdlByteOffset(PMDL Mdl)
/*
* FUNCTION: Returns the byte offset within its page of the buffer described
{
return(Mdl->ByteOffset);
}
+#endif
-ULONG MmSizeOfMdl(PVOID Base, ULONG Length)
+ULONG STDCALL MmSizeOfMdl(PVOID Base, ULONG Length)
/*
* FUNCTION: Returns the number of bytes to allocate for an MDL describing
* the given address range
return(sizeof(MDL)+(len*sizeof(ULONG)));
}
+#if 0
PVOID MmGetMdlVirtualAddress(PMDL Mdl)
{
return(Mdl->StartVa + Mdl->ByteOffset);
}
+#endif
PVOID MmGetSystemAddressForMdl(PMDL Mdl)
/*
return(Mdl->MappedSystemVa);
}
-VOID MmBuildMdlForNonPagedPool(PMDL Mdl)
+VOID STDCALL MmBuildMdlForNonPagedPool(PMDL Mdl)
/*
* FUNCTION: Fills in the corresponding physical page array of a given
* MDL for a buffer in nonpaged system space
MemoryDescriptorList->Process = PsGetCurrentProcess();
}
-PMDL MmCreateMdl(PMDL MemoryDescriptorList, PVOID Base, ULONG Length)
+PMDL STDCALL MmCreateMdl(PMDL MemoryDescriptorList, PVOID Base, ULONG Length)
/*
* FUNCTION: Allocates and initalizes an MDL
* ARGUMENTS:
return(MemoryDescriptorList);
}
+
+
+VOID
+STDCALL
+MmMapMemoryDumpMdl (
+ PVOID Unknown0
+ )
+{
+ UNIMPLEMENTED;
+}
+
+/* EOF */
-/* $Id: mm.c,v 1.26 2000/03/29 13:11:54 dwelch Exp $
+/* $Id: mm.c,v 1.27 2000/04/02 13:32:41 ea Exp $
*
* COPYRIGHT: See COPYING in the top directory
* PROJECT: ReactOS kernel
static MEMORY_AREA* kernel_param_desc = NULL;
static MEMORY_AREA* kernel_pool_desc = NULL;
+ULONG EXPORTED MmUserProbeAddress [PAGESIZE] = {0,}; /* FIXME */
+PVOID EXPORTED MmHighestUserAddress = NULL; /* FIXME */
+
/* FUNCTIONS ****************************************************************/
VOID MiShutdownMemoryManager(VOID)
return(NT_SUCCESS(Status));
}
-BOOLEAN MmIsThisAnNtAsSystem(VOID)
+BOOLEAN STDCALL MmIsThisAnNtAsSystem(VOID)
{
return(IsThisAnNtAsSystem);
}
-MM_SYSTEM_SIZE MmQuerySystemSize(VOID)
+MM_SYSTEM_SIZE STDCALL MmQuerySystemSize(VOID)
{
return(MmSystemSize);
}
}
}
+
+/* Miscellanea functions: they may fit somewhere else */
+
+DWORD
+STDCALL
+MmAdjustWorkingSetSize (
+ DWORD Unknown0,
+ DWORD Unknown1,
+ DWORD Unknown2
+ )
+{
+ UNIMPLEMENTED;
+ return (0);
+}
+
+
+DWORD
+STDCALL
+MmDbgTranslatePhysicalAddress (
+ DWORD Unknown0,
+ DWORD Unknown1
+ )
+{
+ UNIMPLEMENTED;
+ return (0);
+}
+
+
+NTSTATUS
+STDCALL
+MmGrowKernelStack (
+ DWORD Unknown0
+ )
+{
+ UNIMPLEMENTED;
+ return (STATUS_NOT_IMPLEMENTED);
+}
+
+
+BOOLEAN
+STDCALL
+MmSetAddressRangeModified (
+ DWORD Unknown0,
+ DWORD Unknown1
+ )
+{
+ UNIMPLEMENTED;
+ return (FALSE);
+}
+
/* EOF */
--- /dev/null
+/* $Id: pagfault.c,v 1.1 2000/04/02 13:32:41 ea Exp $ */
+#include <ddk/ntddk.h>
+
+BOOLEAN
+STDCALL
+MmIsRecursiveIoFault (
+ VOID
+ )
+{
+ PETHREAD Thread = PsGetCurrentThread ();
+
+ return ( Thread->DisablePageFaultClustering
+ | Thread->ForwardClusterOnly
+ );
+}
+
+
+/* EOF */
-/* $Id: section.c,v 1.26 2000/03/29 13:11:54 dwelch Exp $
+/* $Id: section.c,v 1.27 2000/04/02 13:32:41 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
/* GLOBALS *******************************************************************/
-POBJECT_TYPE MmSectionType = NULL;
+POBJECT_TYPE EXPORTED MmSectionObjectType = NULL;
/* FUNCTIONS *****************************************************************/
{
ANSI_STRING AnsiString;
- MmSectionType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
-
- MmSectionType->TotalObjects = 0;
- MmSectionType->TotalHandles = 0;
- MmSectionType->MaxObjects = ULONG_MAX;
- MmSectionType->MaxHandles = ULONG_MAX;
- MmSectionType->PagedPoolCharge = 0;
- MmSectionType->NonpagedPoolCharge = sizeof(SECTION_OBJECT);
- MmSectionType->Dump = NULL;
- MmSectionType->Open = NULL;
- MmSectionType->Close = NULL;
- MmSectionType->Delete = MmpDeleteSection;
- MmSectionType->Parse = NULL;
- MmSectionType->Security = NULL;
- MmSectionType->QueryName = NULL;
- MmSectionType->OkayToClose = NULL;
- MmSectionType->Create = MmpCreateSection;
+ MmSectionObjectType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
+
+ MmSectionObjectType->TotalObjects = 0;
+ MmSectionObjectType->TotalHandles = 0;
+ MmSectionObjectType->MaxObjects = ULONG_MAX;
+ MmSectionObjectType->MaxHandles = ULONG_MAX;
+ MmSectionObjectType->PagedPoolCharge = 0;
+ MmSectionObjectType->NonpagedPoolCharge = sizeof(SECTION_OBJECT);
+ MmSectionObjectType->Dump = NULL;
+ MmSectionObjectType->Open = NULL;
+ MmSectionObjectType->Close = NULL;
+ MmSectionObjectType->Delete = MmpDeleteSection;
+ MmSectionObjectType->Parse = NULL;
+ MmSectionObjectType->Security = NULL;
+ MmSectionObjectType->QueryName = NULL;
+ MmSectionObjectType->OkayToClose = NULL;
+ MmSectionObjectType->Create = MmpCreateSection;
RtlInitAnsiString(&AnsiString,"Section");
- RtlAnsiStringToUnicodeString(&MmSectionType->TypeName,
+ RtlAnsiStringToUnicodeString(&MmSectionObjectType->TypeName,
&AnsiString,TRUE);
return(STATUS_SUCCESS);
}
+/* FIXME: NtCS should call MmCS */
NTSTATUS STDCALL NtCreateSection (OUT PHANDLE SectionHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
Section = ObCreateObject(SectionHandle,
DesiredAccess,
ObjectAttributes,
- MmSectionType);
+ MmSectionObjectType);
DPRINT("SectionHandle %x\n", SectionHandle);
if (Section == NULL)
{
ObjectAttributes->Attributes,
NULL,
DesiredAccess,
- MmSectionType,
+ MmSectionObjectType,
UserMode,
NULL,
&Object);
Status = ObReferenceObjectByHandle(SectionHandle,
SECTION_MAP_READ,
- MmSectionType,
+ MmSectionObjectType,
UserMode,
(PVOID*)&Section,
NULL);
return(STATUS_SUCCESS);
}
-NTSTATUS MmUnmapViewOfSection(PEPROCESS Process,
+NTSTATUS STDCALL MmUnmapViewOfSection(PEPROCESS Process,
PMEMORY_AREA MemoryArea)
{
PSECTION_OBJECT Section;
}
+/**********************************************************************
+ * NAME EXPORTED
+ * MmMapViewOfSection@40
+ *
+ * DESCRIPTION
+ *
+ * ARGUMENTS
+ * FIXME: stack space allocated is 40 bytes, but nothing
+ * is known about what they are filled with.
+ *
+ * RETURN VALUE
+ * Status.
+ *
+ */
+PVOID
+STDCALL
+MmMapViewOfSection (
+ DWORD Unknown0,
+ DWORD Unknown1,
+ DWORD Unknown2,
+ DWORD Unknown3,
+ DWORD Unknown4,
+ DWORD Unknown5,
+ DWORD Unknown6,
+ DWORD Unknown7,
+ DWORD Unknown8,
+ DWORD Unknown9
+ )
+{
+ UNIMPLEMENTED;
+ return (NULL);
+}
+
+
+BOOLEAN
+STDCALL
+MmCanFileBeTruncated (
+ IN PSECTION_OBJECT_POINTERS SectionObjectPointer,
+ IN PLARGE_INTEGER NewFileSize
+ )
+{
+ UNIMPLEMENTED;
+ return (FALSE);
+}
+
+
+BOOLEAN
+STDCALL
+MmDisableModifiedWriteOfSection (
+ DWORD Unknown0
+ )
+{
+ UNIMPLEMENTED;
+ return (FALSE);
+}
+
+BOOLEAN
+STDCALL
+MmFlushImageSection (
+ IN PSECTION_OBJECT_POINTERS SectionObjectPointer,
+ IN MMFLUSH_TYPE FlushType
+ )
+{
+ UNIMPLEMENTED;
+ return (FALSE);
+}
+
+BOOLEAN
+STDCALL
+MmForceSectionClosed (
+ DWORD Unknown0,
+ DWORD Unknown1
+ )
+{
+ UNIMPLEMENTED;
+ return (FALSE);
+}
+
+
+NTSTATUS
+STDCALL
+MmMapViewInSystemSpace (
+ IN PVOID Section,
+ OUT PVOID * MappedBase,
+ IN PULONG ViewSize
+ )
+{
+ UNIMPLEMENTED;
+ return (STATUS_NOT_IMPLEMENTED);
+}
+
+NTSTATUS
+STDCALL
+MmUnmapViewInSystemSpace (
+ DWORD Unknown0
+ )
+{
+ UNIMPLEMENTED;
+ return (STATUS_NOT_IMPLEMENTED);
+}
+
+
+NTSTATUS
+STDCALL
+MmSetBankedSection (
+ DWORD Unknown0,
+ DWORD Unknown1,
+ DWORD Unknown2,
+ DWORD Unknown3,
+ DWORD Unknown4,
+ DWORD Unknown5
+ )
+{
+ UNIMPLEMENTED;
+ return (STATUS_NOT_IMPLEMENTED);
+}
+
+
+/**********************************************************************
+ * NAME EXPORTED
+ * MmCreateSection@
+ *
+ * DESCRIPTION
+ * Creates a section object.
+ *
+ * ARGUMENTS
+ * SectionObjiect (OUT)
+ * Caller supplied storage for the resulting pointer
+ * to a SECTION_BOJECT instance;
+ *
+ * DesiredAccess
+ * Specifies the desired access to the section can be a
+ * combination of:
+ * STANDARD_RIGHTS_REQUIRED |
+ * SECTION_QUERY |
+ * SECTION_MAP_WRITE |
+ * SECTION_MAP_READ |
+ * SECTION_MAP_EXECUTE
+ *
+ * ObjectAttributes [OPTIONAL]
+ * Initialized attributes for the object can be used
+ * to create a named section;
+ *
+ * MaximumSize
+ * Maximizes the size of the memory section. Must be
+ * non-NULL for a page-file backed section.
+ * If value specified for a mapped file and the file is
+ * not large enough, file will be extended.
+ *
+ * SectionPageProtection
+ * Can be a combination of:
+ * PAGE_READONLY |
+ * PAGE_READWRITE |
+ * PAGE_WRITEONLY |
+ * PAGE_WRITECOPY
+ *
+ * AllocationAttributes
+ * Can be a combination of:
+ * SEC_IMAGE |
+ * SEC_RESERVE
+ *
+ * FileHandle
+ * Handle to a file to create a section mapped to a file
+ * instead of a memory backed section;
+ *
+ * File
+ * Unknown.
+ *
+ * RETURN VALUE
+ * Status.
+ */
+NTSTATUS
+STDCALL
+MmCreateSection (
+ OUT PSECTION_OBJECT * SectionObject,
+ IN ACCESS_MASK DesiredAccess,
+ IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
+ IN PLARGE_INTEGER MaximumSize,
+ IN ULONG SectionPageProtection,
+ IN ULONG AllocationAttributes,
+ IN HANDLE FileHandle OPTIONAL,
+ IN PFILE_OBJECT File OPTIONAL
+ )
+{
+ return (STATUS_NOT_IMPLEMENTED);
+}
+
/* EOF */
-/*
+/* $Id: virtual.c,v 1.26 2000/04/02 13:32:42 ea Exp $
+ *
* COPYRIGHT: See COPYING in the top directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/virtual.c
return(STATUS_SUCCESS);
}
-BOOLEAN MmIsNonPagedSystemAddressValid(PVOID VirtualAddress)
+BOOLEAN STDCALL MmIsNonPagedSystemAddressValid(PVOID VirtualAddress)
{
UNIMPLEMENTED;
}
-BOOLEAN MmIsAddressValid(PVOID VirtualAddress)
+BOOLEAN STDCALL MmIsAddressValid(PVOID VirtualAddress)
/*
* FUNCTION: Checks whether the given address is valid for a read or write
* ARGUMENTS:
return(STATUS_SUCCESS);
}
+
+DWORD
+STDCALL
+MmSecureVirtualMemory (
+ DWORD Unknown0,
+ DWORD Unknown1,
+ DWORD Unknown2
+ )
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+
+VOID
+STDCALL
+MmUnsecureVirtualMemory (
+ DWORD Unknown0
+ )
+{
+ UNIMPLEMENTED;
+}
+
+/* EOF */
-; $Id: ntoskrnl.def,v 1.64 2000/03/29 13:11:53 dwelch Exp $
+; $Id: ntoskrnl.def,v 1.65 2000/04/02 13:32:40 ea Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
KeSetTimer
KeSynchronizeExecution
KeWaitForSingleObject
+MmAdjustWorkingSetSize@12
MmAllocateContiguousMemory@12
MmAllocateNonCachedMemory@4
+MmBuildMdlForNonPagedPool@4
+MmCanFileBeTruncated@8
+MmCreateMdl@12
+MmCreateSection@32
+MmDbgTranslatePhysicalAddress@8
+MmDisableModifiedWriteOfSection@4
+MmFlushImageSection@8
+MmForceSectionClosed@8
MmFreeContiguousMemory@4
MmFreeNonCachedMemory@8
-MmGetSystemAddressForMdl
+MmGetPhysicalAddress@4
+MmGrowKernelStack@4
+MmHighestUserAddress DATA
+MmIsAddressValid@4
+MmIsNonPagedSystemAddressValid@4
+MmIsRecursiveIoFault@0
+MmIsThisAnNtAsSystem@0
+MmLockPagableDataSection@4
+MmLockPagableImageSection@4=MmLockPagableDataSection@4
+MmLockPagableSectionByHandle@4
MmMapIoSpace@16
+MmMapLockedPages@8
+MmMapMemoryDumpMdl@4
+MmMapVideoDisplay@16
+MmMapViewInSystemSpace@12
+MmMapViewOfSection@40
+MmPageEntireDriver@4
+MmProbeAndLockPages@12
+MmQuerySystemSize@0
+MmResetDriverPaging@4
+MmSectionObjectType DATA
+MmSecureVirtualMemory@12
+MmSetAddressRangeModified@8
+MmSetBankedSection@24
+MmSizeOfMdl@8
+MmSystemRangeStart=MmSectionObjectType
+MmUnlockPagableImageSection@4
+MmUnlockPages@4
MmUnmapIoSpace@8
+MmUnmapLockedPages@8
+MmUnmapVideoDisplay@8
+MmUnmapViewInSystemSpace@4
+MmUnmapViewOfSection@8
+MmUnsecureVirtualMemory@4
+MmUserProbeAddress DATA
NlsAnsiCodePage DATA
NlsLeadByteInfo DATA
NlsMbCodePageTag DATA
IoInitializeDpcRequest
IoMarkIrpPending
IoRequestDpc
+MmGetSystemAddressForMdl
;
;
; exports from hal.dll
-; $Id: ntoskrnl.edf,v 1.51 2000/03/29 13:11:53 dwelch Exp $
+; $Id: ntoskrnl.edf,v 1.52 2000/04/02 13:32:40 ea Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
KeSetTimer
KeSynchronizeExecution
KeWaitForSingleObject
+MmAdjustWorkingSetSize=MmAdjustWorkingSetSize@12
MmAllocateContiguousMemory=MmAllocateContiguousMemory@12
MmAllocateNonCachedMemory=MmAllocateNonCachedMemory@4
+MmBuildMdlForNonPagedPool=MmBuildMdlForNonPagedPool@4
+MmCanFileBeTruncated=MmCanFileBeTruncated@8
+MmCreateMdl=MmCreateMdl@12
+MmCreateSection=MmCreateSection@32
+MmDbgTranslatePhysicalAddress=MmDbgTranslatePhysicalAddress@8
+MmDisableModifiedWriteOfSection=MmDisableModifiedWriteOfSection@4
+MmFlushImageSection=MmFlushImageSection@8
+MmForceSectionClosed=MmForceSectionClosed@8
MmFreeContiguousMemory=MmFreeContiguousMemory@4
MmFreeNonCachedMemory=MmFreeNonCachedMemory@8
-MmGetSystemAddressForMdl
+MmGetPhysicalAddress=MmGetPhysicalAddress@4
+MmGrowKernelStack=MmGrowKernelStack@4
+MmHighestUserAddress DATA
+MmIsAddressValid=MmIsAddressValid@4
+MmIsNonPagedSystemAddressValid=MmIsNonPagedSystemAddressValid@4
+MmIsRecursiveIoFault=MmIsRecursiveIoFault@0
+MmIsThisAnNtAsSystem=MmIsThisAnNtAsSystem@0
+MmLockPagableDataSection=MmLockPagableDataSection@4
+MmLockPagableImageSection=MmLockPagableDataSection@4
+MmLockPagableSectionByHandle=MmLockPagableSectionByHandle@4
MmMapIoSpace=MmMapIoSpace@16
+MmMapLockedPages=MmMapLockedPages@8
+MmMapMemoryDumpMdl=MmMapMemoryDumpMdl@4
+MmMapVideoDisplay=MmMapVideoDisplay@16
+MmMapViewInSystemSpace=MmMapViewInSystemSpace@12
+MmMapViewOfSection=MmMapViewOfSection@40
+MmPageEntireDriver=MmPageEntireDriver@4
+MmProbeAndLockPages=MmProbeAndLockPages@12
+MmQuerySystemSize=MmQuerySystemSize@0
+MmResetDriverPaging=MmResetDriverPaging@4
+MmSectionObjectType DATA
+MmSecureVirtualMemory=MmSecureVirtualMemory@12
+MmSetAddressRangeModified=MmSetAddressRangeModified@8
+MmSetBankedSection=MmSetBankedSection@24
+MmSizeOfMdl=MmSizeOfMdl@8
+MmSystemRangeStart=MmSectionObjectType
+MmUnlockPagableImageSection=MmUnlockPagableImageSection@4
+MmUnlockPages=MmUnlockPages@4
MmUnmapIoSpace=MmUnmapIoSpace@8
+MmUnmapLockedPages=MmUnmapLockedPages@8
+MmUnmapVideoDisplay=MmUnmapVideoDisplay@8
+MmUnmapViewInSystemSpace=MmUnmapViewInSystemSpace@4
+MmUnmapViewOfSection=MmUnmapViewOfSection@8
+MmUnsecureVirtualMemory=MmUnsecureVirtualMemory@4
+MmUserProbeAddress DATA
NlsAnsiCodePage DATA
NlsLeadByteInfo DATA
NlsMbCodePageTag DATA
IoInitializeDpcRequest
IoMarkIrpPending
IoRequestDpc
+MmGetSystemAddressForMdl
;
;
; exports from hal.dll