ref: 31d4a0d62988f75b2cb4051fd3db5a22ac6bd242
parent: 4af50fee6567842abb2bc91607b9fd74583337ac
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Dec 11 10:23:03 EST 2020
pc, pc64: make sure write combining is supported in MTRR's before setting it
--- a/sys/src/9/pc/mtrr.c
+++ b/sys/src/9/pc/mtrr.c
@@ -678,6 +678,10 @@
if((new.type = str2type(tstr)) < 0)
return "bad cache type";
+ if(new.type == Writecomb
+ && (cpu0state.cap & Capwc) == 0)
+ return "write combining not supported";
+
qlock(&mtrrlk);
newstate = cpu0state;
nr = getranges(&newstate, ranges, Nranges, &new);
--
⑨