From owner-freebsd-current@FreeBSD.ORG Tue Nov 11 13:41:38 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3858616A4CE for ; Tue, 11 Nov 2003 13:41:38 -0800 (PST) Received: from mail.speakeasy.net (mail7.speakeasy.net [216.254.0.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CBD043FAF for ; Tue, 11 Nov 2003 13:41:37 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 1215 invoked from network); 11 Nov 2003 21:41:36 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 11 Nov 2003 21:41:36 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id hABLfCce021313; Tue, 11 Nov 2003 16:41:13 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <1068585984.686.123.camel@leguin> Date: Tue, 11 Nov 2003 16:41:10 -0500 (EST) From: John Baldwin To: Eric Anholt X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: current@freebsd.org cc: Bjoern Fischer Subject: Re: -CURRENT and -STABLE fails on IBM R30 in agp_ali.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2003 21:41:38 -0000 X-List-Received-Date: Tue, 11 Nov 2003 21:41:38 -0000 On 11-Nov-2003 Eric Anholt wrote: > On Mon, 2003-11-10 at 13:50, Bjoern Fischer wrote: >> Hello, >> >> there is a problem in ali_agp.c (both, -CURRENT and -STABLE): If I >> boot the generic kernel, it panics in agp_ali.c, when it tries to >> allocate memory for the gatt. Some simlpe tests showed, that the >> initial aperture size is reported as zero by the device: >> >> static int >> agp_ali_attach(device_t dev) >> { >> struct agp_ali_softc *sc = device_get_softc(dev); >> struct agp_gatt *gatt; >> int error; >> >> error = agp_generic_attach(dev); >> if (error) >> return error; >> >> sc->initial_aperture = AGP_GET_APERTURE(dev); >> >> This is zero---------------------^^^^^^ >> >> for (;;) { >> gatt = agp_alloc_gatt(dev); >> if (gatt) >> break; >> >> /* >> * Probably contigmalloc failure. Try reducing the >> * aperture so that the gatt size reduces. >> */ >> if (AGP_SET_APERTURE(dev, AGP_GET_APERTURE(dev) / 2)) { >> agp_generic_detach(dev); >> return ENOMEM; >> } >> } >> sc->gatt = gatt; >> >> /* Install the gatt. */ >> >> Since I don't have a machine ready running -CURRENT, I can't really >> debug this. How can I disable agp0 on boot time? > > Would this be appropriate to commit to AGP, to disable the ali agp in > case it reports 0 size (perhaps something in the BIOS has disabled it?) > and to have agp_alloc_gatt() just fail instead of panicing in > contigmalloc if the aperture size is 0? Looks good to me. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/