1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 19:45:08 +00:00

Kernel: Uh, actually *actually* turn on CR4.PGE

I'm not sure how I managed to misread the location of this bit twice.
But I did! Here is finally the correct value, according to Intel:

    "Page Global Enable (bit 7 of CR4)"

Jeez! :^)
This commit is contained in:
Andreas Kling 2019-12-25 02:56:18 +01:00
parent 0e45b9423b
commit c9a5253ac2

View file

@ -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 $0x40, %eax\n"
"orl $0x80, %eax\n"
"mov %eax, %cr4\n");
asm volatile("movl %%eax, %%cr3" ::"a"(kernel_page_directory().cr3()));