# Setup 64-bit paging:
mov $PML4T - KERNEL_VMA, %eax
+ or $0x10, %eax # NO CACHE
mov %eax, %cr3
# Enable PAE paging, and global pages:
# Setup new page tables:
mov $PML4T - KERNEL_VMA, %rax
+ or $0x10, %eax # NO CACHE
mov %rax, %cr3
# Setup TSS address in GDT
}
void os::paging::load_pml4t(phys_ptr<PML4T> PML4T) {
- asm volatile("mov %0, %%cr3" :: "r" (PML4T) : "memory");
+ asm volatile("mov %0, %%cr3" :: "r" (PML4T.get_phys_addr() | 0x10) : "memory"); // 0x10 disables the cache.
}
os::paging::page_allocator_t os::paging::page_allocator{};