NetBSD Problem Report #34986

From www@NetBSD.org  Fri Nov  3 13:48:15 2006
Return-Path: <www@NetBSD.org>
Received: by narn.NetBSD.org (Postfix, from userid 31301)
	id A1F7363B8CA; Fri,  3 Nov 2006 13:48:15 +0000 (UTC)
Message-Id: <20061103134815.A1F7363B8CA@narn.NetBSD.org>
Date: Fri,  3 Nov 2006 13:48:15 +0000 (UTC)
From: blair.sadewitz@gmail.com
Reply-To: blair.sadewitz@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Note that Dynamic Allocation of System RAM as VIdeo RAM must be disabled in system BIOS
X-Send-Pr-Version: www-1.0

>Number:         34986
>Category:       port-i386
>Synopsis:       Note that Dynamic Allocation of System RAM as VIdeo RAM must be disabled in system BIOS
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-i386-maintainer
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 03 13:50:00 +0000 2006
>Last-Modified:  Thu Nov 30 14:05:01 +0000 2006
>Originator:     Blair Sadewitz
>Release:        4.99.3
>Organization:
Organization?  Not much, I'm afraid.
>Environment:
NetBSD woody 4.99.3 NetBSD 4.99.3 (WOODY) #6: Wed Nov  1 02:57:59 EST 2006  blair@woody:/home/blair/cvs/src/sys/arch/amd64/compile/WOODY amd64

>Description:
Some [x86] systems have an integrated graphics controller which uses a variable amount of system RAM for its operations.  With driver support, this maximizes the amount of available RAM; without it, graphics operations become a critical reliability risk.  I use an intel D945Gtp motherboard with this graphics controller:

000:02:0: Intel 82945G/P Integrated Graphics Device (VGA display, revision 0x02)

If I do not disable ``DVMT'' in the BIOS, anything above a nominal load average will cause a hard lock within one hour--usually less.

This should perhaps be noted in the i386 and amd64 port FAQs, ``X11 on NetBSD'' FAQ, manpages, and other similar documentation.  Given the amount of systems out there which have Intel integrated graphics alone, it is critical that this be documented, otherwise potentially slews of [new] users will have the wrong impression regarding NetBSD's reliability and/or hardware support.

--Blair


>How-To-Repeat:
Document Intel DVMT technology, its implications upon system operation and reliability in those systems without appropriate drivers, and how to disable it in the BIOS.
>Fix:
Go into BIOS setup and select "Video Configuration" (I will get the name of the screen this is on if you wish).  Change the ``DVMT'' option to ``FIXED''.  On my system, even though I only allocate 128MB to Video RAM, the aperture must be set to 256MB or Xorg will hang the system.

I will write this documentation if desired.

>Audit-Trail:
From: "Blair Sadewitz" <blair.sadewitz@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-i386/34986: Note that Dynamic Allocation of System RAM as VIdeo RAM must be disabled in system BIOS
Date: Fri, 3 Nov 2006 08:55:45 -0500

 ------=_Part_7167_20840976.1162562145582
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline

 I forgot to mention that I do not know whether or not this must be done on
 systems using agp(4) to access the GART, as I have a PCI-Express-based
 system.  My intuition is, however, that DVMT must still be disabled.

 On 11/3/06, gnats-admin@netbsd.org <gnats-admin@netbsd.org> wrote:
 >
 > Thank you very much for your problem report.
 > It has the internal identification `port-i386/34986'.
 > The individual assigned to look at your
 > report is: port-i386-maintainer.
 >
 > >Category:       port-i386
 > >Responsible:    port-i386-maintainer
 > >Synopsis:       Note that Dynamic Allocation of System RAM as VIdeo RAM
 > must be disabled in system BIOS
 > >Arrival-Date:   Fri Nov 03 13:50:00 +0000 2006
 >
 >

 ------=_Part_7167_20840976.1162562145582
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline

 I forgot to mention that I do not know whether or not this must be done on systems using agp(4) to access the GART, as I have a PCI-Express-based system.&nbsp; My intuition is, however, that DVMT must still be disabled.<br><br>
 <div><span class="gmail_quote">On 11/3/06, <a href="mailto:gnats-admin@netbsd.org">gnats-admin@netbsd.org</a> &lt;<a href="mailto:gnats-admin@netbsd.org">gnats-admin@netbsd.org</a>&gt; wrote:
 </span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thank you very much for your problem report.<br>It has the internal identification `port-i386/34986'.
 <br>The individual assigned to look at your<br>report is: port-i386-maintainer.<br><br>&gt;Category:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; port-i386<br>&gt;Responsible:&nbsp;&nbsp;&nbsp;&nbsp;port-i386-maintainer<br>&gt;Synopsis:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Note that Dynamic Allocation of System RAM as VIdeo RAM must be disabled in system BIOS
 <br>&gt;Arrival-Date:&nbsp;&nbsp; Fri Nov 03 13:50:00 +0000 2006<br><br></blockquote></div><br><br clear="all"><br>

 ------=_Part_7167_20840976.1162562145582--

From: "Blair Sadewitz" <blair.sadewitz@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-i386/34986
Date: Thu, 30 Nov 2006 08:49:19 -0500

 I installed the i386 port and found that DVMT does not have to be
 disabled, at least on the 945G, if agp(4) is used.  However,
 Xorg/Xfree86 (tested with 6.9.0 and 4.6.0, respectively) still hang if
 the aperture is set to 128M instead of 256M in the BIOS.  This is
 because the aperture detection in this code:

         } else {        /* CHIP_I915 */
                 u_int16_t msac;

                 reg = pci_conf_read(sc->as_pc, sc->as_tag, AGP_I915_MSAC);
                 msac = (u_int16_t)(reg >> 16);
                 if (msac & AGP_I915_MSAC_APER_128M)
                         return 128 * 1024 * 1024;
                 else
                         return 256 * 1024 * 1024;
         }

 In agp_i810_get_aperture() does not work because intel violates its
 own spec; the MSAC bit is not set according to the aperture.

 On amd64, by default agp(4) is not used, so there are even more
 problems. I tried enabling agp(4) on  amd64, but I get strange
 corruption of scrolling xterms and a white block for a cursor (ARGB
 cursor memory not being allocated correctly).

 On FreeBSD, they use this driver on amd64, and it presumably works.
 Someone with the capabilities to sync this code with FreeBSD's driver
 really should, because there have been a few fixes of crtiical
 problems.  Note that they also do not use the "Evil hack" for
 PGTBL_CTL getting overwritten; I replaced this code with their sanity
 checking code in the same place and never had a problem with crashes,
 etc.  My BIOS has an option to fix the amount of allocated memory and
 aperture size, but the code never seems to detect this properly,
 otherwise I would simply forego using agp(4).  Currently, I can do
 this, but obviously I won't get enough video memory to use Xv, so this
 is not an acceptable solution.  Moreover, not all BIOSes--such as
 those on laptops--apparently have this feature (if it even does
 anything).

 Again, for someone who fully understands how this driver works,
 synching it to the FreeBSD driver shouldn't be hard and would be
 welcome by myself and I'm sure many others. Agp.c may have to be
 updated as well.  Details are available in FreeBSD's CVS log.

 Regards,

 -Blair

From: "Blair Sadewitz" <blair.sadewitz@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-i386/34986
Date: Thu, 30 Nov 2006 08:54:16 -0500

 I should also mention that I am using a multiprocessor kernel.

 I will be happy to test fixes, use a uniprocessor kernel, etc if
 someone lets me know what they'd like me to do.

 Enabling agp(4) on amd64 should be done if possible.

 I cannot use the in-tree XFree86 because it does not have driver
 support for 945G video.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.