From owner-freebsd-current@FreeBSD.ORG Sun May 22 17:20:41 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 469DF1065672 for ; Sun, 22 May 2011 17:20:41 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 02B408FC22 for ; Sun, 22 May 2011 17:20:40 +0000 (UTC) Received: by gyg13 with SMTP id 13so2340154gyg.13 for ; Sun, 22 May 2011 10:20:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=YyuCI5+R+b7ed5AOKskyOxT7+0KCIKG7hSWcSUOhdAw=; b=e1QwENtiKK/fKOMdRR6MwtXgZOoQJ4zEtS1oQNbm0KTRTXpplcYbYsNBtrDMRQeiTX wCU4ORoJOLDi2iD9amMA2eJLAUKLinrO/N8FzOjxzFUIsOC9e4U1wEjJiKNRBrRDDGmO MnsZafvtbGEl8/laHdMtGJEBiMc6TV+f9idQI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=sgDgvqWfGpPZ6rTEk4K1urHmwVJoJTVNEWIwr7iKqHrETy+qX8cNpXvl+CwNPBGZPs kwrP17/IWeqXQpMuW3EoZ62TRWzhB2o61syeJiRovUYt+UkWI05SKIc76QiDXw5y7xYP XPYwYgoPRoJNLHrMiYd1mJFnR3kMhQZRXOuPo= MIME-Version: 1.0 Received: by 10.236.92.116 with SMTP id i80mr1782685yhf.348.1306084839993; Sun, 22 May 2011 10:20:39 -0700 (PDT) Received: by 10.236.107.197 with HTTP; Sun, 22 May 2011 10:20:39 -0700 (PDT) In-Reply-To: References: <201105190813.37908.jhb@freebsd.org> <201105191735.53889.jhb@freebsd.org> Date: Sun, 22 May 2011 19:20:39 +0200 Message-ID: From: "deeptech71@gmail.com" To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: pcib allocation failure X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 22 May 2011 17:20:41 -0000 On Sat, May 21, 2011 at 3:59 PM, deeptech71@gmail.com wrote: > On Thu, May 19, 2011 at 11:35 PM, John Baldwin wrote: >> Index: pci_pci.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- pci_pci.c =A0 (revision 222093) >> +++ pci_pci.c =A0 (working copy) >> @@ -162,8 +162,13 @@ pcib_write_windows(struct pcib_softc *sc, int mask >> =A0{ >> =A0 =A0 =A0 =A0device_t dev; >> =A0 =A0 =A0 =A0uint32_t val; >> + =A0 =A0 =A0 uint16_t cmd; >> >> =A0 =A0 =A0 =A0dev =3D sc->dev; >> + =A0 =A0 =A0 cmd =3D pci_read_config(dev, PCIR_COMMAND, 2); >> + =A0 =A0 =A0 if (cmd & (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN)) >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 pci_write_config(dev, PCIR_COMMAND, >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cmd & ~(PCIM_CMD_PORTEN | PCIM_CMD= _MEMEN), 2); >> =A0 =A0 =A0 =A0if (sc->io.valid && mask & WIN_IO) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0val =3D pci_read_config(dev, PCIR_IOBASEL= _1, 1); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if ((val & PCIM_BRIO_MASK) =3D=3D PCIM_BR= IO_32) { >> @@ -192,6 +197,8 @@ pcib_write_windows(struct pcib_softc *sc, int mask >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pci_write_config(dev, PCIR_PMBASEL_1, sc-= >pmem.base >> 16, 2); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pci_write_config(dev, PCIR_PMLIMITL_1, sc= ->pmem.limit >> 16, 2); >> =A0 =A0 =A0 =A0} >> + =A0 =A0 =A0 if (cmd & (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN)) >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 pci_write_config(dev, PCIR_COMMAND, cmd, 2= ); >> =A0} >> >> =A0static void >> @@ -231,7 +238,9 @@ pcib_alloc_window(struct pcib_softc *sc, struct pc >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0w->name, (uintmax_t)w->base, (uin= tmax_t)w->limit); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0w->base =3D max_address; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0w->limit =3D 0; >> +#if 0 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pcib_write_windows(sc, w->mask); >> +#endif >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return; >> =A0 =A0 =A0 =A0} >> =A0 =A0 =A0 =A0pcib_activate_window(sc, type); > > that seems to work. oops, i forgot to set the AGP aperture size to 128M during testing. that patch actually does NOT work.