mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 14:05:42 +00:00
[NTOSKRNL]
Remove deprecated and unused functions MmDisableVirtualMapping and MmRawDeleteVirtualMapping svn path=/trunk/; revision=61090
This commit is contained in:
parent
0973b7e223
commit
3f0ef714a4
7 changed files with 2 additions and 287 deletions
|
@ -1290,15 +1290,6 @@ VOID
|
|||
NTAPI
|
||||
MmInitGlobalKernelPageDirectory(VOID);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmDisableVirtualMapping(
|
||||
struct _EPROCESS *Process,
|
||||
PVOID Address,
|
||||
BOOLEAN* WasDirty,
|
||||
PPFN_NUMBER Page
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmEnableVirtualMapping(
|
||||
|
@ -1306,11 +1297,6 @@ MmEnableVirtualMapping(
|
|||
PVOID Address
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmRawDeleteVirtualMapping(PVOID Address);
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmGetPageFileMapping(
|
||||
|
|
|
@ -506,20 +506,6 @@ Mmi386ReleaseMmInfo(PEPROCESS Process)
|
|||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmRawDeleteVirtualMapping(PVOID Address)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmDeleteVirtualMapping(
|
||||
|
|
|
@ -155,24 +155,6 @@ MmGetPageDirectory(VOID)
|
|||
return (PULONG)KeArmTranslationTableRegisterGet().AsUlong;
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmDisableVirtualMapping(IN PEPROCESS Process,
|
||||
IN PVOID Address,
|
||||
OUT PBOOLEAN WasDirty,
|
||||
OUT PPFN_NUMBER Page)
|
||||
{
|
||||
UNIMPLEMENTED_DBGBREAK();
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmEnableVirtualMapping(IN PEPROCESS Process,
|
||||
IN PVOID Address)
|
||||
{
|
||||
UNIMPLEMENTED_DBGBREAK();
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
MmCreateVirtualMappingUnsafe(IN PEPROCESS Process,
|
||||
|
|
|
@ -388,19 +388,6 @@ MmGetPageDirectory(VOID)
|
|||
return (PULONG)KeArmTranslationTableRegisterGet().AsUlong;
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmDisableVirtualMapping(IN PEPROCESS Process,
|
||||
IN PVOID Address,
|
||||
OUT PBOOLEAN WasDirty,
|
||||
OUT PPFN_NUMBER Page)
|
||||
{
|
||||
//
|
||||
// TODO
|
||||
//
|
||||
UNIMPLEMENTED_DBGBREAK();
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmEnableVirtualMapping(IN PEPROCESS Process,
|
||||
|
@ -575,30 +562,6 @@ MmCreateVirtualMapping(IN PEPROCESS Process,
|
|||
PageCount);
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmRawDeleteVirtualMapping(IN PVOID Address)
|
||||
{
|
||||
PMMPTE PointerPte;
|
||||
|
||||
//
|
||||
// Get the PTE
|
||||
//
|
||||
PointerPte = MiGetPageTableForProcess(NULL, Address, FALSE);
|
||||
if ((PointerPte) && (PointerPte->u.Hard.Valid))
|
||||
{
|
||||
//
|
||||
// Destroy it
|
||||
//
|
||||
PointerPte->u.Hard.AsUlong = 0;
|
||||
|
||||
//
|
||||
// Flush the TLB
|
||||
//
|
||||
MiFlushTlb(PointerPte, Address);
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmDeleteVirtualMapping(IN PEPROCESS Process,
|
||||
|
|
|
@ -146,7 +146,7 @@ ULONG MmProtectToValue[32] =
|
|||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
BOOLEAN MmUnmapPageTable(PULONG Pt);
|
||||
static BOOLEAN MmUnmapPageTable(PULONG Pt);
|
||||
|
||||
VOID
|
||||
MiFlushTlb(PULONG Pt, PVOID Address)
|
||||
|
@ -326,7 +326,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
|
|||
return Pt;
|
||||
}
|
||||
|
||||
BOOLEAN MmUnmapPageTable(PULONG Pt)
|
||||
static BOOLEAN MmUnmapPageTable(PULONG Pt)
|
||||
{
|
||||
if (!IS_HYPERSPACE(Pt))
|
||||
{
|
||||
|
@ -369,69 +369,6 @@ MmGetPfnForProcess(PEPROCESS Process,
|
|||
return(PTE_TO_PFN(Entry));
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page)
|
||||
/*
|
||||
* FUNCTION: Delete a virtual mapping
|
||||
*/
|
||||
{
|
||||
BOOLEAN WasValid;
|
||||
ULONG Pte;
|
||||
PULONG Pt;
|
||||
|
||||
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
|
||||
if (Pt == NULL)
|
||||
{
|
||||
KeBugCheck(MEMORY_MANAGEMENT);
|
||||
}
|
||||
|
||||
/*
|
||||
* Atomically disable the present bit and get the old value.
|
||||
*/
|
||||
do
|
||||
{
|
||||
Pte = *Pt;
|
||||
} while (Pte != InterlockedCompareExchangePte(Pt, Pte & ~PA_PRESENT, Pte));
|
||||
|
||||
MiFlushTlb(Pt, Address);
|
||||
|
||||
WasValid = (Pte & PA_PRESENT);
|
||||
if (!WasValid)
|
||||
{
|
||||
KeBugCheck(MEMORY_MANAGEMENT);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return some information to the caller
|
||||
*/
|
||||
if (WasDirty != NULL)
|
||||
{
|
||||
*WasDirty = Pte & PA_DIRTY;
|
||||
}
|
||||
if (Page != NULL)
|
||||
{
|
||||
*Page = PTE_TO_PFN(Pte);
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmRawDeleteVirtualMapping(PVOID Address)
|
||||
{
|
||||
PULONG Pt;
|
||||
|
||||
Pt = MmGetPageTableForProcess(NULL, Address, FALSE);
|
||||
if (Pt && *Pt)
|
||||
{
|
||||
/*
|
||||
* Set the entry to zero
|
||||
*/
|
||||
InterlockedExchangePte(Pt, 0);
|
||||
MiFlushTlb(Pt, Address);
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
|
||||
|
|
|
@ -808,126 +808,6 @@ MmGetPfnForProcess(PEPROCESS Process,
|
|||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page)
|
||||
/*
|
||||
* FUNCTION: Delete a virtual mapping
|
||||
*/
|
||||
{
|
||||
BOOLEAN WasValid;
|
||||
if (Ke386Pae)
|
||||
{
|
||||
ULONGLONG Pte;
|
||||
ULONGLONG tmpPte;
|
||||
PULONGLONG Pt;
|
||||
|
||||
Pt = MmGetPageTableForProcessForPAE(Process, Address, FALSE);
|
||||
if (Pt == NULL)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
/*
|
||||
* Atomically disable the present bit and get the old value.
|
||||
*/
|
||||
do
|
||||
{
|
||||
Pte = *Pt;
|
||||
tmpPte = Pte & ~PA_PRESENT;
|
||||
} while (Pte != ExfInterlockedCompareExchange64UL(Pt, &tmpPte, &Pte));
|
||||
|
||||
MiFlushTlb((PULONG)Pt, Address);
|
||||
WasValid = PAE_PAGE_MASK(Pte) != 0LL ? TRUE : FALSE;
|
||||
if (!WasValid)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return some information to the caller
|
||||
*/
|
||||
if (WasDirty != NULL)
|
||||
{
|
||||
*WasDirty = Pte & PA_DIRTY ? TRUE : FALSE;
|
||||
}
|
||||
if (Page != NULL)
|
||||
{
|
||||
*Page = PAE_PTE_TO_PFN(Pte);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ULONG Pte;
|
||||
PULONG Pt;
|
||||
|
||||
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
|
||||
if (Pt == NULL)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
/*
|
||||
* Atomically disable the present bit and get the old value.
|
||||
*/
|
||||
do
|
||||
{
|
||||
Pte = *Pt;
|
||||
} while (Pte != InterlockedCompareExchangeUL(Pt, Pte & ~PA_PRESENT, Pte));
|
||||
|
||||
MiFlushTlb(Pt, Address);
|
||||
WasValid = (PAGE_MASK(Pte) != 0);
|
||||
if (!WasValid)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return some information to the caller
|
||||
*/
|
||||
if (WasDirty != NULL)
|
||||
{
|
||||
*WasDirty = Pte & PA_DIRTY;
|
||||
}
|
||||
if (Page != NULL)
|
||||
{
|
||||
*Page = PTE_TO_PFN(Pte);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmRawDeleteVirtualMapping(PVOID Address)
|
||||
{
|
||||
if (Ke386Pae)
|
||||
{
|
||||
PULONGLONG Pt;
|
||||
ULONGLONG ZeroPte = 0LL;
|
||||
Pt = MmGetPageTableForProcessForPAE(NULL, Address, FALSE);
|
||||
if (Pt)
|
||||
{
|
||||
/*
|
||||
* Set the entry to zero
|
||||
*/
|
||||
(void)ExfpInterlockedExchange64UL(Pt, &ZeroPte);
|
||||
MiFlushTlb((PULONG)Pt, Address);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PULONG Pt;
|
||||
|
||||
Pt = MmGetPageTableForProcess(NULL, Address, FALSE);
|
||||
if (Pt && *Pt)
|
||||
{
|
||||
/*
|
||||
* Set the entry to zero
|
||||
*/
|
||||
(void)InterlockedExchangeUL(Pt, 0);
|
||||
MiFlushTlb(Pt, Address);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
|
||||
|
|
|
@ -199,25 +199,6 @@ MmGetPfnForProcess(PEPROCESS Process,
|
|||
return((PFN_NUMBER)MmGetPhysicalAddressProcess(Process, Address) >> PAGE_SHIFT);
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page)
|
||||
/*
|
||||
* FUNCTION: Delete a virtual mapping
|
||||
*/
|
||||
{
|
||||
ppc_map_info_t info = { 0 };
|
||||
info.proc = Process ? (int)Process->UniqueProcessId : 0;
|
||||
info.addr = (vaddr_t)Address;
|
||||
MmuUnmapPage(&info, 1);
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmRawDeleteVirtualMapping(PVOID Address)
|
||||
{
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue