Setting Up Paging: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
Expanded article with a short tutorial. |
→Creating a Blank Page Directory: added page align notes |
||
Line 23: | Line 23: | ||
First we need a piece of free memory where we can keep the page directory. |
First we need a piece of free memory where we can keep the page directory. |
||
If you know where the end of your kernel is, then you can put the page directory right after it. |
If you know where the end of your kernel is, then you can put the page directory right after it. |
||
Note that all of your paging structures need to be at page aligned addresses, so it's probably a good idea to make a page allocator first and have that dish out pages for your paging code. |
|||
<pre> |
<pre> |
||
//the page directory comes right after the kernel |
//the page directory comes right after the kernel - NOTE: make sure the address is page aligned! |
||
unsigned int *page_directory = (unsigned int*)end; |
unsigned int *page_directory = (unsigned int*)end; |
||
</pre> |
</pre> |