summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1997-10-06 02:11:32 +0000
committerdyson <dyson@FreeBSD.org>1997-10-06 02:11:32 +0000
commita96b1911b8da2ab634bc058d4921b02c3c30f315 (patch)
treee84bcdff36e0ec3fa24020afad03a1e3553ce081 /sys/amd64
parent59cc2d40331a440c5510374986d6f949a64a1dab (diff)
downloadFreeBSD-src-a96b1911b8da2ab634bc058d4921b02c3c30f315.zip
FreeBSD-src-a96b1911b8da2ab634bc058d4921b02c3c30f315.tar.gz
It is possible that MB's with really broken bios's not set up more of
the mtrr registers. This just fills in more of the registers.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/mp_machdep.c8
-rw-r--r--sys/amd64/amd64/mptable.c8
-rw-r--r--sys/amd64/include/mptable.h8
3 files changed, 24 insertions, 0 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 79ff79d2..2927ace 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -2036,6 +2036,14 @@ void
putfmtrr() {
if (cpu_class == CPUCLASS_686) {
wbinvd();
+ /*
+ * Set memory between 0-640K to be WB
+ */
+ wrmsr(0x250, 0x0606060606060606LL);
+ wrmsr(0x258, 0x0606060606060606LL);
+ /*
+ * Set normal, PC video memory to be WC
+ */
wrmsr(0x259, 0x0101010101010101LL);
}
}
diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c
index 79ff79d2..2927ace 100644
--- a/sys/amd64/amd64/mptable.c
+++ b/sys/amd64/amd64/mptable.c
@@ -2036,6 +2036,14 @@ void
putfmtrr() {
if (cpu_class == CPUCLASS_686) {
wbinvd();
+ /*
+ * Set memory between 0-640K to be WB
+ */
+ wrmsr(0x250, 0x0606060606060606LL);
+ wrmsr(0x258, 0x0606060606060606LL);
+ /*
+ * Set normal, PC video memory to be WC
+ */
wrmsr(0x259, 0x0101010101010101LL);
}
}
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index 79ff79d2..2927ace 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -2036,6 +2036,14 @@ void
putfmtrr() {
if (cpu_class == CPUCLASS_686) {
wbinvd();
+ /*
+ * Set memory between 0-640K to be WB
+ */
+ wrmsr(0x250, 0x0606060606060606LL);
+ wrmsr(0x258, 0x0606060606060606LL);
+ /*
+ * Set normal, PC video memory to be WC
+ */
wrmsr(0x259, 0x0101010101010101LL);
}
}
OpenPOWER on IntegriCloud