Configure PAT to allow use of WC cache

This commit is contained in:
pjht 2025-03-08 10:49:22 -06:00
parent e753cd09b0
commit eb24bb854e
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -106,8 +106,7 @@ use tasking::{SleepReason, TASKING};
use virtual_memory::{ACTIVE_SPACE, KERNEL_SPACE};
use x86_64::{
registers::{
control::{Cr0, Cr0Flags, Cr4, Cr4Flags},
rflags::{self, RFlags},
control::{Cr0, Cr0Flags, Cr4, Cr4Flags}, model_specific::Msr, rflags::{self, RFlags}
},
structures::paging::{Page, PageTableFlags},
VirtAddr,
@ -132,6 +131,8 @@ pub fn main() {
unsafe {
rflags::write(rflags_data);
}
//unsafe { Msr::new(0x277).write(0x0007_0501_0007_0406) };
unsafe { Msr::new(0x277).write(0x0007_0406_0507_0406) };
// Enable the FPU
unsafe {
Cr0::update(|cr0| {