Minor adds
This commit is contained in:
parent
c8a7775b4f
commit
5594aba96b
|
@ -331,7 +331,7 @@ void MmSetPage(void* virtualAddr, ulong flags)
|
||||||
|
|
||||||
*page |= flags;
|
*page |= flags;
|
||||||
|
|
||||||
KeFlushTlbSingle(virtualAddr);
|
KeFlushTlbSingle((ulong)virtualAddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -343,7 +343,7 @@ void MmUnsetPage(void* virtualAddr, ulong flags)
|
||||||
|
|
||||||
*page |= flags;
|
*page |= flags;
|
||||||
|
|
||||||
KeFlushTlbSingle(virtualAddr);
|
KeFlushTlbSingle((ulong)virtualAddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -361,7 +361,7 @@ void MmMapPage(void* virtualAddr, void* physicalAddr, ulong flags)
|
||||||
/ ((ulong)KPAGESIZE)
|
/ ((ulong)KPAGESIZE)
|
||||||
] = (ulong)virtualAddr;
|
] = (ulong)virtualAddr;
|
||||||
|
|
||||||
KeFlushTlbSingle(virtualAddr);
|
KeFlushTlbSingle((ulong)virtualAddr);
|
||||||
|
|
||||||
//DebugLog("Done %p at page %p\n", *page, page);
|
//DebugLog("Done %p at page %p\n", *page, page);
|
||||||
|
|
||||||
|
@ -376,15 +376,20 @@ void MmUnmapPage(void* virtualAddr)
|
||||||
{
|
{
|
||||||
ulong *page = MmGetPageDescriptorFromVirtual(virtualAddr);
|
ulong *page = MmGetPageDescriptorFromVirtual(virtualAddr);
|
||||||
|
|
||||||
/* MmPhysicalPageTable[(ulong)(MmTransVirtToPhyAddr(virtualAddr)) */
|
//DebugLog("Request %p:%p with %lu\n", virtualAddr, physicalAddr, flags);
|
||||||
/* / ((ulong)KPAGESIZE) */
|
|
||||||
/* ] = 0; */
|
|
||||||
|
|
||||||
/* pt[ */
|
MmPhysicalPageTable[(ulong)MmTransVirtToPhyAddr (virtualAddr)
|
||||||
/* (virtualAddr / (ulong)KPAGESIZE) % 512 */
|
/ ((ulong)KPAGESIZE)
|
||||||
/* ] = 0; */
|
] = (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);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------
|
//-----------
|
||||||
|
|
|
@ -310,6 +310,14 @@ error_t MmTestBusyPage(ulong size, ulong flags)
|
||||||
DebugLog("End map : %lu ms\n", b);
|
DebugLog("End map : %lu ms\n", b);
|
||||||
DebugLog("Map time : %lu ms\n", (b-a));
|
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");
|
DebugLog("Finished !\n");
|
||||||
|
|
||||||
return EOK;
|
return EOK;
|
||||||
|
|
Loading…
Reference in New Issue