mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
Kernel: Oops, actually enable CR4.PGE (page table global bit)
Turns out we were setting the wrong bit here. Now we will actually keep kernel memory mappings in the TLB across context switches.
This commit is contained in:
parent
caa5191f74
commit
3623e35978
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ void MemoryManager::initialize_paging()
|
|||
// Turn on CR4.PGE so the CPU will respect the G bit in page tables.
|
||||
asm volatile(
|
||||
"mov %cr4, %eax\n"
|
||||
"orl $0x10, %eax\n"
|
||||
"orl $0x40, %eax\n"
|
||||
"mov %eax, %cr4\n");
|
||||
|
||||
asm volatile("movl %%eax, %%cr3" ::"a"(kernel_page_directory().cr3()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue