shithub: riscv

Download patch

ref: 30bf1c45cac396a3b9637cfe40cb1bba4ebca7a9
parent: 5cd7f7b0ec0df483bb5fd768ed59829e44849ed3
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun May 31 10:32:19 EDT 2020

pc, xen: make PAT support optional (for xen)

--- a/sys/src/9/pc/devarch.c
+++ b/sys/src/9/pc/devarch.c
@@ -882,6 +882,7 @@
 			rdmsr(0x01, &mct);
 	}
 
+#ifdef PATWC
 	/* IA32_PAT write combining */
 	if((m->cpuiddx & Pat) != 0 && rdmsr(0x277, &pat) != -1){
 		pat &= ~(255LL<<(PATWC*8));
@@ -888,6 +889,7 @@
 		pat |= 1LL<<(PATWC*8);	/* WC */
 		wrmsr(0x277, pat);
 	}
+#endif
 
 	if(m->cpuiddx & Mtrr)
 		mtrrsync();