Setting Up Paging: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
m Added link
Line 86: Line 86:


===Enable Paging===
===Enable Paging===
The final step is to actually enable paging. First we tell the processor where to find our page table by putting it's address into the cr3 register. Because C code can not directly access the computer's registers, we will need to use inline assembly to set cr3. The following inline assembly is written for GCC. If you use a different compiler then you will need to translate between this assembly format and the format supported by your compiler.
The final step is to actually enable paging. First we tell the processor where to find our page directory by putting it's address into the cr3 register. Because C code can not directly access the computer's registers, we will need to use inline assembly to set cr3. The following inline assembly is written for GCC. If you use a different compiler then you will need to translate between this assembly format and the format supported by your compiler.


<source lang="c">
<source lang="c">