From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Beng Tan <bengtan1@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: (Re)assignment of PCI BARs
Date: Thu, 27 Aug 2009 16:19:29 -0700 [thread overview]
Message-ID: <20090827161929.253e001d@jbarnes-g45> (raw)
In-Reply-To: <664902dd0908270449x24f3ee12k615540ffe22e5b58@mail.gmail.com>
On Thu, 27 Aug 2009 19:49:32 +0800
Beng Tan <bengtan1@gmail.com> wrote:
> The symptom I'm seeing is that the card has BAR 0 unassigned ...
>
> Region 0: Memory at <unassigned> (64-bit, prefetchable) [disabled]
>
> and indeed, the kernel reports this through dmesg ...
>
> [ 6.147093] PCI: Failed to allocate mem resource
> #0:10000000@e0000000 for 0000:0d:00.0
>
> Full logs are available at:
>
> http://208.100.55.9/coldboot_20090827/dmesg.txt
> http://208.100.55.9/coldboot_20090827/iomem.txt
> http://208.100.55.9/coldboot_20090827/lspci_vv.txt
>
> Doesn't the kernel reassign PCI resources if the BIOS doesnt do a good
> enough job? Or is that not the case in my old kernel (2.6.24)?
A newer kernel could help, there have been some resource related fixes
since 2.6.24.
> Is it possible to force a reassignment of the impacted BAR? For
> example, I wrote a small module which wrote to the device's PCI
> configuration registers to explcitly reassign BAR 0 to 0xc00000000
> (and also bit bashed the connecting bridge to do the same) but ... I'm
> not sure if I'm doing it correctly.
There are some PCI calls you can use to assign space, e.g.
pci_bus_alloc_resource, but really the kernel should try to get this
right. In your case, it looks like the BIOS isn't giving the bus with
your card a large enough window (256M BAR on your card vs. a 2M windows
on the bus).
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2009-08-27 23:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-27 11:49 Beng Tan
2009-08-27 23:19 ` Jesse Barnes [this message]
2009-08-28 3:57 ` Beng Tan
2009-08-28 7:13 ` Beng Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090827161929.253e001d@jbarnes-g45 \
--to=jbarnes@virtuousgeek.org \
--cc=bengtan1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®