mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 01:42:30 +00:00
- 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.
svn path=/trunk/; revision=43633
This commit is contained in:
parent
3fcf38a55e
commit
15f63b0f9d
|
@ -387,7 +387,7 @@ CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
|
|||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"DisablePagingExecutive",
|
||||
&DummyData,
|
||||
&MmDisablePagingExecutive,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
|
|
@ -14,6 +14,7 @@ extern ULONG MmTotalPagedPoolQuota;
|
|||
extern ULONG MmTotalNonPagedPoolQuota;
|
||||
extern PHYSICAL_ADDRESS MmSharedDataPagePhysicalAddress;
|
||||
extern ULONG MmNumberOfPhysicalPages;
|
||||
extern UCHAR MmDisablePagingExecutive;
|
||||
extern ULONG MmLowestPhysicalPage;
|
||||
extern ULONG MmHighestPhysicalPage;
|
||||
extern ULONG MmAvailablePages;
|
||||
|
|
|
@ -119,8 +119,32 @@ MmPageEntireDriver(IN PVOID AddressWithinSection)
|
|||
//
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,6 +50,10 @@ MemType[] =
|
|||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue