Setting Up Paging With PAE: Difference between revisions

[unchecked revision][unchecked revision]
m (Mark as in progress)
Line 42:
Ok, pages are mapped. Now we have to set the PAE-bit and load the PDPT into CR3
<source lang="c">
asm volatile ("movl %%cr4, %%eax; bts $5, %%eax; movl %%eax, %%cr4" ::: "eax"); // set bit5 in CR4 to enable PAE
asm volatile ("movl %%eax0, %%cr3" :: "ar" (&page_dir_ptr_tab)); // load PDPT into CR3
</source>
 
Line 49:
Simply done:
<source lang="c">
asm volatile ("movl %%cr0, %%eax; orl $0x80000000, %%eax; movl %%eax, %%cr0;" ::: "eax");
</source>
 
12

edits