Lines Matching refs:page

65 		// page hole set up in the boot loader
69 // calculate where the page dir would be
76 TRACE("page hole: %p\n", fPageHole);
77 TRACE("page dir: %p (physical: %#" B_PRIxPHYSADDR ")\n",
87 // count the page tables we have to translate
96 TRACE("page tables to translate: %" B_PRIu32 "\n", pageTableCount);
99 // + 1 page dir pointer table
100 // + 4 page dirs
101 // + 2 * page tables (each has 512 instead of 1024 entries)
102 // + 1 page for the free virtual slot (no physical page needed)
105 // We need additional PAE page tables for the new pages we're going to
108 // page tables, but we don't need additional virtual space for them,
109 // since we can access then via the page hole.
117 // prepare the page directory pointer table
132 // and setting the cr4 PAE bit -- we copy the kernel page dir entries to
133 // the PDPT page, so after setting cr3, we continue to have working
135 // page dir entries don't interect, obviously.
139 // translate the page tables
143 // two PAE page tables per 32 bit page table
147 // copy the page directory entry to the PDPT page
191 // allocate a PAE page table
196 // enter it into the page dir
240 // allocate pages for the 32 bit page tables and prepare the tables
243 // allocate a page
246 // put the page into the page dir
258 // We don't need a physical page for the free virtual slot.
263 // allocate a page
266 // put the page into the page table
272 // Write the page's physical address into the page itself, so we
290 panic("Failed to allocate page for the switch to PAE!");
298 panic("Failed to allocate 32 bit addressable page for the switch "
313 void* page = fAllocatedPages + (fUsedPagesCount++) * B_PAGE_SIZE;
314 _physicalAddress = *((phys_addr_t*)page);
317 memset(page, 0, B_PAGE_SIZE);
319 return page;
403 "physical page pool space in virtual address space!");
407 // allocate memory for the page table and data
414 "to allocate memory for page table!");
418 // clear the page table and put it in the page dir
444 area_id area = create_area("physical page pool", &temp,
449 "create area for physical page pool.");
457 "physical page pool space", &temp, B_EXACT_ADDRESS,
461 "create area for physical page pool space.");
518 // create an area that can contain the page table and the slot
526 area_id dataArea = create_area_etc(B_SYSTEM_TEAM, "physical page pool",
536 VMAddressSpace::KernelID(), "physical page pool space",
544 // prepare the page table
547 // get the page table's physical address
556 // put the page table into the page directory
601 // create the initial pools for the physical page mapper
610 "for physical page mapper!");
615 // create physical page mapper
634 // let the initial page pools create areas for its structures
643 // The early physical page mapping mechanism is no longer needed. Unmap the
678 // check to see if a page table exists for this range
683 // we need to allocate a page table
686 TRACE("X86PagingMethodPAE::MapEarly(): asked for free page for "
687 "page table: %#" B_PRIxPHYSADDR "\n", physicalPageTable);
689 // put it in the page dir
721 // we can't check much without the physical page mapper
725 // We only trust the kernel team's page directories. So switch to the
749 // map the page dir and get the entry
763 // map the page table and get the entry
778 // switch back to the original page directory
799 // TODO: We ignore the attributes of the page table -- for compatibility
814 pae_page_table_entry page = (physicalAddress & X86_PAE_PTE_ADDRESS_MASK)
818 // if the page is user accessible, it's automatically
822 page |= X86_PAE_PTE_USER;
824 page |= X86_PAE_PTE_WRITABLE;
827 page |= X86_PAE_PTE_NOT_EXECUTABLE;
830 page |= X86_PAE_PTE_WRITABLE;
832 // put it in the page table
833 SetTableEntry(entry, page);
841 // get a free page
843 vm_page* page;
845 page = fFreePages;
846 fFreePages = page->cache_next;
855 page = vm_page_allocate_page_run(PAGE_STATE_UNUSED, 1, &restrictions,
857 if (page == NULL)
860 DEBUG_PAGE_ACCESS_END(page);
863 // map the page
865 = (phys_addr_t)page->physical_page_number * B_PAGE_SIZE;
869 // mapping failed -- free page
871 page->cache_next = fFreePages;
872 fFreePages = page;
886 // unmap the page
890 vm_page* page = vm_lookup_page(physicalAddress / B_PAGE_SIZE);
894 page->cache_next = fFreePages;
895 fFreePages = page;
900 DEBUG_PAGE_ACCESS_START(page);
901 vm_page_free(NULL, page);
931 // page mapping not valid