pc, pc64: make sure write combining is supported in MTRR's before setting it
This commit is contained in:
parent
658c994cff
commit
fc0f08c651
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue