-/* $Id: adapter.c,v 1.9 2003/12/28 22:38:09 fireball Exp $
+/* $Id: adapter.c,v 1.10 2003/12/31 05:33:03 jfilby Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* - there are many unhandled cases
*/
{
+ LARGE_INTEGER MinAddress;
LARGE_INTEGER MaxAddress;
+ LARGE_INTEGER BoundryAddressMultiple;
IO_ALLOCATION_ACTION Retval;
assert(KeGetCurrentIrql() == DISPATCH_LEVEL);
return STATUS_SUCCESS;
/* 24-bit max address due to 16-bit dma controllers */
+ MinAddress.QuadPart = 0x0000000;
MaxAddress.QuadPart = 0x1000000;
+ BoundryAddressMultiple.QuadPart = 0;
/* why 64K alignment? */
/*
* that. This can be optimized.
*/
AdapterObject->MapRegisterBase = MmAllocateContiguousAlignedMemory(
- NumberOfMapRegisters * PAGE_SIZE, MaxAddress, 0x10000 );
+ NumberOfMapRegisters * PAGE_SIZE,
+ MinAddress,
+ MaxAddress,
+ BoundryAddressMultiple,
+ MmCached,
+ 0x10000 );
if(!AdapterObject->MapRegisterBase)
return STATUS_INSUFFICIENT_RESOURCES;
*/
{
LARGE_INTEGER MaxAddress;
+ LARGE_INTEGER MinAddress;
+ LARGE_INTEGER BoundryAddressMultiple;
PWAIT_CONTEXT_BLOCK WaitContextBlock;
IO_ALLOCATION_ACTION Retval;
*/
/* 24-bit max address due to 16-bit dma controllers */
+ MinAddress.QuadPart = 0x0000000;
MaxAddress.QuadPart = 0x1000000;
+ BoundryAddressMultiple.QuadPart = 0;
AdapterObject->MapRegisterBase = MmAllocateContiguousAlignedMemory(
- WaitContextBlock->NumberOfMapRegisters * PAGE_SIZE, MaxAddress, 0x10000 );
+ WaitContextBlock->NumberOfMapRegisters * PAGE_SIZE,
+ MinAddress,
+ MaxAddress,
+ BoundryAddressMultiple,
+ MmCached,
+ 0x10000 );
if(!AdapterObject->MapRegisterBase)
return;
#ifndef _INCLUDE_DDK_MMFUNCS_H
#define _INCLUDE_DDK_MMFUNCS_H
-/* $Id: mmfuncs.h,v 1.18 2003/11/18 05:11:41 royce Exp $ */
+/* $Id: mmfuncs.h,v 1.19 2003/12/31 05:33:03 jfilby Exp $ */
/* MEMORY MANAGMENT ******************************************************/
IN PHYSICAL_ADDRESS HighestAcceptableAddress
);
+PVOID STDCALL
+MmAllocateContiguousMemorySpecifyCache (IN ULONG NumberOfBytes,
+ IN PHYSICAL_ADDRESS LowestAcceptableAddress,
+ IN PHYSICAL_ADDRESS HighestAcceptableAddress,
+ IN PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL,
+ IN MEMORY_CACHING_TYPE CacheType
+ );
+
PVOID STDCALL
MmAllocateContiguousAlignedMemory(IN ULONG NumberOfBytes,
+ IN PHYSICAL_ADDRESS LowestAcceptableAddress,
IN PHYSICAL_ADDRESS HighestAcceptableAddress,
- IN ULONG Alignment);
+ IN PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL,
+ IN MEMORY_CACHING_TYPE CacheType OPTIONAL,
+ IN ULONG Alignment);
PVOID
STDCALL
);
VOID
STDCALL
+MmFreeContiguousMemorySpecifyCache(IN PVOID BaseAddress,
+ IN ULONG NumberOfBytes,
+ IN MEMORY_CACHING_TYPE CacheType
+ );
+VOID
+STDCALL
MmFreeNonCachedMemory (
IN PVOID BaseAddress,
IN ULONG NumberOfBytes
-/* $Id: mmtypes.h,v 1.17 2003/11/03 20:27:51 gdalsnes Exp $ */
+/* $Id: mmtypes.h,v 1.18 2003/12/31 05:33:03 jfilby Exp $ */
#ifndef _INCLUDE_DDK_MMTYPES_H
#define _INCLUDE_DDK_MMTYPES_H
MmFlushForWrite
} MMFLUSH_TYPE;
+typedef enum _MEMORY_CACHING_TYPE_ORIG {
+ MmFrameBufferCached = 2
+} MEMORY_CACHING_TYPE_ORIG;
+
typedef enum _MEMORY_CACHING_TYPE
{
MmNonCached = FALSE,
MmCached = TRUE,
- MmFrameBufferCached,
+ MmWriteCombined = MmFrameBufferCached,
MmHardwareCoherentCached,
MmMaximumCacheType
} MEMORY_CACHING_TYPE;
#define SEC_RESERVE (0x04000000)
#define SEC_COMMIT (0x08000000)
#define SEC_NOCACHE (0x10000000)
+#define PAGE_NOACCESS (1)
#define PAGE_READONLY (2)
#define PAGE_READWRITE (4)
#define PAGE_WRITECOPY (8)
#define PAGE_EXECUTE_READWRITE (64)
#define PAGE_EXECUTE_WRITECOPY (128)
#define PAGE_GUARD (256)
-#define PAGE_NOACCESS (1)
#define PAGE_NOCACHE (512)
+#define PAGE_WRITECOMBINE (1024)
#define MEM_COMMIT (4096)
#define MEM_FREE (65536)
#define MEM_RESERVE (8192)
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: view.c,v 1.70 2003/12/30 18:52:03 fireball Exp $
+/* $Id: view.c,v 1.71 2003/12/31 05:33:03 jfilby Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/cc/view.c
#ifdef CACHE_BITMAP
ULONG StartingOffset;
#endif
-
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
+
assert(Bcb);
DPRINT("CcRosCreateCacheSegment()\n");
+ BoundaryAddressMultiple.QuadPart = 0;
if (FileOffset >= Bcb->FileSize.u.LowPart)
{
CacheSeg = NULL;
PAGE_READWRITE,
(PMEMORY_AREA*)¤t->MemoryArea,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
MmUnlockAddressSpace(MmGetKernelAddressSpace());
if (!NT_SUCCESS(Status))
{
#ifdef CACHE_BITMAP
PMEMORY_AREA marea;
PVOID Buffer;
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
#endif
NTSTATUS Status;
KPRIORITY Priority;
-
+
DPRINT("CcInitView()\n");
#ifdef CACHE_BITMAP
+ BoundaryAddressMultiple.QuadPart = 0;
CiCacheSegMappingRegionHint = 0;
CiCacheSegMappingRegionBase = NULL;
0,
&marea,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
MmUnlockAddressSpace(MmGetKernelAddressSpace());
if (!NT_SUCCESS(Status))
{
ULONG Attributes,
MEMORY_AREA** Result,
BOOL FixedAddress,
- BOOL TopDown);
+ BOOL TopDown,
+ PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL);
MEMORY_AREA* MmOpenMemoryAreaByAddress(PMADDRESS_SPACE AddressSpace,
PVOID Address);
NTSTATUS MmInitMemoryAreas(VOID);
MmCreatePhysicalMemorySection(VOID);
PHYSICAL_ADDRESS
MmGetContinuousPages(ULONG NumberOfBytes,
+ PHYSICAL_ADDRESS LowestAcceptableAddress,
PHYSICAL_ADDRESS HighestAcceptableAddress,
ULONG Alignment);
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: kthread.c,v 1.45 2003/12/30 18:52:04 fireball Exp $
+/* $Id: kthread.c,v 1.46 2003/12/31 05:33:03 jfilby Exp $
*
* FILE: ntoskrnl/ke/kthread.c
* PURPOSE: Microkernel thread support
extern unsigned int init_stack;
PMEMORY_AREA StackArea;
ULONG i;
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
+
+ BoundaryAddressMultiple.QuadPart = 0;
KeInitializeDispatcherHeader(&Thread->DispatcherHeader,
InternalThreadType,
0,
&StackArea,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
MmUnlockAddressSpace(MmGetKernelAddressSpace());
if (!NT_SUCCESS(Status))
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: anonmem.c,v 1.23 2003/12/30 18:52:05 fireball Exp $
+/* $Id: anonmem.c,v 1.24 2003/12/31 05:33:03 jfilby Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/anonmem.c
ULONG RegionSize;
PVOID PBaseAddress;
ULONG PRegionSize;
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
DPRINT("NtAllocateVirtualMemory(*UBaseAddress %x, "
"ZeroBits %d, *URegionSize %x, AllocationType %x, Protect %x)\n",
PBaseAddress = *UBaseAddress;
PRegionSize = *URegionSize;
+ BoundaryAddressMultiple.QuadPart = 0;
BaseAddress = (PVOID)PAGE_ROUND_DOWN(PBaseAddress);
RegionSize = PAGE_ROUND_UP(PBaseAddress + PRegionSize) -
Protect,
&MemoryArea,
PBaseAddress != 0,
- (AllocationType & MEM_TOP_DOWN));
+ (AllocationType & MEM_TOP_DOWN),
+ BoundaryAddressMultiple);
if (!NT_SUCCESS(Status))
{
MmUnlockAddressSpace(AddressSpace);
-/* $Id: cont.c,v 1.29 2003/12/30 18:52:05 fireball Exp $
+/* $Id: cont.c,v 1.30 2003/12/31 05:33:03 jfilby Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
PVOID STDCALL
MmAllocateContiguousAlignedMemory(IN ULONG NumberOfBytes,
- IN PHYSICAL_ADDRESS HighestAcceptableAddress,
- IN ULONG Alignment)
+ IN PHYSICAL_ADDRESS LowestAcceptableAddress OPTIONAL,
+ IN PHYSICAL_ADDRESS HighestAcceptableAddress,
+ IN PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL,
+ IN MEMORY_CACHING_TYPE CacheType OPTIONAL,
+ IN ULONG Alignment)
{
PMEMORY_AREA MArea;
NTSTATUS Status;
PVOID BaseAddress = 0;
PHYSICAL_ADDRESS PBase;
+ ULONG Attributes;
ULONG i;
+ Attributes = PAGE_EXECUTE_READWRITE | PAGE_SYSTEM;
+ if (CacheType == MmNonCached || CacheType == MmWriteCombined)
+ {
+ Attributes |= PAGE_NOCACHE;
+ }
+ if (CacheType == MmWriteCombined)
+ {
+ Attributes |= PAGE_WRITECOMBINE;
+ }
+
MmLockAddressSpace(MmGetKernelAddressSpace());
Status = MmCreateMemoryArea(NULL,
MmGetKernelAddressSpace(),
0,
&MArea,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
MmUnlockAddressSpace(MmGetKernelAddressSpace());
if (!NT_SUCCESS(Status))
}
DPRINT( "Base = %x\n", BaseAddress );
PBase = MmGetContinuousPages(NumberOfBytes,
+ LowestAcceptableAddress,
HighestAcceptableAddress,
Alignment);
#if defined(__GNUC__)
#endif
MmCreateVirtualMapping(NULL,
(char*)BaseAddress + (i * 4096),
- PAGE_EXECUTE_READWRITE | PAGE_SYSTEM,
+ Attributes,
#if defined(__GNUC__)
(LARGE_INTEGER)(PBase.QuadPart + (i * 4096)),
#else
MmAllocateContiguousMemory (IN ULONG NumberOfBytes,
IN PHYSICAL_ADDRESS HighestAcceptableAddress)
{
+ PHYSICAL_ADDRESS LowestAcceptableAddress;
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
+
+ LowestAcceptableAddress.QuadPart = 0;
+ BoundaryAddressMultiple.QuadPart = 0;
+
return(MmAllocateContiguousAlignedMemory(NumberOfBytes,
+ LowestAcceptableAddress,
HighestAcceptableAddress,
+ BoundaryAddressMultiple,
+ MmCached,
PAGE_SIZE));
}
MmUnlockAddressSpace(MmGetKernelAddressSpace());
}
+/**********************************************************************
+ * NAME EXPORTED
+ * MmAllocateContiguousMemorySpecifyCache@32
+ *
+ * DESCRIPTION
+ * Allocates a range of physically contiguous memory
+ * with a cache parameter.
+ *
+ * ARGUMENTS
+ * NumberOfBytes
+ * Size of the memory block to allocate;
+ *
+ * LowestAcceptableAddress
+ * Lowest address valid for the caller.
+ *
+ * HighestAcceptableAddress
+ * Highest address valid for the caller.
+ *
+ * BoundaryAddressMultiple
+ * Address multiple not to be crossed by allocated buffer (optional).
+ *
+ * CacheType
+ * Type of caching to use.
+ *
+ * RETURN VALUE
+ * The virtual address of the memory block on success;
+ * NULL on error.
+ *
+ * REVISIONS
+ *
+ * @implemented
+ */
+PVOID STDCALL
+MmAllocateContiguousMemorySpecifyCache (IN ULONG NumberOfBytes,
+ IN PHYSICAL_ADDRESS LowestAcceptableAddress,
+ IN PHYSICAL_ADDRESS HighestAcceptableAddress,
+ IN PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL,
+ IN MEMORY_CACHING_TYPE CacheType)
+{
+ return(MmAllocateContiguousAlignedMemory(NumberOfBytes,
+ LowestAcceptableAddress,
+ HighestAcceptableAddress,
+ BoundaryAddressMultiple,
+ CacheType,
+ PAGE_SIZE));
+}
+
+/**********************************************************************
+ * NAME EXPORTED
+ * MmFreeContiguousMemorySpecifyCache@12
+ *
+ * DESCRIPTION
+ * Releases a range of physically contiguous memory allocated
+ * with MmAllocateContiguousMemorySpecifyCache.
+ *
+ * ARGUMENTS
+ * BaseAddress
+ * Virtual address of the memory to be freed.
+ *
+ * NumberOfBytes
+ * Size of the memory block to free.
+ *
+ * CacheType
+ * Type of caching used.
+ *
+ * RETURN VALUE
+ * None.
+ *
+ * REVISIONS
+ *
+ * @implemented
+ */
+VOID STDCALL
+MmFreeContiguousMemorySpecifyCache(IN PVOID BaseAddress,
+ IN ULONG NumberOfBytes,
+ IN MEMORY_CACHING_TYPE CacheType)
+{
+ MmLockAddressSpace(MmGetKernelAddressSpace());
+ MmFreeMemoryArea(MmGetKernelAddressSpace(),
+ BaseAddress,
+ NumberOfBytes,
+ MmFreeContinuousPage,
+ NULL);
+ MmUnlockAddressSpace(MmGetKernelAddressSpace());
+}
+
+
/* EOF */
PHYSICAL_ADDRESS
MmGetContinuousPages(ULONG NumberOfBytes,
+ PHYSICAL_ADDRESS LowestAcceptableAddress,
PHYSICAL_ADDRESS HighestAcceptableAddress,
ULONG Alignment)
{
start = -1;
length = 0;
- for (i = 0; i < (HighestAcceptableAddress.QuadPart / PAGE_SIZE); )
+ for (i = (LowestAcceptableAddress.QuadPart / PAGE_SIZE); i < (HighestAcceptableAddress.QuadPart / PAGE_SIZE); )
{
if (MmPageArray[i].Flags.Type == MM_PHYSICAL_PAGE_FREE)
{
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: iospace.c,v 1.23 2003/12/30 18:52:05 fireball Exp $
+/* $Id: iospace.c,v 1.24 2003/12/31 05:33:04 jfilby Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/iospace.c
NTSTATUS Status;
ULONG i;
ULONG Attributes;
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
DPRINT("MmMapIoSpace(%lx, %d, %d)\n", PhysicalAddress, NumberOfBytes, CacheEnable);
+ BoundaryAddressMultiple.QuadPart = 0;
MmLockAddressSpace(MmGetKernelAddressSpace());
Result = NULL;
Status = MmCreateMemoryArea (NULL,
0,
&marea,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
MmUnlockAddressSpace(MmGetKernelAddressSpace());
if (!NT_SUCCESS(Status))
ULONG Attributes,
MEMORY_AREA** Result,
BOOL FixedAddress,
- BOOL TopDown)
+ BOOL TopDown,
+ PHYSICAL_ADDRESS BoundaryAddressMultiple)
/*
* FUNCTION: Create a memory area
* ARGUMENTS:
* NOTES: Lock the address space before calling this function
*/
{
+ PVOID EndAddress;
ULONG tmpLength;
DPRINT("MmCreateMemoryArea(Type %d, BaseAddress %x,"
"*BaseAddress %x, Length %x, Attributes %x, Result %x)\n",
{
return STATUS_ACCESS_VIOLATION;
}
+
+ if (BoundaryAddressMultiple.QuadPart != 0)
+ {
+ EndAddress = *BaseAddress + tmpLength-1;
+ assert((*BaseAddress/BoundaryAddressMultiple) == (EndAddress/BoundaryAddressMultiple));
+ }
+
if (MmOpenMemoryAreaByRegion(AddressSpace,
*BaseAddress,
tmpLength)!=NULL)
return(STATUS_CONFLICTING_ADDRESSES);
}
}
-
+
*Result = ExAllocatePoolWithTag(NonPagedPool, sizeof(MEMORY_AREA),
TAG_MAREA);
RtlZeroMemory(*Result,sizeof(MEMORY_AREA));
-/* $Id: mdl.c,v 1.55 2003/12/30 18:52:05 fireball Exp $
+/* $Id: mdl.c,v 1.56 2003/12/31 05:33:04 jfilby Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
MEMORY_AREA* Result;
NTSTATUS Status;
PVOID Buffer;
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
+ BoundaryAddressMultiple.QuadPart = 0;
MiMdlMappingRegionHint = 0;
MiMdlMappingRegionBase = NULL;
0,
&Result,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
if (!NT_SUCCESS(Status))
{
MmUnlockAddressSpace(MmGetKernelAddressSpace());
-/* $Id: mminit.c,v 1.58 2003/12/30 18:52:05 fireball Exp $
+/* $Id: mminit.c,v 1.59 2003/12/31 05:33:04 jfilby Exp $
*
* COPYRIGHT: See COPYING in the top directory
* PROJECT: ReactOS kernel
ULONG Length;
ULONG ParamLength = KernelLength;
NTSTATUS Status;
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
//ULONG i;
DPRINT("MmInitVirtualMemory(%x, %x)\n",LastKernelAddress, KernelLength);
+ BoundaryAddressMultiple.QuadPart = 0;
LastKernelAddress = PAGE_ROUND_UP(LastKernelAddress);
MmInitMemoryAreas();
0,
&kernel_map_desc,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
BaseAddress = (PVOID)KPCR_BASE;
MmCreateMemoryArea(NULL,
0,
&kernel_kpcr_desc,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
BaseAddress = (PVOID)0xd0000000;
MmCreateMemoryArea(NULL,
0,
&kernel_mapped_low_mem_desc,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
BaseAddress = (PVOID)KERNEL_BASE;
Length = PAGE_ROUND_UP(((ULONG)&_text_end__)) - KERNEL_BASE;
0,
&kernel_text_desc,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
BaseAddress = (PVOID)PAGE_ROUND_UP(((ULONG)&_text_end__));
assert (BaseAddress == (PVOID)&_init_start__);
0,
&kernel_init_desc,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
Length = PAGE_ROUND_UP(((ULONG)&_bss_end__)) -
PAGE_ROUND_UP(((ULONG)&_init_end__));
0,
&kernel_data_desc,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
BaseAddress = (PVOID)PAGE_ROUND_UP(((ULONG)&_bss_end__));
Length = LastKernelAddress - (ULONG)BaseAddress;
0,
&kernel_param_desc,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
BaseAddress = MiNonPagedPoolStart;
MmCreateMemoryArea(NULL,
0,
&kernel_pool_desc,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
BaseAddress = MiKernelMapStart;
Status = MmCreateMemoryArea(NULL,
0,
&MiKernelMapDescriptor,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
BaseAddress = MmPagedPoolBase;
Status = MmCreateMemoryArea(NULL,
0,
&MiPagedPoolDescriptor,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
MmInitializePagedPool();
0,
&kernel_shared_data_desc,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
Status = MmRequestPageMemoryConsumer(MC_NPPOOL, TRUE,
&MmSharedDataPagePhysicalAddress);
Status = MmCreateVirtualMapping(NULL,
-/* $Id: ncache.c,v 1.26 2003/12/30 18:52:05 fireball Exp $
+/* $Id: ncache.c,v 1.27 2003/12/31 05:33:04 jfilby Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
NTSTATUS Status;
ULONG i;
ULONG Attributes;
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
+ BoundaryAddressMultiple.QuadPart = 0;
MmLockAddressSpace(MmGetKernelAddressSpace());
Result = NULL;
Status = MmCreateMemoryArea (NULL,
0,
&marea,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
MmUnlockAddressSpace(MmGetKernelAddressSpace());
if (!NT_SUCCESS(Status))
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: section.c,v 1.138 2003/12/30 18:52:05 fireball Exp $
+/* $Id: section.c,v 1.139 2003/12/31 05:33:04 jfilby Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/section.c
PMEMORY_AREA MArea;
NTSTATUS Status;
KIRQL oldIrql;
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
+
+ BoundaryAddressMultiple.QuadPart = 0;
Status = MmCreateMemoryArea(Process,
AddressSpace,
Protect,
&MArea,
FALSE,
- TopDown);
+ TopDown,
+ BoundaryAddressMultiple);
if (!NT_SUCCESS(Status))
{
DPRINT1("Mapping between 0x%.8X and 0x%.8X failed.\n",
NTSTATUS Status;
ULONG i;
PMADDRESS_SPACE AddressSpace;
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
DPRINT("MmAllocateSection(Length %x)\n",Length);
+ BoundaryAddressMultiple.QuadPart = 0;
AddressSpace = MmGetKernelAddressSpace();
Result = NULL;
MmLockAddressSpace(AddressSpace);
0,
&marea,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
MmUnlockAddressSpace(AddressSpace);
if (!NT_SUCCESS(Status))
{
-; $Id: ntoskrnl.def,v 1.170 2003/11/22 11:56:17 ekohl Exp $
+; $Id: ntoskrnl.def,v 1.171 2003/12/31 05:33:03 jfilby Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
LsaLookupAuthenticationPackage@12
LsaRegisterLogonProcess@12
MmAdjustWorkingSetSize@12
-MmAllocateContiguousAlignedMemory@16
+MmAllocateContiguousAlignedMemory@36
MmAllocateContiguousMemory@12
+MmAllocateContiguousMemorySpecifyCache@32
MmAllocateNonCachedMemory@4
MmBuildMdlForNonPagedPool@4
MmCanFileBeTruncated@8
MmFlushImageSection@8
MmForceSectionClosed@8
MmFreeContiguousMemory@4
+MmFreeContiguousMemorySpecifyCache@12
MmFreeNonCachedMemory@8
MmGetPhysicalAddress@4
MmGrowKernelStack@4
-; $Id: ntoskrnl.edf,v 1.157 2003/11/22 11:56:17 ekohl Exp $
+; $Id: ntoskrnl.edf,v 1.158 2003/12/31 05:33:03 jfilby Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
LsaLookupAuthenticationPackage=LsaLookupAuthenticationPackage@12
LsaRegisterLogonProcess=LsaRegisterLogonProcess@12
MmAdjustWorkingSetSize=MmAdjustWorkingSetSize@12
-MmAllocateContiguousAlignedMemory=MmAllocateContiguousAlignedMemory@16
+MmAllocateContiguousAlignedMemory=MmAllocateContiguousAlignedMemory@36
MmAllocateContiguousMemory=MmAllocateContiguousMemory@12
+MmAllocateContiguousMemorySpecifyCache=MmAllocateContiguousMemorySpecifyCache@32
MmAllocateNonCachedMemory=MmAllocateNonCachedMemory@4
MmBuildMdlForNonPagedPool=MmBuildMdlForNonPagedPool@4
MmCanFileBeTruncated=MmCanFileBeTruncated@8
MmFlushImageSection=MmFlushImageSection@8
MmForceSectionClosed=MmForceSectionClosed@8
MmFreeContiguousMemory=MmFreeContiguousMemory@4
+MmFreeContiguousMemorySpecifyCache=MmFreeContiguousMemorySpecifyCache@12
MmFreeNonCachedMemory=MmFreeNonCachedMemory@8
MmGetPhysicalAddress=MmGetPhysicalAddress@4
MmGrowKernelStack=MmGrowKernelStack@4
-/* $Id: process.c,v 1.122 2003/12/30 22:18:12 fireball Exp $
+/* $Id: process.c,v 1.123 2003/12/31 05:33:04 jfilby Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
PEPORT ExceptionPort;
PVOID BaseAddress;
PMEMORY_AREA MemoryArea;
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
DPRINT("NtCreateProcess(ObjectAttributes %x)\n",ObjectAttributes);
+ BoundaryAddressMultiple.QuadPart = 0;
+
Status = ObReferenceObjectByHandle(ParentProcessHandle,
PROCESS_CREATE_PROCESS,
PsProcessType,
PAGE_NOACCESS,
&MemoryArea,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
if (!NT_SUCCESS(Status))
{
MmUnlockAddressSpace(&Process->AddressSpace);
PAGE_NOACCESS,
&MemoryArea,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
if (!NT_SUCCESS(Status))
{
MmUnlockAddressSpace(&Process->AddressSpace);
PAGE_NOACCESS,
&MemoryArea,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
if (!NT_SUCCESS(Status))
{
MmUnlockAddressSpace(&Process->AddressSpace);
PAGE_READONLY,
&MemoryArea,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
MmUnlockAddressSpace(&Process->AddressSpace);
if (!NT_SUCCESS(Status))
{
-/* $Id: w32call.c,v 1.10 2003/12/30 18:52:05 fireball Exp $
+/* $Id: w32call.c,v 1.11 2003/12/31 05:33:04 jfilby Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
NTSTATUS Status;
PMEMORY_AREA StackArea;
ULONG i;
+ PHYSICAL_ADDRESS BoundaryAddressMultiple;
+ BoundaryAddressMultiple.QuadPart = 0;
StackSize = PAGE_ROUND_UP(StackSize);
MmLockAddressSpace(MmGetKernelAddressSpace());
Status = MmCreateMemoryArea(NULL,
0,
&StackArea,
FALSE,
- FALSE);
+ FALSE,
+ BoundaryAddressMultiple);
MmUnlockAddressSpace(MmGetKernelAddressSpace());
if (!NT_SUCCESS(Status))
{