Date: Thu, 02 Aug 2001 14:39:29 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: natedac@kscable.com Cc: hackers@FreeBSD.org Subject: PR 25958 Message-ID: <XFMail.010802143929.jhb@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
Nate, Can you try out the patch at http://www.freebsd.org/~jhb/patches/mtrr.patch? It's similar to the patch in the PR with a slight cleanup. The patch is against current, but hopefully it applies ok to stable. (It should I think). The patch is also included below for other people to look at in case they have gripes. The basic issue is that the MTRR's on Nate's box don't work in a way that XFree86 wants them to, so XFree86 causes his kernel to panic. :( The patch adds a new loader tunable 'machdep.disable_mtrrs' that can be set to a non-zero value to disable probing and use of MTRR's. I realize that being able to automatically disable MTRR's for known bad AMD chips would be nice, but until we know what chips are bad, this is at least a functional workaround. Index: i686_mem.c =================================================================== RCS file: /usr/cvs/src/sys/i386/i386/i686_mem.c,v retrieving revision 1.13 diff -u -r1.13 i686_mem.c --- i686_mem.c 2001/04/27 19:28:19 1.13 +++ i686_mem.c 2001/08/02 21:38:08 @@ -60,6 +60,9 @@ #define mrcopyflags(curr, new) (((curr) & ~MDF_ATTRMASK) | ((new) & MDF_ATTRMASK)) +static int mtrrs_disabled; +TUNABLE_INT("machdep.disable_mtrrs", &mtrrs_disabled); + static void i686_mrinit(struct mem_range_softc *sc); static int i686_mrset(struct mem_range_softc *sc, struct mem_range_desc *mrd, @@ -569,7 +572,7 @@ i686_mem_drvinit(void *unused) { /* Try for i686 MTRRs */ - if ((cpu_feature & CPUID_MTRR) && + if (!mtrrs_disabled && (cpu_feature & CPUID_MTRR) && ((cpu_id & 0xf00) == 0x600) && ((strcmp(cpu_vendor, "GenuineIntel") == 0) || (strcmp(cpu_vendor, "AuthenticAMD") == 0))) { -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010802143929.jhb>