From owner-freebsd-ports Tue Mar 27 23: 0: 7 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 586C237B718 for ; Tue, 27 Mar 2001 23:00:04 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2S704G45252; Tue, 27 Mar 2001 23:00:04 -0800 (PST) (envelope-from gnats) Date: Tue, 27 Mar 2001 23:00:04 -0800 (PST) Message-Id: <200103280700.f2S704G45252@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: natedac@kscable.com Subject: Re: ports/25958: Xfree86's savage and vesa drivers%2 Reply-To: natedac@kscable.com Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR ports/25958; it has been noted by GNATS. From: natedac@kscable.com To: freebsd-gnats-submit@FreeBSD.org, natedac@kscable.com Cc: natedac@kscable.com, jhb@FreeBSD.org Subject: Re: ports/25958: Xfree86's savage and vesa drivers%2 Date: Wed, 28 Mar 2001 00:51:49 -0600 (CST) Thanks to lots of help from BigSpoon on #BSDcode/EFnet (jhb@FreeBSD.org), here's a more proper way to fix the MTRR problem that plages some machines like mine. This will allow the MTRR support to be disabled at will either in /boot/loader.conf or at the boot prompt. It appears that today the copy of this file sitting on ftp.freebsd.org has been changed slightly (so a patch/diff against my week-old copy would be of little use anyways ;-) Anyways, here we go: Edit /usr/src/sys/i386/i386/i686_mem.c Somewhere near the start of the file, add these two lines: ------------------------------------------------------------------------------ static int mtrrs_disabled; TUNABLE_INT_DECL("machdep.mtrrs_disabled", 0, mtrrs_disabled); ------------------------------------------------------------------------------ Then, go to the end of the file, and make these changes to i686_mem_drvinit()... ------------------------------------------------------------------------------ static void i686_mem_drvinit(void *unused) { /* First, check if the user wants to allow MTRR at all */ if (mtrrs_disabled) { return; } /* Ok, MTRR is allowed, so try for i686 MTRRs */ if ((cpu_feature & CPUID_MTRR) && ((cpu_id & 0xf00) == 0x600) && ((strcmp(cpu_vendor, "GenuineIntel") == 0) || (strcmp(cpu_vendor, "AuthenticAMD") == 0))) { mem_range_softc.mr_op = &i686_mrops; } } ----------------------------------------------------------------------------- Finally, add a line to /boot/loader.conf to disable the MTRR support if you need to (leaving it out or mis-spelling the variable name will cause MTRR support to be detected and enabled normally): machdep.mtrrs_disabled = 1 I guess at this point, the original PR should remain open until the bug is solved in a more formal manner, but this seems to be an effective workaround. So far, I haven't seen any ill effects from disabling MTRR's. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message