Author: jimtabor
Date: Tue Oct 20 01:04:50 2009
New Revision: 43633
URL:
http://svn.reactos.org/svn/reactos?rev=43633&view=rev
Log:
- Add more information for support with function MmPageEntireDriver. Not sure where to
place the function since it uses numbers for IX86/AMD and not ARM. Enable
MmDisablePagingExecutive without the register entry to support it.
Modified:
trunk/reactos/ntoskrnl/config/cmdata.c
trunk/reactos/ntoskrnl/include/internal/mm.h
trunk/reactos/ntoskrnl/mm/ARM3/drvmgmt.c
trunk/reactos/ntoskrnl/mm/mminit.c
Modified: trunk/reactos/ntoskrnl/config/cmdata.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmdata.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmdata.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmdata.c [iso-8859-1] Tue Oct 20 01:04:50 2009
@@ -387,7 +387,7 @@
{
L"Session Manager\\Memory Management",
L"DisablePagingExecutive",
- &DummyData,
+ &MmDisablePagingExecutive,
NULL,
NULL
},
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Tue Oct 20 01:04:50 2009
@@ -14,6 +14,7 @@
extern ULONG MmTotalNonPagedPoolQuota;
extern PHYSICAL_ADDRESS MmSharedDataPagePhysicalAddress;
extern ULONG MmNumberOfPhysicalPages;
+extern UCHAR MmDisablePagingExecutive;
extern ULONG MmLowestPhysicalPage;
extern ULONG MmHighestPhysicalPage;
extern ULONG MmAvailablePages;
Modified: trunk/reactos/ntoskrnl/mm/ARM3/drvmgmt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/drvmgmt.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/drvmgmt.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/drvmgmt.c [iso-8859-1] Tue Oct 20 01:04:50 2009
@@ -119,8 +119,32 @@
//
// We should find the driver loader entry and return its base address
//
+ //PMMPTE Pte;
PLDR_DATA_TABLE_ENTRY pLdrDataTabEntry =
MiLookupDataTableEntry(AddressWithinSection);
- if (pLdrDataTabEntry) return pLdrDataTabEntry->DllBase;
+ if (pLdrDataTabEntry)
+ {
+ //
+ // Is Paging Disabled or Check if we had already mapped it in for this section
+ //
+ if ( (MmDisablePagingExecutive & 1) || pLdrDataTabEntry->SectionPointer )
+ {
+ return pLdrDataTabEntry->DllBase;
+ }
+ //
+ // Flush all queued DPCs.
+ //
+ KeFlushQueuedDpcs();
+ //
+ // Get the PTE for this section
+ //
+ //Pte = MiGetPteAddress(pLdrDataTabEntry->DllBase);
+ //
+ //MiSetPagingOfDriver( (Pte & (4,194,304 - 4) ) - 0x40000000 ,
+ // (Pte & (4,194,304 - 4) ) - 0x40000000 + 4 *
+ // pLdrDataTabEntry->SizeOfImage >>
PAGE_SHIFT - 4 );
+ //
+ return pLdrDataTabEntry->DllBase;
+ }
return NULL;
}
Modified: trunk/reactos/ntoskrnl/mm/mminit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=4…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] Tue Oct 20 01:04:50 2009
@@ -50,6 +50,10 @@
PBOOLEAN Mm64BitPhysicalAddress = FALSE;
ULONG MmReadClusterSize;
+//
+// 0 | 1 is on/off paging, 2 is undocumented
+//
+UCHAR MmDisablePagingExecutive = 1; // Forced to off
PMMPTE MmSharedUserDataPte;
PMMSUPPORT MmKernelAddressSpace;
extern KMUTANT MmSystemLoadLock;