Re: PCI Failed to allocate mem for PCI ROM

From: Grant Grundler
Date: Sat Jan 12 2008 - 02:27:31 EST


On Fri, Jan 11, 2008 at 02:27:16PM -0600, Kumar Gala wrote:
>>> I'm getting the following message from the kernel on an embedded ppc32
>>> system:
>>>
>>> PCI: Failed to allocate mem resource #9:100000@e0000000 for 0000:00:00.0
>>>
>>> The HW setup is a PCIe host controller and an e1000 NIC card.
...
> I'm happy to debug, is the fact that the resno == 9 ok or does that seem
> wrong?

That is fine for the Bridge. See include/linux/pci.h :
#define PCI_ROM_RESOURCE 6
#define PCI_BRIDGE_RESOURCES 7
#define PCI_NUM_RESOURCES 11

IIRC, Bridges may have two 32-bit or one 64-bit BAR, Expansion ROM BAR and
three "range" registers: IO Port, MMIO (Prefetchable and non-prefetchable).
The BRIDGE_RESOURCES (7-10) are what failed to be assigned for some reason.

Looking at setup-bus.c:pci_bridge_check_ranges(), I'm concluding that:
[7] is IO Range.
[8] is MMIO
[9] is Prefetchable MMIO
[10] no clue...maybe used by host PCI bus controllers.

0x100000 is 1MB and would be the minimum MMIO range that can be allocated.
So that looks right too. Probably need to find out what is allocating
0xe0000000 instead.

hth,
grant
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/