pc, pc64: work around bhyve all uncached MTRR's
This commit is contained in:
parent
635be84831
commit
cef91f23e7
1 changed files with 10 additions and 2 deletions
|
@ -383,7 +383,15 @@ e820scan(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* RAM needs to be writeback */
|
/*
|
||||||
|
* Make sure RAM is set to writeback,
|
||||||
|
* but do a sanity check first checking
|
||||||
|
* that the kernel text is writeback.
|
||||||
|
* This is needed as some emulators (bhyve)
|
||||||
|
* set everything to uncached.
|
||||||
|
*/
|
||||||
|
s = mtrrattr(PADDR(KTZERO), nil);
|
||||||
|
if(s != nil && strcmp(s, "wb") == 0)
|
||||||
mtrrexclude(MemRAM, "wb");
|
mtrrexclude(MemRAM, "wb");
|
||||||
|
|
||||||
for(base = memmapnext(-1, MemRAM); base != -1; base = memmapnext(base, MemRAM)){
|
for(base = memmapnext(-1, MemRAM); base != -1; base = memmapnext(base, MemRAM)){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue