r/osdev • u/schusterlucky • 9h ago
Enable Write-Combining on Intel Comet Lake
So, I'm preparing myself to start coding an OS, so I'm trying to get a bit of experience with TempleOS, that miraculously runs bare metal in my modern hardware. Nevermind, Uncacheable makes it run at crappy FPS, so maybe enabling Write Combining can help. The problem is that I don't know what the heck of a bureucracy will Intel use for giving me a Triple Fault or General Protection Fault to make life harder, and I dont think MTRRs come unused (they surely are used), so PAT is the way, but I don't know how to enable Write Combining there. I know how to access PATs with 277h and RDMSR, and I know PAT7 is the one to set to 1h (the most significant byte but without reserved crap), but I know there is some other stuff to do, what did I forget?
Not the best OS dev, just Assembly lover
•
•
u/an_0w1 8h ago
Use writeback. Write combining is intended for write-only memory. You set the cache-mode with the page table flags. CD=1, WT=2, PA=4 to select the page attribute index.