aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/memcontrol
diff options
context:
space:
mode:
authorDavid Malone <dwmalone@FreeBSD.org>2002-09-15 15:07:55 +0000
committerDavid Malone <dwmalone@FreeBSD.org>2002-09-15 15:07:55 +0000
commit93f39ea88a7456358256c4a72ba4ee43ba266155 (patch)
tree12e1e1bf10ab9f5cfe0d9b564ef93fbde0e43737 /usr.sbin/memcontrol
parent8556ba2b73a3afc1c9a8960f156cab674ecf76c9 (diff)
downloadsrc-93f39ea88a7456358256c4a72ba4ee43ba266155.tar.gz
src-93f39ea88a7456358256c4a72ba4ee43ba266155.zip
Some BIOSs are using MTRR values that are only documented under NDA
to control the mapping of things like the ACPI and APM into memory. The problem is that starting X changes these values, so if something was using the bits of BIOS mapped into memory (say ACPI or APM), then next time they access this memory the machine would hang. This patch refuse to change MTRR values it doesn't understand, unless a new "force" option is given. This means X doesn't change them by accident but someone can override that if they really want to. PR: 28418 Tested by: Christopher Masto <chris@netmonger.net>, David Bushong <david@bushong.net>, Santos <casd@myrealbox.com> MFC after: 1 week
Notes
Notes: svn path=/head/; revision=103346
Diffstat (limited to 'usr.sbin/memcontrol')
-rw-r--r--usr.sbin/memcontrol/memcontrol.83
-rw-r--r--usr.sbin/memcontrol/memcontrol.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/memcontrol/memcontrol.8 b/usr.sbin/memcontrol/memcontrol.8
index 989eb16f2cf2..f9d24a83ff69 100644
--- a/usr.sbin/memcontrol/memcontrol.8
+++ b/usr.sbin/memcontrol/memcontrol.8
@@ -83,7 +83,8 @@ Length of memory range in bytes, power of 2
.It Fl o Ar owner
Text identifier for this setting (7 char max)
.It Ar attribute
-Attributes applied to this range; one of
+Attributes applied to this range; combinations of
+.Ar force ,
.Ar uncacheable ,
.Ar write-combine ,
.Ar write-through ,
diff --git a/usr.sbin/memcontrol/memcontrol.c b/usr.sbin/memcontrol/memcontrol.c
index 2554723733a9..9eb87197eaaa 100644
--- a/usr.sbin/memcontrol/memcontrol.c
+++ b/usr.sbin/memcontrol/memcontrol.c
@@ -50,6 +50,7 @@ struct
{"write-through", MDF_WRITETHROUGH, MDF_SETTABLE},
{"write-back", MDF_WRITEBACK, MDF_SETTABLE},
{"write-protect", MDF_WRITEPROTECT, MDF_SETTABLE},
+ {"force", MDF_FORCE, MDF_SETTABLE},
{"unknown", MDF_UNKNOWN, 0},
{"fixed-base", MDF_FIXBASE, 0},
{"fixed-length", MDF_FIXLEN, 0},