From owner-freebsd-hackers Thu Aug 2 14:39:37 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.wrs.com (unknown-1-11.windriver.com [147.11.1.11]) by hub.freebsd.org (Postfix) with ESMTP id AFCA337B401 for ; Thu, 2 Aug 2001 14:39:32 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@[147.11.46.217]) by mail.wrs.com (8.9.3/8.9.1) with ESMTP id OAA23224; Thu, 2 Aug 2001 14:39:30 -0700 (PDT) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Thu, 02 Aug 2001 14:39:29 -0700 (PDT) From: John Baldwin To: natedac@kscable.com Subject: PR 25958 Cc: hackers@FreeBSD.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 -- 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