Esempio n. 1
0
        public static unsafe void Map(this IPageTable table, Addr virtAddr, Addr physAddr, IPageFrameAllocator physAllocator, bool present = true, bool flush = false)
        {
            var page  = physAllocator.GetPageByAddress(physAddr);
            var pAddr = physAllocator.GetAddress(page);

            while (true)
            {
                table.Map(virtAddr, pAddr, present, flush);
                page  = physAllocator.NextCompoundPage(page);
                pAddr = physAllocator.GetAddress(page);
                if (page == null || pAddr == physAddr)
                {
                    break;
                }
                virtAddr += 4096;
            }
        }
Esempio n. 2
0
 public static Page *GetPhysPage(Addr physAddr)
 {
     return(Default.GetPageByAddress(physAddr));
 }
Esempio n. 3
0
 public static void FreeAddr(this IPageFrameAllocator allocator, Addr addr)
 {
     allocator.Free(allocator.GetPageByAddress(addr));
 }