Next: free_area_init()
Up: Page table setup
Previous: paging_init()
Setting up page table is just a task of allocating pages for the page
directories and adding page table entries in these pages. The algorithm is
presented here. The algorithm does not explain about page middle directories
yet.
- Memory for the swapper_pg_dir is already allocated. Allocate physical
pages (using the bootmem allocator).
- The number of pages required depends on the amount of physical pages
present and the number of "page table entries" a page directory can accomodate
(Specified by PTRS_PER_PTE define).
- For each physical page add an entry in the page directory.
- Now, put the page directory entries into the page global directory.
When such an arrangement is done, it is possible to transform the virtual
address passsed to the processor, into physical one, by the paging circutary.
The actual happenings in pagetable_init() is presented as a flow chart here
2002-09-22