Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 527 of file init.c.
Referenced by MiBuildPfnDatabase().
{ PMMPFN Pfn; ASSERT(!MiIsMemoryTypeInvisible(MemoryType)); /* Check if the memory is free */ if (MiIsMemoryTypeFree(MemoryType)) { /* Get the last pfn of this descriptor. Note we loop backwards */ Pfn = &MmPfnDatabase[BasePage + PageCount - 1]; /* Loop all pages */ while (PageCount--) { /* Add it to the free list */ Pfn->u3.e1.CacheAttribute = MiNonCached; MiInsertPageInFreeList(BasePage + PageCount); /* Go to the previous page */ Pfn--; } } else if (MemoryType == LoaderXIPRom) { Pfn = &MmPfnDatabase[BasePage]; while (PageCount--) { /* Make it a pseudo-I/O ROM mapping */ Pfn->PteAddress = 0; Pfn->u1.Flink = 0; Pfn->u2.ShareCount = 0; Pfn->u3.e1.PageLocation = 0; Pfn->u3.e1.CacheAttribute = MiNonCached; Pfn->u3.e1.Rom = 1; Pfn->u3.e1.PrototypePte = 1; Pfn->u3.e2.ReferenceCount = 0; Pfn->u4.InPageError = 0; Pfn->u4.PteFrame = 0; /* Advance one */ Pfn++; } } else if (MemoryType == LoaderBad) { // FIXME: later ASSERT(FALSE); } else { /* For now skip it */ DbgPrint("Skipping BasePage=0x%lx, PageCount=0x%lx, MemoryType=%lx\n", BasePage, PageCount, MemoryType); Pfn = &MmPfnDatabase[BasePage]; while (PageCount--) { /* Make an active PFN */ Pfn->u3.e1.PageLocation = ActiveAndValid; /* Advance one */ Pfn++; } } }