Date: Tue, 27 Mar 2001 23:00:04 -0800 (PST) From: natedac@kscable.com To: freebsd-ports@FreeBSD.org Subject: Re: ports/25958: Xfree86's savage and vesa drivers%2 Message-ID: <200103280700.f2S704G45252@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103280700.f2S704G45252>