NetBSD Problem Report #24013

Received: (qmail 5920 invoked by uid 605); 7 Jan 2004 16:45:57 -0000
Message-Id: <>
Date: Wed, 07 Jan 2004 08:45:56 -0800
Subject: i810 Cannot allocate memory
X-Send-Pr-Version: 3.95

>Number:         24013
>Category:       kern
>Synopsis:       i810 Cannot allocate memory
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 07 16:46:00 +0000 2004
>Last-Modified:  Wed Jan 07 20:23:33 +0000 2004
>Release:        NetBSD 1.6.2_RC3

NetBSD 1.6.2_RC3 NetBSD 1.6.2_RC3 (GENERIC) #0: Fri Nov 28 12:06:50 UTC 2003 i386
Architecture: i386
Machine: i386
XFree86 -configure detected i810. It started up fine a few times.
Then it failed with:

(II) I810(0): xf86BindGARTMemory: bind key 15 at 0x00000000 (pgoffset 0)
(WW) I810(0): xf86BindGARTMemory: binding of gart memory with key 15
        at offset 0x0 failed (Cannot allocate memory)

Fatal server error:
AddScreen/ScreenInit failed for driver 0

This is XFree86 Version 4.3.0 using
My X came from

When it works successfully:
(II) I810(0): xf86BindGARTMemory: bind key 0 at 0x00000000 (pgoffset 0)
(II) I810(0): xf86BindGARTMemory: bind key 1 at 0x00800000 (pgoffset 2048)
(II) I810(0): xf86BindGARTMemory: bind key 2 at 0x00c00000 (pgoffset 3072)
(II) I810(0): Adding 512 scanlines for pixmap caching
(II) I810(0): Allocated Scratch Memory
(WW) I810(0): remove MTRR eff00000 - eff80000
(WW) I810(0): set MTRR e8000000 - ec000000
(II) I810(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000
(WW) I810(0): remove MTRR a0000 - b0000

Greg Troxel mentioned similar issues: 
He said "I edited sys/dev/pci/agp.c to put in more printfs at
failure points, rebooted, and now X works.  It may be that the
fresh boot allows memory allocation to succeed, or something more
Start XFree86 a few times using i810.
Workarounds:  printf attempt at debugging and starting X right at
boot (and don't restart X later). 

Another workaround is to use "vga" driver instead (but lower

Responsible-Changed-From-To: xsrc-manager->kern-bug-people 
Responsible-Changed-By: tron 
Responsible-Changed-When: Wed Jan 7 20:21:40 UTC 2004 
The error message is caused by a failure of the following ioctl(): 

if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) { 
xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: " 
"binding of gart memory with key %dn" 
"tat offset 0x%x failed (%s)n", 
key, offset, strerror(errno)); 
return FALSE; 

Whatever goes wrong happens in the kernel. My guess is that it is related 
to memory fragmentation or resources not being freed correctly. 

BTW: the AGP driver in NetBSD 1.6/1.6.x is known to have many problems. 
It would be interesting to try that with a NetBSD-current kernel. 

NetBSD Home
NetBSD PR Database Search

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