Minor adds

This commit is contained in:
Adrien Bourmault 2020-01-21 09:16:42 +01:00
parent c8a7775b4f
commit 5594aba96b
2 changed files with 23 additions and 10 deletions

View File

@ -331,7 +331,7 @@ void MmSetPage(void* virtualAddr, ulong flags)
*page |= flags;
KeFlushTlbSingle(virtualAddr);
KeFlushTlbSingle((ulong)virtualAddr);
}
//
@ -343,7 +343,7 @@ void MmUnsetPage(void* virtualAddr, ulong flags)
*page |= flags;
KeFlushTlbSingle(virtualAddr);
KeFlushTlbSingle((ulong)virtualAddr);
}
//
@ -361,7 +361,7 @@ void MmMapPage(void* virtualAddr, void* physicalAddr, ulong flags)
/ ((ulong)KPAGESIZE)
] = (ulong)virtualAddr;
KeFlushTlbSingle(virtualAddr);
KeFlushTlbSingle((ulong)virtualAddr);
//DebugLog("Done %p at page %p\n", *page, page);
@ -376,15 +376,20 @@ void MmUnmapPage(void* virtualAddr)
{
ulong *page = MmGetPageDescriptorFromVirtual(virtualAddr);
/* MmPhysicalPageTable[(ulong)(MmTransVirtToPhyAddr(virtualAddr)) */
/* / ((ulong)KPAGESIZE) */
/* ] = 0; */
//DebugLog("Request %p:%p with %lu\n", virtualAddr, physicalAddr, flags);
/* pt[ */
/* (virtualAddr / (ulong)KPAGESIZE) % 512 */
/* ] = 0; */
MmPhysicalPageTable[(ulong)MmTransVirtToPhyAddr (virtualAddr)
/ ((ulong)KPAGESIZE)
] = (ulong)0;
KeFlushTlbSingle(virtualAddr);
*page = (ulong)0;
//DebugLog("Done %p at page %p\n", *page, page);
if ((ulong)virtualAddr == MmVirtLastAddress)
MmVirtLastAddress = (ulong)virtualAddr - KPAGESIZE;
KeFlushTlbSingle((ulong)virtualAddr);
}
//-----------

View File

@ -310,6 +310,14 @@ error_t MmTestBusyPage(ulong size, ulong flags)
DebugLog("End map : %lu ms\n", b);
DebugLog("Map time : %lu ms\n", (b-a));
a = KeGetTicks();
DebugLog("Start unmap at %p wit %p: %lu ms\n", USERSPACE, flags, a);
MmUnmapPageFrame(tab[0]);
b = KeGetTicks();
DebugLog("End map : %lu ms\n", b);
DebugLog("Map time : %lu ms\n", (b-a));
DebugLog("Finished !\n");
return EOK;