pc, pc64: make sure write combining is supported in MTRR's before setting it

This commit is contained in:
cinap_lenrek 2020-12-11 15:23:03 +01:00
parent 658c994cff
commit fc0f08c651

View file

@ -678,6 +678,10 @@ mtrr(uvlong base, uvlong size, char *tstr)
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);