Date: Sun, 22 May 2011 19:20:39 +0200 From: "deeptech71@gmail.com" <deeptech71@gmail.com> To: freebsd-current@freebsd.org Subject: Re: pcib allocation failure Message-ID: <BANLkTimBBR3yJsRsx7qv4cpnkpBAZuJuFA@mail.gmail.com> In-Reply-To: <BANLkTin4=FTeJeBhv9Tp5DkWo8TbTf-cvA@mail.gmail.com> References: <BANLkTikTHFTHff5iuPDMxR6zhezEcTaZSA@mail.gmail.com> <201105190813.37908.jhb@freebsd.org> <BANLkTi=DDvse1=igYPNo4xJQ0cHNTapQwA@mail.gmail.com> <201105191735.53889.jhb@freebsd.org> <BANLkTin4=FTeJeBhv9Tp5DkWo8TbTf-cvA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 21, 2011 at 3:59 PM, deeptech71@gmail.com
<deeptech71@gmail.com> wrote:
> On Thu, May 19, 2011 at 11:35 PM, John Baldwin <jhb@freebsd.org> wrote:
>> Index: pci_pci.c
>> ===================================================================
>> --- pci_pci.c (revision 222093)
>> +++ pci_pci.c (working copy)
>> @@ -162,8 +162,13 @@ pcib_write_windows(struct pcib_softc *sc, int mask
>> {
>> device_t dev;
>> uint32_t val;
>> + uint16_t cmd;
>>
>> dev = sc->dev;
>> + cmd = pci_read_config(dev, PCIR_COMMAND, 2);
>> + if (cmd & (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN))
>> + pci_write_config(dev, PCIR_COMMAND,
>> + cmd & ~(PCIM_CMD_PORTEN | PCIM_CMD_MEMEN), 2);
>> if (sc->io.valid && mask & WIN_IO) {
>> val = pci_read_config(dev, PCIR_IOBASEL_1, 1);
>> if ((val & PCIM_BRIO_MASK) == PCIM_BRIO_32) {
>> @@ -192,6 +197,8 @@ pcib_write_windows(struct pcib_softc *sc, int mask
>> pci_write_config(dev, PCIR_PMBASEL_1, sc->pmem.base >> 16, 2);
>> pci_write_config(dev, PCIR_PMLIMITL_1, sc->pmem.limit >> 16, 2);
>> }
>> + if (cmd & (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN))
>> + pci_write_config(dev, PCIR_COMMAND, cmd, 2);
>> }
>>
>> static void
>> @@ -231,7 +238,9 @@ pcib_alloc_window(struct pcib_softc *sc, struct pc
>> w->name, (uintmax_t)w->base, (uintmax_t)w->limit);
>> w->base = max_address;
>> w->limit = 0;
>> +#if 0
>> pcib_write_windows(sc, w->mask);
>> +#endif
>> return;
>> }
>> pcib_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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTimBBR3yJsRsx7qv4cpnkpBAZuJuFA>
